Annotation of OpenXM_contrib/PHC/Ada/Math_Lib/Supports/floating_face_enumerators.ads, Revision 1.1
1.1 ! maekawa 1: with Standard_Floating_Numbers; use Standard_Floating_Numbers;
! 2: with Standard_Integer_Vectors; use Standard_Integer_Vectors;
! 3: with Standard_Integer_VecVecs;
! 4: with Standard_Floating_VecVecs;
! 5:
! 6: package Floating_Face_Enumerators is
! 7:
! 8: -- DESCRIPTION :
! 9: -- This package contains procedures which allow the efficient
! 10: -- enumeration of all vertices, edges and k-faces of a polytope.
! 11: -- The polytope is spanned by a given vector of points in a general
! 12: -- dimensional space.
! 13: -- In addition, a procedure has been added for enumerating all
! 14: -- facets of a certain type of the sum of a tuple of polytopes.
! 15:
! 16: generic
! 17:
! 18: with procedure Process ( i : in integer; cont : out boolean );
! 19:
! 20: procedure Enumerate_Vertices ( pts : in Standard_Floating_VecVecs.VecVec;
! 21: tol : in double_float );
! 22:
! 23: -- DESCRIPTION :
! 24: -- The vector pts contains the points which span the polytope.
! 25: -- The candidate vertices are enumerated in order of occurrence in pts.
! 26: -- Each time a vertex has been found, the procedure Process is invoked,
! 27: -- which returns then the entry of the vertex in pts.
! 28: -- When cont is set to false, the enumeration stops.
! 29:
! 30: generic
! 31:
! 32: with procedure Process ( i,j : in integer; cont : out boolean );
! 33:
! 34: procedure Enumerate_Edges ( pts : in Standard_Floating_VecVecs.VecVec;
! 35: tol : in double_float );
! 36:
! 37: -- DESCRIPTION :
! 38: -- The vector pts contains the points which span the polytope.
! 39: -- The candidate edges are enumerated in lexicographic order.
! 40: -- Each time an edge has been found, the procedure Process is
! 41: -- invoked, which returns the entries of the edge in pts.
! 42: -- When cont is set to be false, the enumeration stops.
! 43:
! 44: generic
! 45:
! 46: with procedure Process ( i,j : in integer; cont : out boolean );
! 47:
! 48: procedure Enumerate_Lower_Edges
! 49: ( pts : in Standard_Floating_VecVecs.VecVec;
! 50: tol : in double_float );
! 51:
! 52: -- DESCRIPTION :
! 53: -- Enumerates only the edges on the lower hull of the polytope.
! 54:
! 55: generic
! 56:
! 57: with procedure Process ( face : in Vector; cont : out boolean );
! 58:
! 59: -- REQUIRED :
! 60: -- The range of face must be 0..k.
! 61:
! 62: procedure Enumerate_Faces ( k : in natural;
! 63: pts : in Standard_Floating_VecVecs.VecVec;
! 64: tol : in double_float );
! 65:
! 66: -- DESCRIPTION :
! 67: -- The vector pts contains the points which span the polytope.
! 68: -- A k-face is a face spanned by k affine linearly independent points.
! 69: -- The candidate k-faces are enumerated in lexicographic order.
! 70: -- Each time an edge has been found, the procedure Process is
! 71: -- invoked, which returns the entries of the k-face in pts.
! 72: -- When cont is set to be false, the enumeration stops.
! 73:
! 74: generic
! 75:
! 76: with procedure Process ( face : in Vector; cont : out boolean );
! 77:
! 78: -- REQUIRED :
! 79: -- The range of face must be 0..k.
! 80:
! 81: procedure Enumerate_Lower_Faces
! 82: ( k : in natural;
! 83: pts : in Standard_Floating_VecVecs.VecVec;
! 84: tol : in double_float );
! 85:
! 86: -- DESCRIPTION :
! 87: -- Enumerates only the k-faces on the lower hull of the polytope.
! 88:
! 89: generic
! 90:
! 91: with procedure Process ( faces : in Standard_Integer_VecVecs.VecVec;
! 92: cont : out boolean );
! 93:
! 94: -- DESCRIPTION :
! 95: -- The parameter faces has the following meaning:
! 96: -- faces(i) contains the entries of points in pts which span
! 97: -- the k-face of the ith polytope, with k = typ(i).
! 98: -- When cont is set to false, the enumeration stops.
! 99:
! 100: procedure Enumerate_Faces_of_Sum
! 101: ( ind,typ : in Vector; k : in natural;
! 102: pts : in Standard_Floating_VecVecs.VecVec;
! 103: tol : in double_float );
! 104:
! 105: -- DESCRIPTION :
! 106: -- Enumerates the points which span faces of a certain type
! 107: -- of the polytope in lexicographic order.
! 108:
! 109: -- ON ENTRY :
! 110: -- ind ind(i) indicates where the points of the ith polytope
! 111: -- in the vector pts begin;
! 112: -- typ typ(i) contains the dimension k of the k-face of the ith
! 113: -- polytope which spans the facet of the sum;
! 114: -- k sum of the entries in typ, must be less than
! 115: -- or equal to the dimension of the space;
! 116: -- pts contains all points of the polytopes;
! 117: -- tol tolerance on the precision.
! 118:
! 119: -- ON RETURN :
! 120: -- Each time a face of the sum has been found, Process is invoked.
! 121:
! 122: end Floating_Face_Enumerators;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>