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

Annotation of OpenXM_contrib/PHC/Ada/Math_Lib/Polynomials/generic_polynomial_systems_io.ads, Revision 1.1.1.1

1.1       maekawa     1: with text_io;                            use text_io;
                      2: with Abstract_Ring_io;
                      3: with Generic_Vectors;
                      4: with Generic_Matrices;
                      5:
                      6: generic
                      7:
                      8:   with package Ring_io is new Abstract_Ring_io(<>);  use Ring_io.Ring;
                      9:   with package Vectors is new Generic_Vectors(Ring_io.Ring);
                     10:   with package Matrices is new Generic_Matrices(Ring_io.Ring,Vectors);
                     11:
                     12: package Generic_Polynomial_Systems_io is
                     13:
                     14: -- DESCRIPTION :
                     15: --  This package contains routines for the input and output
                     16: --  of human-readable polynomial systems.
                     17: --  Note that for every write-procedure, there is a read-
                     18: --  procedure that can read the written system.
                     19: --  See also the package for the input and output
                     20: --  of polynomials in n unknowns.
                     21:
                     22: -- THE INPUT OPERATIONS :
                     23:
                     24:   procedure get ( n : in natural; s : out Poly_Sys );
                     25:   procedure get ( n,m : in natural; s : out Poly_Sys );
                     26:   procedure get ( file : in file_type; n : in natural; s : out Poly_Sys );
                     27:   procedure get ( file : in file_type; n,m : in natural; s : out Poly_Sys );
                     28:   procedure get ( s : out Poly_Sys );
                     29:   procedure get ( file : in file_type; s : out Poly_Sys );
                     30:
                     31:   -- DESCRIPTION :
                     32:   --   A polynomial system is read; n polynomials are read.
                     33:
                     34:   -- REQUIRED :
                     35:   --  * all unknows must begin with a letter and may have
                     36:   --    no symbols like '+', '-', '*', '^', '/', ';' or brackets in them;
                     37:   --    i = sqrt(-1) is reserved for complex numbers representation
                     38:   --  * each symbol is limited to 3 characters
                     39:   --  * the input is terminated by the delimiter
                     40:   --  * no blanks may occur in the numbers
                     41:   --  * if a file is specified, then it must be opened for input
                     42:   --  * n and m should both be on the first line !
                     43:   --  * if n stands alone, it should be followed immediately by an
                     44:   --    end-of-line symbol.
                     45:
                     46:   -- NOTE :
                     47:   --   The end_of_line symbol is not read.
                     48:
                     49:   -- ON ENTRY :
                     50:   --   file       file_type where the input is,
                     51:   --              if not specified, then standard input is assumed;
                     52:   --   n          the number of equations,
                     53:   --              if not specified, then n will first be read;
                     54:   --   m          the number of unknowns;
                     55:   --              if not specified, then m will first be read.
                     56:
                     57:   -- ON RETURN :
                     58:   --   s         a polynomial system.
                     59:
                     60: -- MORE USER FRIENDLY INPUT OPERATIONS :
                     61:
                     62:   procedure get ( lp : in out Link_to_Poly_Sys );
                     63:   procedure get ( file : in file_type; lp : in out Link_to_Poly_Sys );
                     64:
                     65:   -- DESCRIPTION :
                     66:   --   The first routine asks for a file name, while the second one
                     67:   --   assumes everything is on file and nothing has to be read from
                     68:   --   standard input.
                     69:
                     70:   -- NOTE :
                     71:   --   The end_of_line symbol is read at the end of the polynomial system.
                     72:
                     73: -- THE OUTPUT OPERATIONS :
                     74:
                     75:   procedure put ( n : out natural; s : in Poly_Sys; pow : in power := '*' );
                     76:   procedure put ( n,m : out natural; s : in Poly_Sys; pow : in power := '*' );
                     77:   procedure put ( file : in file_type;
                     78:                   n : out natural; s : in Poly_Sys; pow : in power := '*' );
                     79:   procedure put ( file : in file_type;
                     80:                   n,m : out natural; s : in Poly_Sys; pow : in power := '*' );
                     81:   procedure put ( s : in Poly_Sys; pow : in power );
                     82:   procedure put ( file : in file_type; s : in Poly_Sys; pow : in power );
                     83:   procedure put ( s : in Poly_Sys );
                     84:   procedure put ( file : in file_type; s : in Poly_Sys );
                     85:
                     86:   -- DESCRIPTION :
                     87:   --   A polynomial system is written on standard output or on file.
                     88:
                     89:   -- ON ENTRY :
                     90:   --   file       file where the output must come;
                     91:   --              if not specified, then standard output is assumed
                     92:   --   s          a polynomial system;
                     93:   --   pow        kind of power symbol used.
                     94:
                     95:   -- ON RETURN :
                     96:   --   n          the number of equations of p,
                     97:   --              if not specified, n will first be written;
                     98:   --   m          the number of unknowns.
                     99:   --              if not specified, m will first be written.
                    100:
                    101:   procedure put_line ( s : in Poly_Sys );
                    102:   procedure put_line ( file : in file_type; s : in Poly_Sys );
                    103:   procedure put_line ( s : in Poly_Sys; pow : in Power );
                    104:   procedure put_line ( file : in file_type; s : in Poly_Sys; pow : in Power );
                    105:
                    106:   -- DESCRIPTION :
                    107:   --   Writes the polynomials, every term on a separate line.
                    108:
                    109:   procedure Display_Format;
                    110:
                    111:   -- DESCRIPTION :
                    112:   --   Displays on screen the formatting rules as on-line help facility.
                    113:
                    114: end Generic_Polynomial_Systems_io;

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