Changeset f92fc2e in git
- Timestamp:
- Jun 16, 2010, 3:34:45 PM (13 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 5dcc9a60fe5f6363361635bb231ee206f6a174b4
- Parents:
- fb104b7d78bc189a491c27b263c1337ce820192f
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2010-06-16 15:34:45+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:55:10+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
coeffs/inline_coeffs.h
rfb104b rf92fc2e 118 118 /// convertion, 0 if impossible 119 119 int (*cfInt)(number &n, const coeffs r); 120 120 121 #ifdef HAVE_RINGS 121 122 int (*cfDivComp)(number a,number b,const coeffs r); … … 124 125 number (*cfExtGcd)(number a, number b, number *s, number *t,const coeffs r); 125 126 #endif 127 126 128 /// changes argument inline: a:= -a 127 129 number (*cfNeg)(number a, const coeffs r); … … 145 147 (*cfIsMOne)(number a, const coeffs r), 146 148 (*cfGreaterZero)(number a, const coeffs r); 149 147 150 void (*cfPower)(number a, int i, number * result, const coeffs r); 148 151 number (*cfGetDenom)(number &n, const coeffs r); … … 217 220 218 221 // the access methods: 222 223 /// return a copy of a 219 224 static inline number n_Copy(number n, const coeffs r){ return (r)->cfCopy(n, r); } 220 225 static inline void n_Delete(number* p, const coeffs r){ return (r)->cfDelete(p, r); } 226 227 static inline BOOLEAN n_AreEqual(number a, number b, const coeffs r){ return (r)->cfEqual(a, b, r); } 221 228 static inline BOOLEAN n_IsZero(number n, const coeffs r){ return (r)->cfIsZero(n,r); } 222 229 static inline BOOLEAN n_IsOne(number n, const coeffs r){ return (r)->cfIsOne(n,r); } 223 230 static inline BOOLEAN n_IsMOne(number n, const coeffs r){ return (r)->cfIsMOne(n,r); } 224 231 static inline BOOLEAN n_IsGreaterZero(number n, const coeffs r){ return (r)->cfGreaterZero(n,r); } 232 // cfGreater? 233 234 /// init with an integer 235 static inline number n_Init(int i, const coeffs r){ return (r)->cfInit(i,r); } 236 237 /// changes argument inline: a:= -a 225 238 static inline number n_Neg(number n, const coeffs r){ return (r)->cfNeg(n,r); } 226 static inline number n_Init(int i, const coeffs r){ return (r)->cfInit(i,r); } 239 240 /// return 1/a 241 static inline number n_Invers(number a, const coeffs r){ return (r)->cfInvers(a,r); } 242 243 /// how complicated, (0) => 0, otherwise positive 244 static inline int n_Size(number n, const coeffs r){ return (r)->cfSize(n,r); } 245 246 /// normalize the number. i.e. go to some canonnical representation (inplace) 247 static inline void n_Normalize(number& n, const coeffs r){ return (r)->cfNormalize(n,r); } 248 249 /// Normalize and Write 227 250 static inline void n_Write(number& n, const coeffs r){ return (r)->cfWrite(n,r); } 228 static inline void n_Normalize(number& n, const coeffs r){ return (r)->cfNormalize(n,r); } 229 static inline number n_Invers(number a, const coeffs r){ return (r)->cfInvers(a,r); } 230 static inline int n_Size(number n, const coeffs r){ return (r)->cfSize(n,r); } 251 252 /// Normalize and get denomerator 231 253 static inline number n_GetDenom(number& n, const coeffs r){ return (r)->cfGetDenom(n, r); } 254 255 /// Normalize and get numerator 232 256 static inline number n_GetNumerator(number& n, const coeffs r){ return (r)->cfGetNumerator(n, r); } 233 257 234 258 static inline void n_Power(number a, int b, number *res, const coeffs r){ return (r)->cfPower(a,b,res,r); } 235 259 236 static inline number n_Mult(number n1, number n2, const coeffs r){ return (r)->cfMult(n1, n2, r); } 237 static inline number n_Add(number n1, number n2, const coeffs r){ return (r)->cfAdd(n1, n2, r); } 238 static inline number n_Equal(number n1, number n2, const coeffs r){ return (r)->cfEqual(n1, n2, r); } 239 static inline number n_Sub(number n1, number n2, const coeffs r){ return (r)->cfSub(n1, n2, r); } 260 261 static inline number n_Mult(number a, number b, const coeffs r){ return (r)->cfMult(a, b, r); } 262 /// Inplace multiplication: a := a * b 263 static inline void n_InpMult(number &a, number b, const coeffs r){ return (r)->cfInpMult(a,b,r); } 264 265 static inline number n_Sub(number a, number b, const coeffs r){ return (r)->cfSub(a, b, r); } 266 static inline number n_Add(number a, number b, const coeffs r){ return (r)->cfAdd(a, b, r); } 267 268 static inline number n_Div(number a, number b, const coeffs r){ return (r)->cfDiv(a,b,r); } 269 static inline number n_IntDiv(number a, number b, const coeffs r){ return (r)->cfIntDiv(a,b,r); } 270 static inline number n_ExactDiv(number a, number b, const coeffs r){ return (r)->cfExactDiv(a,b,r); } 271 240 272 static inline number n_Gcd(number a, number b, const coeffs r){ return (r)->cfGcd(a,b,r); } 241 static inline number n_IntDiv(number a, number b, const coeffs r){ return (r)->cfIntDiv(a,b,r); } 242 static inline number n_Div(number a, number b, const coeffs r){ return (r)->cfDiv(a,b,r); } 243 static inline number n_ExactDiv(number a, number b, const coeffs r){ return (r)->cfExactDiv(a,b,r); } 244 static inline number n_InpMult(number a, number b, const coeffs r){ return (r)->cfInpMult(a,b,r); } 245 246 247 static inline BOOLEAN n_DBTest(number a, const char *filename, const int linenumber, const coeffs r) 273 274 /// Tests whether n is a correct number. 275 static inline BOOLEAN n_DBTest(number n, const char *filename, const int linenumber, const coeffs r) 248 276 { 249 277 #ifdef LDEBUG 250 return (r)->cfDBTest( a, filename, linenumber, r);278 return (r)->cfDBTest(n, filename, linenumber, r); 251 279 #else 252 280 return TRUE; … … 256 284 #define n_Test(a,r) n_DBTest(a, __FILE__, __LINE__, r) 257 285 286 // Missing wrappers for: 287 // cfIntMod, cfPar, cfParDeg, cfInt, cfRePart, cfImPart, cfRead, cfLcm, cfSetMap, cfName, cfInit_bigint 288 // HAVE_RINGS: cfDivComp, cfIsUnit, cfGetUnit, cfExtGcd... cfDivBy 289 290 258 291 // Deprecated: 259 292 static inline BOOLEAN n_GreaterZero(number n, const coeffs r){ return n_IsGreaterZero(n,r); } 293 static inline BOOLEAN n_Equal(number a, number b, const coeffs r){ return n_AreEqual(a, b, r); } 260 294 261 295 // Deprecated:
Note: See TracChangeset
for help on using the changeset viewer.