GiNaCRA  0.6.4
UnivariateRepresentation.h
Go to the documentation of this file.
00001 /*
00002  * GiNaCRA - GiNaC Real Algebra package
00003  * Copyright (C) 2010-2012  Ulrich Loup, Joachim Redies, Sebastian Junges
00004  *
00005  * This file is part of GiNaCRA.
00006  *
00007  * GiNaCRA is free software: you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation, either version 3 of the License, or
00010  * (at your option) any later version.
00011  *
00012  * GiNaCRA is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with GiNaCRA.  If not, see <http://www.gnu.org/licenses/>.
00019  *
00020  */
00021 
00022 
00023 #ifndef GINACRA_UNIVARIATEREPRESENTATION_H
00024 #define GINACRA_UNIVARIATEREPRESENTATION_H
00025 
00026 #include <ginac/flags.h>
00027 #include <ginac/registrar.h>
00028 #include <ginac/ginac.h>
00029 #include <stdexcept>
00030 
00031 #include "RationalUnivariatePolynomial.h"
00032 #include "operators.h"
00033 
00034 namespace GiNaC
00035 {
00047     class UnivariateRepresentation:
00048         public basic
00049     {
00050         // Call GiNaC macro (registrar.h) for initiating the implementation into the basic type.
00051         GINAC_DECLARE_REGISTERED_CLASS(UnivariateRepresentation, basic)
00052 
00053         public:
00054 
00056             // Con- and destructors //
00058 
00067             UnivariateRepresentation( const RationalUnivariatePolynomial& rootSource,
00068                                       const RationalUnivariatePolynomial& denominator,
00069                                       const list<RationalUnivariatePolynomial>& numerators,
00070                                       const vector<symbol>& variables )
00071                     throw ( invalid_argument );
00072 
00073             ~UnivariateRepresentation();
00074 
00076             // Selectors //
00078 
00083             const RationalUnivariatePolynomial RootSource() const;
00084 
00089             const RationalUnivariatePolynomial Denominator() const;
00090 
00095             const list<RationalUnivariatePolynomial> Numerators() const;
00096 
00098             // Operators //
00100 
00101             // // binary arithmetic operators
00102             // const UnivariateRepresentation operator+(UnivariateRepresentation);
00103             // const UnivariateRepresentation operator-(UnivariateRepresentation);
00104             // const UnivariateRepresentation operator*(UnivariateRepresentation);
00105             // const UnivariateRepresentation operator/(UnivariateRepresentation);
00106 
00107             // // unary arithmetic operators
00108             // const UnivariateRepresentation operator-();
00109 
00110             // relational operators
00111             // const bool operator==(const UnivariateRepresentation&);
00112             // const bool operator!=(const UnivariateRepresentation&);
00113             // const bool operator<(const UnivariateRepresentation&);
00114             // const bool operator>(const UnivariateRepresentation&);
00115             // const bool operator<=(const UnivariateRepresentation&);
00116             // const bool operator>=(const UnivariateRepresentation&);
00117 
00118             // assignment operators
00119 
00123             // const UnivariateRepresentation& operator=(const UnivariateRepresentation&);
00124 
00126             // Operations //
00128 
00130             // Arithmetic Operations //
00132 
00137             const UnivariateRepresentation add( UnivariateRepresentation o ) throw ( invalid_argument );
00138 
00142             const UnivariateRepresentation minus() const;
00143 
00148             const UnivariateRepresentation mul( UnivariateRepresentation o ) throw ( invalid_argument );
00149 
00153             const UnivariateRepresentation inverse() const throw ( invalid_argument );
00154 
00156             // Static Methods //
00158 
00159         protected:
00160 
00162             // Methods from basic //
00164 
00165             bool is_equal_same_type( const basic& other );
00166             void do_print( const print_context& c, unsigned level = 0 ) const;
00167             ex eval( int level = 0 ) const;
00168             // unsigned calchash() const;
00169 
00170         private:
00171 
00173             // Attributes //
00175 
00176             RationalUnivariatePolynomial       mRootSource;
00177             RationalUnivariatePolynomial       mDenominator;    // mDenominator and mRootSource are coprime, i.e., they have a nonzero gcd
00178             list<RationalUnivariatePolynomial> mNumerators;
00179             vector<symbol>                     mVariables;
00180 
00182             // Con- and destructors //
00184 
00186             // Operations //
00188 
00190             // Relational Operations //
00192 
00193     };
00194 
00195 }    // namespace GiNaC
00196 
00197 #endif