Changeset 227efd in git for coeffs/coeffs.h
- Timestamp:
- Jun 16, 2010, 5:58:04 PM (14 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 0eb229de7f102c905e5f2b8497a9a524f8ede977
- Parents:
- 584cbc74b85aa9f5b4e31e70416327028b017132
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2010-06-16 17:58:04+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:55:11+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
coeffs/coeffs.h
r584cbc r227efd 10 10 11 11 #include <auxiliary.h> 12 /* for assume: */ 13 #include <reporter.h> 12 14 #include <si_gmp.h> 13 15 … … 39 41 #endif 40 42 41 // and the routines w.r.t. currRing: 43 // the access methods (part 1) (see also part2 below): 44 // 45 // the routines w.r.t. currRing: 42 46 // (should only be used in the context of currRing, i.e. in the interpreter) 43 47 #define nCopy(n) n_Copy(n, currRing->cf) … … 218 222 inline void nSetChar(coeffs r) 219 223 { 220 if ((r!=NULL) && (r->cfSetChar!=NULL)) r->cfSetChar(r); 224 assume(r!=NULL); // r==NULL is an error 225 if (r->cfSetChar!=NULL) r->cfSetChar(r); 221 226 } 222 227 … … 226 231 227 232 228 // the access methods :233 // the access methods (part 2): 229 234 230 235 /// return a copy of a … … 232 237 static inline void n_Delete(number* p, const coeffs r){ return (r)->cfDelete(p, r); } 233 238 234 static inline BOOLEAN n_ AreEqual(number a, number b, const coeffs r){ return (r)->cfEqual(a, b, r); }239 static inline BOOLEAN n_Equal(number a, number b, const coeffs r){ return (r)->cfEqual(a, b, r); } 235 240 static inline BOOLEAN n_IsZero(number n, const coeffs r){ return (r)->cfIsZero(n,r); } 236 241 static inline BOOLEAN n_IsOne(number n, const coeffs r){ return (r)->cfIsOne(n,r); } 237 242 static inline BOOLEAN n_IsMOne(number n, const coeffs r){ return (r)->cfIsMOne(n,r); } 238 static inline BOOLEAN n_ IsGreaterZero(number n, const coeffs r){ return (r)->cfGreaterZero(n,r); }243 static inline BOOLEAN n_GreaterZero(number n, const coeffs r){ return (r)->cfGreaterZero(n,r); } 239 244 // cfGreater? 240 245 … … 248 253 static inline number n_Invers(number a, const coeffs r){ return (r)->cfInvers(a,r); } 249 254 250 /// how complicated, (0) => 0, otherwise positive255 /// use for pivot strategies, (0) => 0, otherwise positive 251 256 static inline int n_Size(number n, const coeffs r){ return (r)->cfSize(n,r); } 252 257 … … 254 259 static inline void n_Normalize(number& n, const coeffs r){ return (r)->cfNormalize(n,r); } 255 260 256 /// Normalize and Write 261 /// Normalize and Write to the output buffer of reporter 257 262 static inline void n_Write(number& n, const coeffs r){ return (r)->cfWrite(n,r); } 258 263 … … 267 272 268 273 static inline number n_Mult(number a, number b, const coeffs r){ return (r)->cfMult(a, b, r); } 274 269 275 /// Inplace multiplication: a := a * b 270 276 static inline void n_InpMult(number &a, number b, const coeffs r){ return (r)->cfInpMult(a,b,r); } … … 279 285 static inline number n_Gcd(number a, number b, const coeffs r){ return (r)->cfGcd(a,b,r); } 280 286 281 /// Tests whether n is a correct number. 287 #ifdef LDEBUG 288 /// Tests whether n is a correct number: only used if LDEBUG is defined 282 289 static inline BOOLEAN n_DBTest(number n, const char *filename, const int linenumber, const coeffs r) 283 290 { 284 #ifdef LDEBUG285 291 return (r)->cfDBTest(n, filename, linenumber, r); 286 #else287 return TRUE;288 #endif289 292 } 290 293 /// BOOLEAN n_Test(number a, const coeffs r) 291 294 #define n_Test(a,r) n_DBTest(a, __FILE__, __LINE__, r) 295 #else 296 #define n_Test(a,r) (1) 297 #endif 292 298 293 299 // Missing wrappers for: … … 297 303 298 304 // Deprecated: 299 static inline BOOLEAN n_GreaterZero(number n, const coeffs r){ return n_IsGreaterZero(n,r); }300 static inline BOOLEAN n_Equal(number a, number b, const coeffs r){ return n_AreEqual(a, b, r); }301 302 // Deprecated:303 305 static inline int n_GetChar(const coeffs r){ return nInternalChar(r); } 304 306
Note: See TracChangeset
for help on using the changeset viewer.