[BACK]Return to brackets.ads CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Schubert

Annotation of OpenXM_contrib/PHC/Ada/Schubert/brackets.ads, Revision 1.1

1.1     ! maekawa     1: with Standard_Natural_Vectors;
        !             2:
        !             3: package Brackets is
        !             4:
        !             5: -- DESCRIPTION :
        !             6: --   A bracket is a selection of rows and represents a maximal minor
        !             7: --   which is use in the Pluecker embedding of the Grassmannian.
        !             8:
        !             9: -- DATA STRUCTURES :
        !            10:
        !            11:   type Bracket is new Standard_Natural_Vectors.Vector;
        !            12:                                                  -- typically of range 1..d
        !            13:   type Link_to_Bracket is access Bracket;
        !            14:
        !            15: -- CONSTRUCTORS : puts the bracket in "normal form" with all entries sorted.
        !            16:
        !            17:   procedure Create ( v : in Standard_Natural_Vectors.Vector;
        !            18:                      b : out Bracket; sign : out integer );
        !            19:
        !            20:   -- DESCRIPTION :
        !            21:   --   Sorts the entries in the rows in ascending order.
        !            22:   --   Eventually the sign of the bracket coefficient changes,
        !            23:   --   when the number of transpositions is odd.
        !            24:
        !            25:   procedure Create ( v : in Standard_Natural_Vectors.Vector;
        !            26:                      perm : out Standard_Natural_Vectors.Vector;
        !            27:                      b : out Bracket; sign : out integer );
        !            28:
        !            29:   -- DESCRIPTION :
        !            30:   --   Returns also the permutation "perm" that is used in the sorting.
        !            31:
        !            32:   function Modulo ( b : Bracket; n : natural ) return Bracket;
        !            33:
        !            34:   -- DESCRIPTION :
        !            35:   --   Returns the modular form of the bracket: every entry mod n.
        !            36:
        !            37:   procedure Modulo ( b : in Bracket; n : in natural;
        !            38:                      perm : out Standard_Natural_Vectors.Vector;
        !            39:                      mb : out Bracket );
        !            40:
        !            41:   -- DESCRIPTION :
        !            42:   --   mb = Modulo(b,n) and perm is the permutation used to sort mb.
        !            43:
        !            44: -- SELECTORS : all require that the brackets are sorted.
        !            45:
        !            46:   function Is_Zero ( b : Bracket ) return boolean;
        !            47:
        !            48:   -- DESCRIPTION :
        !            49:   --   The bracket is zero when it has repeated entries.
        !            50:
        !            51:   function Is_Equal ( b1,b2 : Bracket ) return boolean;
        !            52:
        !            53:   -- DESCRIPTION :
        !            54:   --   Returns true if both brackets are the same.
        !            55:
        !            56:   function "<" ( b1,b2 : Bracket ) return boolean;
        !            57:
        !            58:   -- DESCRIPTION :
        !            59:   --   Returns true if b1 precedes b2 lexicographically.
        !            60:
        !            61:   function ">" ( b1,b2 : Bracket ) return boolean;
        !            62:
        !            63:   -- DESCRIPTION :
        !            64:   --   Returns true if b1 is larger than b2, lexicographically.
        !            65:
        !            66:   function Is_Standard ( b1,b2 : Bracket ) return natural;
        !            67:
        !            68:   -- DESCRIPTION :
        !            69:   --   Let s = Is_Standard(b1,b2).  If s = 0, then the pair b1*b2 constitutes
        !            70:   --   a Standard bracket monomial, otherwise, s indicates the first entry
        !            71:   --   where b1(s) > b2(s).
        !            72:
        !            73:   -- REQUIRED : b1 < b2, b1 precedes b2 lexicographically.
        !            74:
        !            75: -- DESTRUCTOR :
        !            76:
        !            77:   procedure Clear ( lb : in out Link_to_Bracket );
        !            78:
        !            79:   -- DESCRIPTION :
        !            80:   --   Destroys the allocate space.
        !            81:
        !            82: end Brackets;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>