GiNaCRA
0.6.4
|
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_MULTIVARIATETERM_H 00024 #define GINACRA_MULTIVARIATETERM_H 00025 00026 #include "MultivariatePolynomial.h" 00027 00028 namespace GiNaCRA 00029 { 00040 template<class monomialOrdering> 00041 class MultivariateTerm: 00042 public MultivariatePolynomial<monomialOrdering> 00043 { 00044 public: 00045 00047 // Con- and destructors // 00049 00050 MultivariateTerm(); 00051 00056 MultivariateTerm( const MultivariatePolynomial<monomialOrdering>& p ); 00057 00063 MultivariateTerm( const ex& p, const vector<symbol>& l ) throw ( invalid_argument ); 00064 00066 // Operators // 00068 00069 // assignment operators 00070 const MultivariateTerm<monomialOrdering>& operator = ( const MultivariateTerm<monomialOrdering>& ); 00071 const MultivariateTerm<monomialOrdering>& operator = ( const ex& ); 00072 00074 // Operations // 00076 00080 int tdegree() const; 00081 00083 // Arithmetic Operations // 00085 00090 const MultivariateTerm<monomialOrdering> mul( const MultivariateTerm<monomialOrdering>& o ) const throw ( invalid_argument ); 00091 00093 // Methods from ex // 00095 00096 void print( const print_context& c, unsigned level = 0 ) const; 00097 00099 // Static Methods // 00101 00102 protected: 00103 00105 // Relational Operations // 00107 00108 // also possible by comparing the intervals isolating the real roots: 00109 // inline const bool isLess(const MultivariateTerm& o) const; 00110 // inline const bool isGreater(const MultivariateTerm& o) const; 00111 00113 // Methods from basic // 00115 00116 // unsigned calchash() const; 00117 00118 private: 00119 00121 // Attributes // 00123 00125 // Auxiliary methods// 00127 00128 }; // class MultivariateTerm 00129 00131 // IMPLEMENTATION (in header file because of template parameter) // 00133 00134 #include "MultivariateTerm.tpp" 00135 00136 } // namespace GiNaC 00137 00138 #endif