[BACK]Return to multprec_complex_polynomials_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/multprec_complex_polynomials_io.ads, Revision 1.1

1.1     ! maekawa     1: with text_io;                            use text_io;
        !             2: with Multprec_Complex_Polynomials;       use Multprec_Complex_Polynomials;
        !             3:
        !             4: package Multprec_Complex_Polynomials_io is
        !             5:
        !             6: -- DESCRIPTION :
        !             7: --   This package contains routines for the input and output of
        !             8: --   multi-precision complex multivariate polynomials in symbolic form.
        !             9:
        !            10: -- EXAMPLES : i denotes sqrt(-1)
        !            11: --   ex1 : x**2*y + 1/2*z*y**2 - 2*z + y**3 + x - 1E9/-8.E-6* y + 3;
        !            12: --   ex2 : x^2*y + z*y^2 - 2*z + y^3 + x - y + 3;
        !            13: --   ex3 : (1.01 + 2.8*i)*x1**2*x2 + x3**2*x1 - 3*x1 + 2*x2*x3 - 3;
        !            14: --   ex4 : (x1^2*x2 + x3^2*x1 - 3*x1 + 2*x2*x3 - 3)*x2**2*(x2-1+i);
        !            15:
        !            16: -- DATASTRUCTURE AND CONSTANT NEEDED :
        !            17:
        !            18:   type Power is ('*','^');
        !            19:   delimiter : constant character := ';';
        !            20:
        !            21: -- EXCEPTIONS :
        !            22:
        !            23:   ILLEGAL_CHARACTER : exception;
        !            24:       -- occurs when a character is found unexpected to be
        !            25:
        !            26:   ILLEGAL_SYMBOL : exception;
        !            27:       -- occurs when an illegal symbol is read
        !            28:
        !            29:   ILLEGAL_OPERATION : exception;
        !            30:       -- occurs when one tries to perform illegal operations with
        !            31:       -- polynomials
        !            32:
        !            33:   INFINITE_NUMBER : exception;
        !            34:       -- occurs when a rational coefficient has a denominator = 0
        !            35:
        !            36:   OVERFLOW_OF_UNKNOWNS : exception;
        !            37:       -- occurs when the number of unknowns turns to be bigger
        !            38:       -- than first was mentioned
        !            39:
        !            40:   BAD_BRACKET : exception;
        !            41:       -- occurs when a bracket, like '(' or ')' is misplaced
        !            42:
        !            43: -- THE INPUT OPERATIONS :
        !            44:
        !            45:   procedure get ( n : in out natural; p : in out Poly );
        !            46:   procedure get ( file : in file_type; n : in out natural; p : in out Poly );
        !            47:   procedure get ( p : in out Poly );
        !            48:   procedure get ( file : in file_type; p : in out Poly );
        !            49:
        !            50:   -- DESCRIPTION :
        !            51:   --   A polynomial will be read from file or standard input.
        !            52:   --   No ordening on the monomials is assumed.
        !            53:
        !            54:   -- REQUIRED :
        !            55:   --  * all unknows must begin with a letter and may have
        !            56:   --    no symbols like '+', '-', '*', '^', '/', ';' or brackets in them,
        !            57:   --    i = sqrt(-1) is reserved for complex numbers representation;
        !            58:   --  * each symbol is limited to 3 characters;
        !            59:   --  * the input is terminated by the delimiter;
        !            60:   --  * no blanks may occur in the numbers;
        !            61:   --  * if specified, then the file must already be opened for input.
        !            62:
        !            63:   -- NOTE :
        !            64:   --   The end_of_line symbol is not read.
        !            65:
        !            66:   -- ON ENTRY :
        !            67:   --   file       file where the input is,
        !            68:   --              if not specified, then standard input is assumed;
        !            69:   --   n          the number of unknowns,
        !            70:   --              if specified, then n will first be read, otherwise it is
        !            71:   --              is assumed that the symbol table is already initialized.
        !            72:
        !            73:   -- ON RETURN :
        !            74:   --   p          a polynomial in n unknowns.
        !            75:
        !            76: -- THE OUTPUT OPERATIONS :
        !            77:
        !            78:   procedure put ( p : in Poly; pow : in Power );
        !            79:   procedure put ( file : in file_type; p : in Poly; pow : in Power );
        !            80:   procedure put ( n : in natural; p : in Poly; pow : in Power );
        !            81:   procedure put ( file : in file_type;
        !            82:                   n : in natural; p : in Poly; pow : in Power );
        !            83:   procedure put ( p : in Poly );
        !            84:   procedure put ( file : in file_type; p : in Poly );
        !            85:
        !            86:   -- DESCRIPTION :
        !            87:   --   A polynomial in n unknowns is written on file or on standard output.
        !            88:
        !            89:   -- REQUIRED :
        !            90:   --   If specified, then the file is must already been opened for output.
        !            91:
        !            92:   -- ON ENTRY :
        !            93:   --   file       file where the output must come,
        !            94:   --              if not specified, then standard output is assumed;
        !            95:   --   p          a polynomial in n unknows;
        !            96:   --   pow        kind of power symbol used, the default is '*'.
        !            97:
        !            98:   -- ON RETURN :
        !            99:   --   n          the number of unknows of p,
        !           100:   --              if specified, n will first be written.
        !           101:
        !           102:   procedure put_line ( p : in Poly );
        !           103:   procedure put_line ( file : in file_type; p : in Poly );
        !           104:   procedure put_line ( p : in Poly; pow : in Power );
        !           105:   procedure put_line ( file : in file_type; p : in Poly; pow : in Power );
        !           106:
        !           107:   -- DESCRIPTION :
        !           108:   --   Every term of the polynomial p will be written on a separate line.
        !           109:   --   This is useful for polynomials with random complex coefficients.
        !           110:
        !           111:   procedure Display_Format;
        !           112:
        !           113:   -- DESCRIPTION :
        !           114:   --   Displays on screen the formatting rules as on-line help facility.
        !           115:
        !           116: end Multprec_Complex_Polynomials_io;

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