Changeset bbe7bc in git
- Timestamp:
- Oct 10, 1997, 12:39:52 PM (27 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- b60ef79724ba6182feca87163aa81a7069ffc79e
- Parents:
- 791c0a38fb1f994041336b04086e94a782c10772
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/canonicalform.h
r791c0a rbbe7bc 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: canonicalform.h,v 1.1 7 1997-09-29 16:06:41schmidt Exp $ */2 /* $Id: canonicalform.h,v 1.18 1997-10-10 10:39:52 schmidt Exp $ */ 3 3 4 4 #ifndef INCL_CANONICALFORM_H … … 39 39 InternalCF *value; 40 40 public: 41 // constructors, destructors, selectors 41 42 CanonicalForm(); 42 43 CanonicalForm( const CanonicalForm& ); … … 51 52 InternalCF* getval() const; // use with caution !!! 52 53 53 int sign() const; 54 54 CanonicalForm deepCopy() const; 55 56 // predicates 55 57 bool isOne() const; 56 58 bool isZero() const; 57 59 bool isImm() const; 58 59 int intval() const;60 61 CanonicalForm lc() const;62 CanonicalForm LC() const;63 CanonicalForm LC( const Variable & v ) const;64 65 int degree() const;66 int degree( const Variable & v ) const;67 68 CanonicalForm tailcoeff() const;69 int taildegree() const;70 71 int level() const;72 Variable mvar() const;73 74 CanonicalForm num() const;75 CanonicalForm den() const;76 77 CanonicalForm deepCopy() const;78 79 bool isFFinGF() const;80 bool hasGcd() const { return false; }81 CanonicalForm gcd( const CanonicalForm & f ) const;82 CanonicalForm deriv() const;83 CanonicalForm deriv( const Variable & x ) const;84 CanonicalForm sqrt() const;85 int ilog2() const;86 static CanonicalForm genCoeff( int what, int i = 0 );87 88 CanonicalForm genZero() const;89 CanonicalForm genOne() const;90 91 bool isUnivariate() const;92 60 93 61 bool inZ() const; … … 102 70 bool inQuotDomain() const; 103 71 72 bool isFFinGF() const; 73 bool isUnivariate() const; 74 75 // conversion functions 76 int intval() const; 104 77 CanonicalForm mapinto () const; 105 78 106 CanonicalForm operator () ( const CanonicalForm & f ) const; 107 CanonicalForm operator () ( const CanonicalForm & f, const Variable & v ) const; 108 CanonicalForm operator [] ( int i ) const; 79 CanonicalForm lc () const; 80 CanonicalForm Lc () const; 81 CanonicalForm LC () const; 82 CanonicalForm LC ( const Variable & v ) const; 83 84 int degree () const; 85 int degree ( const Variable & v ) const; 86 87 CanonicalForm tailcoeff () const; 88 int taildegree () const; 89 90 int level () const; 91 Variable mvar () const; 92 93 CanonicalForm num () const; 94 CanonicalForm den () const; 95 96 // assignment operators 109 97 CanonicalForm& operator = ( const CanonicalForm& ); 110 98 CanonicalForm& operator = ( const int ); … … 118 106 CanonicalForm& mod ( const CanonicalForm& ); 119 107 108 // evaluation operators 109 CanonicalForm operator () ( const CanonicalForm & f ) const; 110 CanonicalForm operator () ( const CanonicalForm & f, const Variable & v ) const; 111 112 CanonicalForm operator [] ( int i ) const; 113 114 CanonicalForm deriv() const; 115 CanonicalForm deriv( const Variable & x ) const; 116 117 int sign() const; 118 CanonicalForm sqrt() const; 119 int ilog2() const; 120 bool hasGcd() const { return false; } 121 CanonicalForm gcd( const CanonicalForm & f ) const; 122 123 // comparison operators 124 friend bool operator == ( const CanonicalForm&, const CanonicalForm& ); 125 friend bool operator != ( const CanonicalForm&, const CanonicalForm& ); 126 friend bool operator > ( const CanonicalForm&, const CanonicalForm& ); 127 friend bool operator < ( const CanonicalForm&, const CanonicalForm& ); 128 129 // arithmetic operators 120 130 friend CanonicalForm operator - ( const CanonicalForm& ); 121 131 … … 138 148 #endif /* NOSTREAMIO */ 139 149 140 friend bool operator == ( const CanonicalForm&, const CanonicalForm& );141 friend bool operator != ( const CanonicalForm&, const CanonicalForm&);142 friend bool operator > ( const CanonicalForm&, const CanonicalForm& );143 friend bool operator < ( const CanonicalForm&, const CanonicalForm& );150 // obsolete methods 151 static CanonicalForm genCoeff( int what, int i = 0 ); 152 CanonicalForm genZero() const; 153 CanonicalForm genOne() const; 144 154 145 155 friend class CFIterator; … … 199 209 //}}} 200 210 201 //{{{ inline functions 202 inline CanonicalForm 203 lc ( const CanonicalForm & f ) { return f.lc(); } 204 205 inline CanonicalForm 206 LC ( const CanonicalForm & f ) { return f.LC(); } 207 208 inline CanonicalForm 209 LC ( const CanonicalForm & f, const Variable & v ) { return f.LC( v ); } 210 211 inline int 212 degree ( const CanonicalForm & f ) { return f.degree(); } 213 214 inline int 215 degree ( const CanonicalForm & f, const Variable & v ) { return f.degree( v ); } 216 217 inline int 218 taildegree ( const CanonicalForm & f ) { return f.taildegree(); } 219 220 inline CanonicalForm 221 tailcoeff ( const CanonicalForm & f ) { return f.tailcoeff(); } 222 223 inline int 224 level ( const CanonicalForm & f ) { return f.level(); } 225 226 inline CanonicalForm 227 mvar ( const CanonicalForm & f ) { return f.mvar(); } 228 229 inline CanonicalForm 230 num ( const CanonicalForm & f ) { return f.num(); } 231 232 inline CanonicalForm 233 den ( const CanonicalForm & f ) { return f.den(); } 234 235 inline CanonicalForm 236 mapinto ( const CanonicalForm & f ) { return f.mapinto(); } 237 238 //{{{ inline CanonicalForm deriv ( const CanonicalForm & f, const Variable & x ) 211 //{{{ inline functions corresponding to CanonicalForm methods 239 212 //{{{ docu 240 213 // 241 // deriv() - inline function version of method deriv().214 // - inline functions corresponding to CanonicalForm methods. 242 215 // 243 //}}} 244 inline CanonicalForm 245 deriv ( const CanonicalForm & f, const Variable & x ) 246 { 247 return f.deriv(x); 248 } 249 //}}} 250 251 //{{{ inline CanonicalForm sqrt ( const CanonicalForm & a ) 252 //{{{ docu 216 // These function exist for convenience only and because it is 217 // more beautiful to write 'degree( f )' than 'f.degree()'. 253 218 // 254 // sqrt() - inline function version of method sqrt(). 255 // 256 //}}} 257 inline CanonicalForm 258 sqrt ( const CanonicalForm & a ) 259 { 260 return a.sqrt(); 261 } 262 //}}} 263 264 //{{{ inline int ilog2 ( const CanonicalForm & a ) 265 //{{{ docu 266 // 267 // ilog2() - inline function version of method ilog(). 268 // 269 //}}} 270 inline int 271 ilog2 ( const CanonicalForm & a ) 272 { 273 return a.ilog2(); 274 } 275 //}}} 276 219 //}}} 220 inline CanonicalForm 221 lc ( const CanonicalForm & f ) { return f.lc(); } 222 223 inline CanonicalForm 224 Lc ( const CanonicalForm & f ) { return f.Lc(); } 225 226 inline CanonicalForm 227 LC ( const CanonicalForm & f ) { return f.LC(); } 228 229 inline CanonicalForm 230 LC ( const CanonicalForm & f, const Variable & v ) { return f.LC( v ); } 231 232 inline int 233 degree ( const CanonicalForm & f ) { return f.degree(); } 234 235 inline int 236 degree ( const CanonicalForm & f, const Variable & v ) { return f.degree( v ); } 237 238 inline int 239 taildegree ( const CanonicalForm & f ) { return f.taildegree(); } 240 241 inline CanonicalForm 242 tailcoeff ( const CanonicalForm & f ) { return f.tailcoeff(); } 243 244 inline int 245 level ( const CanonicalForm & f ) { return f.level(); } 246 247 inline CanonicalForm 248 mvar ( const CanonicalForm & f ) { return f.mvar(); } 249 250 inline CanonicalForm 251 num ( const CanonicalForm & f ) { return f.num(); } 252 253 inline CanonicalForm 254 den ( const CanonicalForm & f ) { return f.den(); } 255 256 inline CanonicalForm 257 deriv ( const CanonicalForm & f, const Variable & x ) { return f.deriv( x ); } 258 259 inline CanonicalForm 260 sqrt ( const CanonicalForm & a ) { return a.sqrt(); } 261 262 inline int 263 ilog2 ( const CanonicalForm & a ) { return a.ilog2(); } 264 265 inline CanonicalForm 266 mapinto ( const CanonicalForm & f ) { return f.mapinto(); } 267 //}}} 268 269 //{{{ inline functions 277 270 inline CanonicalForm 278 271 head ( const CanonicalForm & f )
Note: See TracChangeset
for help on using the changeset viewer.