Changeset 8a8c9e in git for libpolys/coeffs/coeffs.h
- Timestamp:
- Jan 12, 2011, 7:17:19 PM (13 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 56790491568061b8fda62ac136d56bb3bca12583
- Parents:
- ce2120e7219cf5bd8e6ce5db355bc0cd410f02f6
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-01-12 19:17:19+01:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:59:24+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/coeffs.h
rce2120e r8a8c9e 159 159 (*cfIsMOne)(number a, const coeffs r), 160 160 (*cfGreaterZero)(number a, const coeffs r); 161 161 162 162 void (*cfPower)(number a, int i, number * result, const coeffs r); 163 163 number (*cfGetDenom)(number &n, const coeffs r); … … 219 219 short float_len2; /* additional char-flags, rInit */ 220 220 221 BOOLEAN ShortOut; /// ffields need this. 221 BOOLEAN ShortOut; /// ffields need this. 222 222 223 223 // --------------------------------------------------- … … 265 265 266 266 /// return a copy of a 267 static inline number n_Copy(number n, const coeffs r){ return (r)->cfCopy(n, r); } 268 static inline void n_Delete(number* p, const coeffs r){ return (r)->cfDelete(p, r); } 269 270 static inline BOOLEAN n_Equal(number a, number b, const coeffs r){ return (r)->cfEqual(a, b, r); } 271 static inline BOOLEAN n_IsZero(number n, const coeffs r){ return (r)->cfIsZero(n,r); } 272 static inline BOOLEAN n_IsOne(number n, const coeffs r){ return (r)->cfIsOne(n,r); } 273 static inline BOOLEAN n_IsMOne(number n, const coeffs r){ return (r)->cfIsMOne(n,r); } 274 static inline BOOLEAN n_GreaterZero(number n, const coeffs r){ return (r)->cfGreaterZero(n,r); } 267 static inline number n_Copy(number n, const coeffs r) 268 { return (r)->cfCopy(n, r); } 269 static inline void n_Delete(number* p, const coeffs r) 270 { return (r)->cfDelete(p, r); } 271 272 static inline BOOLEAN n_Equal(number a, number b, const coeffs r) 273 { return (r)->cfEqual(a, b, r); } 274 static inline BOOLEAN n_IsZero(number n, const coeffs r) 275 { return (r)->cfIsZero(n,r); } 276 static inline BOOLEAN n_IsOne(number n, const coeffs r) 277 { return (r)->cfIsOne(n,r); } 278 static inline BOOLEAN n_IsMOne(number n, const coeffs r) 279 { return (r)->cfIsMOne(n,r); } 280 static inline BOOLEAN n_GreaterZero(number n, const coeffs r) 281 { return (r)->cfGreaterZero(n,r); } 275 282 // cfGreater? 276 283 #ifdef HAVE_RINGS 277 static inline BOOLEAN n_IsUnit(number n, const coeffs r) { return r->cfIsUnit(n,r); } 284 static inline BOOLEAN n_IsUnit(number n, const coeffs r) 285 { return r->cfIsUnit(n,r); } 286 static inline BOOLEAN n_DivBy(number a, number b, const coeffs r) 287 { return r->cfDivBy(a,b,r); } 278 288 #endif 279 289 280 290 /// init with an integer 281 static inline number n_Init(int i, const coeffs r){ return (r)->cfInit(i,r); } 291 static inline number n_Init(int i, const coeffs r) 292 { return (r)->cfInit(i,r); } 282 293 283 294 /// changes argument inline: a:= -a 284 static inline number n_Neg(number n, const coeffs r){ return (r)->cfNeg(n,r); } 295 static inline number n_Neg(number n, const coeffs r) 296 { return (r)->cfNeg(n,r); } 285 297 286 298 /// return 1/a 287 static inline number n_Invers(number a, const coeffs r){ return (r)->cfInvers(a,r); } 299 static inline number n_Invers(number a, const coeffs r) 300 { return (r)->cfInvers(a,r); } 288 301 289 302 /// use for pivot strategies, (0) => 0, otherwise positive 290 static inline int n_Size(number n, const coeffs r){ return (r)->cfSize(n,r); } 303 static inline int n_Size(number n, const coeffs r) 304 { return (r)->cfSize(n,r); } 291 305 292 306 /// normalize the number. i.e. go to some canonnical representation (inplace) 293 static inline void n_Normalize(number& n, const coeffs r){ return (r)->cfNormalize(n,r); } 307 static inline void n_Normalize(number& n, const coeffs r) 308 { return (r)->cfNormalize(n,r); } 294 309 295 310 /// Normalize and Write to the output buffer of reporter 296 static inline void n_Write(number& n, const coeffs r){ return (r)->cfWrite(n,r); } 311 static inline void n_Write(number& n, const coeffs r) 312 { return (r)->cfWrite(n,r); } 297 313 298 314 /// Normalize and get denomerator 299 static inline number n_GetDenom(number& n, const coeffs r){ return (r)->cfGetDenom(n, r); } 315 static inline number n_GetDenom(number& n, const coeffs r) 316 { return (r)->cfGetDenom(n, r); } 300 317 301 318 /// Normalize and get numerator 302 static inline number n_GetNumerator(number& n, const coeffs r){ return (r)->cfGetNumerator(n, r); } 303 304 static inline void n_Power(number a, int b, number *res, const coeffs r){ return (r)->cfPower(a,b,res,r); } 305 306 307 static inline number n_Mult(number a, number b, const coeffs r){ return (r)->cfMult(a, b, r); } 319 static inline number n_GetNumerator(number& n, const coeffs r) 320 { return (r)->cfGetNumerator(n, r); } 321 322 static inline void n_Power(number a, int b, number *res, const coeffs r) 323 { return (r)->cfPower(a,b,res,r); } 324 325 static inline number n_Mult(number a, number b, const coeffs r) 326 { return (r)->cfMult(a, b, r); } 308 327 309 328 /// Inplace multiplication: a := a * b 310 static inline void n_InpMult(number &a, number b, const coeffs r){ return (r)->cfInpMult(a,b,r); } 311 312 static inline number n_Sub(number a, number b, const coeffs r){ return (r)->cfSub(a, b, r); } 313 static inline number n_Add(number a, number b, const coeffs r){ return (r)->cfAdd(a, b, r); } 314 315 static inline number n_Div(number a, number b, const coeffs r){ return (r)->cfDiv(a,b,r); } 316 static inline number n_IntDiv(number a, number b, const coeffs r){ return (r)->cfIntDiv(a,b,r); } 317 static inline number n_ExactDiv(number a, number b, const coeffs r){ return (r)->cfExactDiv(a,b,r); } 318 319 static inline number n_Gcd(number a, number b, const coeffs r){ return (r)->cfGcd(a,b,r); } 329 static inline void n_InpMult(number &a, number b, const coeffs r) 330 { return (r)->cfInpMult(a,b,r); } 331 332 static inline number n_Sub(number a, number b, const coeffs r) 333 { return (r)->cfSub(a, b, r); } 334 335 static inline number n_Add(number a, number b, const coeffs r) 336 { return (r)->cfAdd(a, b, r); } 337 338 static inline number n_Div(number a, number b, const coeffs r) 339 { return (r)->cfDiv(a,b,r); } 340 341 static inline number n_IntDiv(number a, number b, const coeffs r) 342 { return (r)->cfIntDiv(a,b,r); } 343 344 static inline number n_ExactDiv(number a, number b, const coeffs r) 345 { return (r)->cfExactDiv(a,b,r); } 346 347 static inline number n_Gcd(number a, number b, const coeffs r) 348 { return (r)->cfGcd(a,b,r); } 320 349 321 350 /// Tests whether n is a correct number: only used if LDEBUG is defined 322 351 static inline BOOLEAN n_DBTest(number n, const char *filename, const int linenumber, const coeffs r) 323 352 { 324 #ifdef LDEBUG 353 #ifdef LDEBUG 325 354 return (r)->cfDBTest(n, filename, linenumber, r); 326 355 #else 327 356 return TRUE; 328 357 #endif 329 330 358 } 331 359 … … 339 367 340 368 // Deprecated: 341 static inline int n_GetChar(const coeffs r){ return nInternalChar(r); } 342 343 #endif 344 369 static inline int n_GetChar(const coeffs r) 370 { return nInternalChar(r); } 371 372 #endif 373
Note: See TracChangeset
for help on using the changeset viewer.