[BACK]Return to floating_face_enumerators.ads CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Supports

File: [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Supports / floating_face_enumerators.ads (download)

Revision 1.1.1.1 (vendor branch), Sun Oct 29 17:45:27 2000 UTC (23 years, 8 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_Floating_Numbers;          use Standard_Floating_Numbers;
with Standard_Integer_Vectors;           use Standard_Integer_Vectors;
with Standard_Integer_VecVecs;
with Standard_Floating_VecVecs;

package Floating_Face_Enumerators is

-- DESCRIPTION :
--   This package contains procedures which allow the efficient
--   enumeration of all vertices, edges and k-faces of a polytope.
--   The polytope is spanned by a given vector of points in a general
--   dimensional space.
--   In addition, a procedure has been added for enumerating all
--   facets of a certain type of the sum of a tuple of polytopes.

  generic

    with procedure Process ( i : in integer; cont : out boolean );

  procedure Enumerate_Vertices ( pts : in Standard_Floating_VecVecs.VecVec;
                                 tol : in double_float );

  -- DESCRIPTION :
  --   The vector pts contains the points which span the polytope.
  --   The candidate vertices are enumerated in order of occurrence in pts.
  --   Each time a vertex has been found, the procedure Process is invoked,
  --   which returns then the entry of the vertex in pts.
  --   When cont is set to false, the enumeration stops.

  generic

    with procedure Process ( i,j : in integer; cont : out boolean );

  procedure Enumerate_Edges ( pts : in Standard_Floating_VecVecs.VecVec;
                              tol : in double_float );

  -- DESCRIPTION :
  --   The vector pts contains the points which span the polytope.
  --   The candidate edges are enumerated in lexicographic order.
  --   Each time an edge has been found, the procedure Process is
  --   invoked, which returns the entries of the edge in pts.
  --   When cont is set to be false, the enumeration stops.

  generic

    with procedure Process ( i,j : in integer; cont : out boolean );

  procedure Enumerate_Lower_Edges
                           ( pts : in Standard_Floating_VecVecs.VecVec;
                             tol : in double_float );

  -- DESCRIPTION :
  --   Enumerates only the edges on the lower hull of the polytope.

  generic
    
    with procedure Process ( face : in Vector; cont : out boolean );

    -- REQUIRED :
    --   The range of face must be 0..k.

  procedure Enumerate_Faces ( k : in natural;
                              pts : in Standard_Floating_VecVecs.VecVec;
                              tol : in double_float );

  -- DESCRIPTION :
  --   The vector pts contains the points which span the polytope.
  --   A k-face is a face spanned by k affine linearly independent points.
  --   The candidate k-faces are enumerated in lexicographic order.
  --   Each time an edge has been found, the procedure Process is
  --   invoked, which returns the entries of the k-face in pts.
  --   When cont is set to be false, the enumeration stops.

  generic
    
    with procedure Process ( face : in Vector; cont : out boolean );

    -- REQUIRED :
    --   The range of face must be 0..k.

  procedure Enumerate_Lower_Faces 
                           ( k : in natural;
                             pts : in Standard_Floating_VecVecs.VecVec;
                             tol : in double_float );

  -- DESCRIPTION :
  --   Enumerates only the k-faces on the lower hull of the polytope.

  generic

    with procedure Process ( faces : in Standard_Integer_VecVecs.VecVec;
                             cont : out boolean );

    -- DESCRIPTION :
    --   The parameter faces has the following meaning:
    --   faces(i) contains the entries of points in pts which span
    --   the k-face of the ith polytope, with k = typ(i).
    --   When cont is set to false, the enumeration stops.

  procedure Enumerate_Faces_of_Sum
               ( ind,typ : in Vector; k : in natural;
                 pts : in Standard_Floating_VecVecs.VecVec;
                 tol : in double_float );

  -- DESCRIPTION :
  --   Enumerates the points which span faces of a certain type
  --   of the polytope in lexicographic order.

  -- ON ENTRY :
  --   ind       ind(i) indicates where the points of the ith polytope
  --             in the vector pts begin;
  --   typ       typ(i) contains the dimension k of the k-face of the ith
  --             polytope which spans the facet of the sum;
  --   k         sum of the entries in typ, must be less than
  --             or equal to the dimension of the space;
  --   pts       contains all points of the polytopes;
  --   tol       tolerance on the precision.

  -- ON RETURN :
  --   Each time a face of the sum has been found, Process is invoked.

end Floating_Face_Enumerators;