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

Annotation of OpenXM_contrib/PHC/Ada/Math_Lib/Numbers/abstract_ring.ads, Revision 1.1.1.1

1.1       maekawa     1: generic
                      2:
                      3:   type number is private;
                      4:
                      5:   zero,one : number;          -- neutral element for + and * are zero and one
                      6:
                      7:   with function Create ( n : natural ) return number;           -- n is number
                      8:
                      9:   with function Equal ( a,b : number ) return boolean;          -- a = b
                     10:   with procedure Copy ( a : in number; b : in out number );     -- b := a
                     11:
                     12:   with function "+" ( a,b : number ) return number;             -- return a+b;
                     13:   with function "+" ( a : number )   return number;             -- return +a;
                     14:   with function "-" ( a,b : number ) return number;             -- return a-b;
                     15:   with function "-" ( a : number )   return number;             -- return -a;
                     16:   with function "*" ( a,b : number ) return number;             -- return a*b;
                     17:
                     18:   with procedure Add ( a : in out number; b : in number );      -- a := a+b;
                     19:   with procedure Sub ( a : in out number; b : in number );      -- a := a-b;
                     20:   with procedure Min ( a : in out number );                     -- a := -a;
                     21:   with procedure Mul ( a : in out number; b : in number );      -- a := a*b;
                     22:
                     23:   with procedure Clear ( a : in out number );                   -- deallocation
                     24:
                     25: package Abstract_Ring is end;
                     26:
                     27: -- DESCRIPTION :
                     28: --   Abstract specification of any ring of numbers that has the standard
                     29: --   natural numbers as subring.

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