File: [local] / OpenXM_contrib / PHC / Ada / Root_Counts / Dynlift / frequency_graph.ads (download)
Revision 1.1.1.1 (vendor branch), Sun Oct 29 17:45:28 2000 UTC (23 years, 10 months ago) by maekawa
Branch: PHC, MAIN
CVS Tags: v2, maekawa-ipv6, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, RELEASE_1_2_1, HEAD Changes since 1.1: +0 -0
lines
Import the second public release of PHCpack.
OKed by Jan Verschelde.
|
with Standard_Integer_Vectors; use Standard_Integer_Vectors;
with Standard_Integer_VecVecs; use Standard_Integer_VecVecs;
with Standard_Integer_Matrices; use Standard_Integer_Matrices;
with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors;
with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists;
package Frequency_Graph is
-- DESCRIPTION :
-- This package allows to compute the frequency of a vector w.r.t.
-- a tuple of point sets.
-- CREATORS :
function Occurrences ( i : natural; l : List ) return natural;
-- DESCRIPTION :
-- Returns the number of times the ith component of vectors in l
-- differs from zero.
function Graph ( n : natural; supports : Array_of_Lists ) return Matrix;
-- DESCRIPTION :
-- Computes the graph wich represents the occurencies of each variable
-- in each support. In particular, if Graph(i,j) = 0, then the ith
-- unknown does not occur in the jth support, else the number of
-- occurrences in different vectors is given.
-- MODIFIER :
procedure Ignore ( m : in out Matrix; point : in Vector );
-- DESCRIPTION :
-- For each component i of the point, for which point(i) /= 0,
-- the element m(i,j) := 1, for all j in m'range(2).
-- This is to ignore the occurrences of the ith unknown and to give
-- priority to those unknowns that have not been chosen yet.
-- SELECTORS :
function Occurrence ( i : natural; m : Matrix ) return natural;
function Occurrence ( i : natural; m : Matrix; col : natural; perm : Vector )
return natural;
-- DESCRIPTION :
-- Returns the number of nonzero columns of ith row of m.
-- The second function does not consider a number of columns
-- equal to col and applies Occurrence to the columns
-- perm(j) for j in col+1..m'last(2).
function Occurrence ( v : Vector; m : Matrix ) return natural;
function Occurrence ( v : Vector; m : Matrix; col : natural; perm : Vector )
return natural;
-- DESCRIPTION :
-- Returns the minimal Occurrence(i,m), for all i, for which v(i) /= 0.
-- The second function does not consider a number of columns
-- equal to col and applies Occurrence to the columns
-- perm(j) for j in col+1..m'last(2).
function Lowest_Occurrence
( vec : VecVec; start : natural; m : Matrix ) return natural;
function Lowest_Occurrence
( vec : VecVec; start : natural; m : Matrix;
col : natural; perm : vector ) return natural;
-- DESCRIPTION :
-- Returns the index of the vector with lowest occurrence in
-- vec(start..vec'last).
-- The second function does not consider a number of columns
-- equal to col and applies Lowest_Occurrence to the columns
-- perm(j) for j in col+1..m'last(2).
-- CONSTRUCTORS :
function Sort ( l : List; m : Matrix ) return List;
procedure Sort ( l : in out List; m : in Matrix );
-- DESCRIPTION :
-- Sorts the points in the list l, so that on return,
-- the points are ordered, from low to high occurrence.
function Sort ( l : List; m : Matrix;
col : natural; perm : vector ) return List;
procedure Sort ( l : in out List; m : in Matrix;
col : in natural; perm : in vector );
-- DESCRIPTION :
-- Sorts the points in the list l, so that on return,
-- the points are ordered, from low to high occurrence.
-- Only the columns perm(j), for j in col+1..m'last(2) will be
-- considered when computing the occurrences.
end Frequency_Graph;