Annotation of OpenXM_contrib/PHC/Ada/Root_Counts/Stalift/mixed_volume_computation.ads, Revision 1.1
1.1 ! maekawa 1: with text_io; use text_io;
! 2: with Standard_Integer_Vectors; use Standard_Integer_Vectors;
! 3: with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems;
! 4: with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists;
! 5: with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions;
! 6:
! 7: package Mixed_Volume_Computation is
! 8:
! 9: -- DESCRIPTION :
! 10: -- This package offers a number of routines for the computation
! 11: -- of the mixed volume of a system of polynomial equations.
! 12:
! 13: -- UTILITIES :
! 14:
! 15: procedure Compute_Mixture ( supports : in out Array_of_Lists;
! 16: mix,perms : out Link_to_Vector );
! 17: -- DESCRIPTION :
! 18: -- Computes the type of mixture of the supports of a system.
! 19:
! 20: -- ON ENTRY :
! 21: -- supports the supports of a polynomial system.
! 22:
! 23: -- ON RETURN :
! 24: -- supports a permuted array of supports, so that the same
! 25: -- supports stand all toghether;
! 26: -- mix mix(k) indicates number of occurrencies of the kth support;
! 27: -- perms perms(k) gives the place of the kth support,
! 28: -- after permutation to make supports correspond with mix.
! 29:
! 30: function Compute_Index ( k : natural; mix : Vector ) return natural;
! 31:
! 32: -- DESCRIPTION :
! 33: -- Given k, an entry in the supports, the number this function returns
! 34: -- indicates the number of different support, w.r.t. the type of mixture.
! 35:
! 36: function Compute_Permutation
! 37: ( n : natural; mix : Vector; supports : Array_of_Lists )
! 38: return Link_to_Vector;
! 39:
! 40: -- DESCRIPTION :
! 41: -- Given the type of mixture and the support, the permutation vector
! 42: -- will be computed.
! 43:
! 44: -- ON RETURN :
! 45: -- perms perms(k) gives the place of the kth support,
! 46: -- after permutation to make supports correspond with mix.
! 47:
! 48: function Typed_Lists ( mix : Vector; points : Array_of_Lists )
! 49: return Array_of_Lists;
! 50:
! 51: -- DESCRIPTION :
! 52: -- Returns a tuple of lists where each list occurs only once,
! 53: -- according to the given type of mixture.
! 54:
! 55: function Permute ( p : Poly_Sys; perm : Link_to_Vector ) return Poly_Sys;
! 56: function Permute ( supports : Array_of_Lists ; perm : Link_to_Vector )
! 57: return Array_of_Lists;
! 58:
! 59: -- DESCRIPTION :
! 60: -- Permutes the polynomials in the system or the supports,
! 61: -- according to the vector perm.
! 62:
! 63: -- MIXED VOLUME COMPUTATION, GIVEN A SUBDIVISION :
! 64:
! 65: function Mixed_Volume ( n : natural; mix : Vector;
! 66: mic : Mixed_Cell ) return natural;
! 67: function Mixed_Volume ( n : natural; mix : Vector;
! 68: mixsub : Mixed_Subdivision ) return natural;
! 69:
! 70: -- DESCRIPTION :
! 71: -- Computes the mixed volume based on a mixed cell and subdivision.
! 72: -- When the cells are not fine enough, they will be refined but will
! 73: -- be lost after returning the result.
! 74:
! 75: procedure Mixed_Volume ( n : in natural; mix : in Vector;
! 76: mic : in out Mixed_Cell; mv : out natural );
! 77: procedure Mixed_Volume ( n : in natural; mix : in Vector;
! 78: mixsub : in out Mixed_Subdivision;
! 79: mv : out natural );
! 80:
! 81: -- DESCRIPTION :
! 82: -- Computes the mixed volume based on a mixed cell and subdivision.
! 83: -- When the cells are not fine enough, they will be refined by lifting.
! 84: -- The refinement is stored in the subdivision field of the cells.
! 85:
! 86: -- MIXED VOLUME COMPUTATIONS, GIVEN THE SUPPORTS :
! 87:
! 88: function Mixed_Volume ( n : natural; supports : Array_of_Lists )
! 89: return natural;
! 90:
! 91: function Mixed_Volume ( file : file_type; n : natural;
! 92: supports : Array_of_Lists ) return natural;
! 93:
! 94: function Mixed_Volume ( n : natural; mix : Vector;
! 95: supports : Array_of_Lists ) return natural;
! 96:
! 97: function Mixed_Volume ( file : file_type; n : natural; mix : Vector;
! 98: supports : Array_of_Lists ) return natural;
! 99:
! 100: procedure Mixed_Volume ( n : in natural; mix : in Vector;
! 101: supports : in Array_of_Lists;
! 102: lifted : out Array_of_Lists;
! 103: mixsub : out Mixed_Subdivision; mv : out natural );
! 104:
! 105: procedure Mixed_Volume ( file : in file_type; n : in natural;
! 106: mix : in Vector; supports : in Array_of_Lists;
! 107: lifted : out Array_of_Lists;
! 108: mixsub : out Mixed_Subdivision; mv : out natural );
! 109:
! 110: -- DESCRIPTION :
! 111: -- All these routines compute the mixed volume of support lists.
! 112:
! 113: -- ON ENTRY :
! 114: -- file if specified, then the mixed subdivision will be
! 115: -- written on file;
! 116: -- n the dimension of the system;
! 117: -- mix mix(k) is the number of times the kth support occurs;
! 118: -- supports the supports of a system of n polynomials in n unknowns.
! 119:
! 120: -- ON RETURN :
! 121: -- lifted array of listed points;
! 122: -- mixsub mixed subdivision used;
! 123: -- mv the mixed volume.
! 124:
! 125: end Mixed_Volume_Computation;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>