My Project
Data Structures | Functions | Variables
numbers.cc File Reference
#include <string.h>
#include <stdlib.h>
#include "misc/auxiliary.h"
#include "misc/mylimits.h"
#include "factory/factory.h"
#include "reporter/reporter.h"
#include "coeffs/coeffs.h"
#include "coeffs/numbers.h"
#include "coeffs/longrat.h"
#include "coeffs/modulop.h"
#include "coeffs/gnumpfl.h"
#include "coeffs/gnumpc.h"
#include "coeffs/ffields.h"
#include "coeffs/shortfl.h"
#include "coeffs/ntupel.h"
#include "coeffs/flintcf_Qrat.h"
#include "coeffs/rmodulo2m.h"
#include "coeffs/rmodulon.h"
#include "coeffs/rintegers.h"
#include "polys/ext_fields/algext.h"
#include "polys/ext_fields/transext.h"

Go to the source code of this file.

Data Structures

struct  nFindCoeffByName_p
 

Functions

void nNew (number *d)
 
static void ndDelete (number *d, const coeffs)
 
static number ndAnn (number, const coeffs)
 
static char * ndCoeffString (const coeffs r)
 
static void ndCoeffWrite (const coeffs r, BOOLEAN)
 
static char * ndCoeffName (const coeffs r)
 
static void ndInpMult (number &a, number b, const coeffs r)
 
void ndInpAdd (number &a, number b, const coeffs r)
 
static void ndPower (number a, int i, number *res, const coeffs r)
 
static number ndInvers (number a, const coeffs r)
 
static number ndInvers_Ring (number a, const coeffs r)
 
static BOOLEAN ndIsUnit_Ring (number a, const coeffs r)
 
static BOOLEAN ndIsUnit_Field (number a, const coeffs r)
 
static number ndGetUnit_Ring (number, const coeffs r)
 
static number ndRandom (siRandProc p, number p1, number p2, const coeffs cf)
 
static number ndEucNorm (number a, const coeffs cf)
 
static BOOLEAN ndDBTest (number, const char *, const int, const coeffs)
 
static number ndFarey (number, number, const coeffs r)
 
static number ndXExtGcd (number a, number b, number *s, number *t, number *u, number *v, const coeffs r)
 
static number ndChineseRemainder (number *, number *, int, BOOLEAN, CFArray &, const coeffs r)
 
number ndReadFd (const ssiInfo *f, const coeffs r)
 
static void ndWriteFd (number a, const ssiInfo *f, const coeffs r)
 
static int ndParDeg (number n, const coeffs r)
 
static number ndParameter (const int, const coeffs r)
 
BOOLEAN n_IsZeroDivisor (number a, const coeffs r)
 Test whether a is a zero divisor in r i.e. not coprime with char. of r very inefficient implementation: should ONLY be used for debug stuff /tests. More...
 
void ndNormalize (number &, const coeffs)
 
static number ndReturn0 (number, const coeffs r)
 
number ndGcd (number, number, const coeffs r)
 
static number ndIntMod (number, number, const coeffs r)
 
static number ndGetDenom (number &, const coeffs r)
 
static number ndGetNumerator (number &a, const coeffs r)
 
static int ndSize (number a, const coeffs r)
 
static void ndClearContent (ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs r)
 
static void ndClearDenominators (ICoeffsEnumerator &, number &d, const coeffs r)
 
static number ndCopy (number a, const coeffs)
 
number ndCopyMap (number a, const coeffs aRing, const coeffs r)
 
static void ndKillChar (coeffs)
 
static void ndSetChar (const coeffs)
 
number nd_Copy (number a, const coeffs r)
 
static BOOLEAN ndDivBy (number, number, const coeffs)
 
static int ndDivComp (number, number, const coeffs)
 
static number ndExtGcd (number, number, number *, number *, const coeffs r)
 
CanonicalForm ndConvSingNFactoryN (number, BOOLEAN, const coeffs)
 
static number ndConvFactoryNSingN (const CanonicalForm, const coeffs)
 [in, out] a bigint number >= 0
More...
 
static void ndMPZ (mpz_t result, number &n, const coeffs r)
 Converts a non-negative bigint number into a GMP number. More...
 
static number ndInitMPZ (mpz_t m, const coeffs r)
 
static const char * ndRead (const char *s, number *, const coeffs r)
 
static nMapFunc ndSetMap (const coeffs src, const coeffs dst)
 
static BOOLEAN ndCoeffIsEqual (const coeffs r, n_coeffType n, void *)
 
static number ndQuotRem (number a, number b, number *r, const coeffs R)
 
coeffs nInitChar (n_coeffType t, void *parameter)
 one-time initialisations for new coeffs in case of an error return NULL More...
 
void nKillChar (coeffs r)
 undo all initialisations More...
 
n_coeffType nRegister (n_coeffType n, cfInitCharProc p)
 
void nRegisterCfByName (cfInitCfByNameProc p, n_coeffType n)
 
coeffs nFindCoeffByName (char *cf_name)
 find an existing coeff by its "CoeffName" More...
 
void n_Print (number &a, const coeffs r)
 print a number (BEWARE of string buffers!) mostly for debugging More...
 
char * nEati (char *s, int *i, int m)
 divide by the first (leading) number and return it, i.e. make monic More...
 
char * nEatLong (char *s, mpz_ptr i)
 extracts a long integer from s, returns the rest More...
 

Variables

VAR n_Procs_scf_root =NULL
 
STATIC_VAR n_coeffType nLastCoeffs =n_CF
 
VAR cfInitCharProc nInitCharTableDefault []
 
STATIC_VAR cfInitCharProcnInitCharTable =nInitCharTableDefault
 
VAR nFindCoeffByName_p nFindCoeffByName_Root =NULL
 

Data Structure Documentation

◆ nFindCoeffByName_s

struct nFindCoeffByName_s

Definition at line 607 of file numbers.cc.

Data Fields
n_coeffType n
nFindCoeffByName_p next
cfInitCfByNameProc p

Function Documentation

◆ n_IsZeroDivisor()

BOOLEAN n_IsZeroDivisor ( number  a,
const coeffs  r 
)

Test whether a is a zero divisor in r i.e. not coprime with char. of r very inefficient implementation: should ONLY be used for debug stuff /tests.

Definition at line 176 of file numbers.cc.

177{
178 BOOLEAN ret = n_IsZero(a, r);
179 int c = n_GetChar(r);
180 if (ret || (c==0) || (r->is_field))
181 return ret; /*n_IsZero(a, r)*/
182 number ch = n_Init( c, r );
183 number g = n_Gcd( ch, a, r );
184 ret = !n_IsOne (g, r);
185 n_Delete(&ch, r);
186 n_Delete(&g, r);
187 return ret;
188}
int BOOLEAN
Definition: auxiliary.h:87
g
Definition: cfModGcd.cc:4090
static FORCE_INLINE number n_Gcd(number a, number b, const coeffs r)
in Z: return the gcd of 'a' and 'b' in Z/nZ, Z/2^kZ: computed as in the case Z in Z/pZ,...
Definition: coeffs.h:664
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
Definition: coeffs.h:464
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
Definition: coeffs.h:444
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition: coeffs.h:455
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
Definition: coeffs.h:538
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
Definition: coeffs.h:468

◆ n_Print()

void n_Print ( number &  a,
const coeffs  r 
)

print a number (BEWARE of string buffers!) mostly for debugging

Definition at line 646 of file numbers.cc.

648{
649 assume(r != NULL);
650 n_Test(a,r);
651
652 StringSetS("");
653 n_Write(a, r);
654 { char* s = StringEndS(); Print("%s", s); omFree(s); }
#define n_Test(a, r)
BOOLEAN n_Test(number a, const coeffs r)
Definition: coeffs.h:712
static FORCE_INLINE void n_Write(number n, const coeffs r, const BOOLEAN bShortOut=TRUE)
Definition: coeffs.h:591
#define Print
Definition: emacs.cc:80
const CanonicalForm int s
Definition: facAbsFact.cc:51
#define assume(x)
Definition: mod2.h:389
#define omFree(addr)
Definition: omAllocDecl.h:261
#define NULL
Definition: omList.c:12
void StringSetS(const char *st)
Definition: reporter.cc:128
char * StringEndS()
Definition: reporter.cc:151

◆ nd_Copy()

number nd_Copy ( number  a,
const coeffs  r 
)

Definition at line 295 of file numbers.cc.

295{ return r->cfCopy(a, r); }

◆ ndAnn()

static number ndAnn ( number  ,
const  coeffs 
)
static

Definition at line 51 of file numbers.cc.

51{ return NULL;}

◆ ndChineseRemainder()

static number ndChineseRemainder ( number *  ,
number *  ,
int  ,
BOOLEAN  ,
CFArray ,
const coeffs  r 
)
static

Definition at line 150 of file numbers.cc.

151{
152 Werror("ChineseRemainder not implemented for %s (c=%d)",r->cfCoeffName(r),getCoeffType(r));
153 return r->cfInit(0,r);
154}
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
Definition: coeffs.h:421
void Werror(const char *fmt,...)
Definition: reporter.cc:189

◆ ndClearContent()

static void ndClearContent ( ICoeffsEnumerator numberCollectionEnumerator,
number &  c,
const coeffs  r 
)
static

TODO: move to a separate implementation

Definition at line 198 of file numbers.cc.

199{
200 assume(r != NULL);
201
202 // no fractions
203 assume(!( nCoeff_is_Q(r) ));
204 // all coeffs are given by integers!!!
205
206 numberCollectionEnumerator.Reset();
207
208 if( !numberCollectionEnumerator.MoveNext() ) // empty zero polynomial?
209 {
210 c = n_Init(1, r);
211 return;
212 }
213
214 number &curr = numberCollectionEnumerator.Current();
215
216#ifdef HAVE_RINGS
217 /// TODO: move to a separate implementation
218 if (nCoeff_is_Ring(r))
219 {
220 if (nCoeff_has_Units(r))
221 {
222 c = n_GetUnit(curr, r);
223
224 if (!n_IsOne(c, r))
225 {
226 number inv = n_Invers(c, r);
227
228 n_InpMult(curr, inv, r);
229
230 while( numberCollectionEnumerator.MoveNext() )
231 {
232 number &n = numberCollectionEnumerator.Current();
233 n_Normalize(n, r); // ?
234 n_InpMult(n, inv, r); // TODO: either this or directly divide!!!?
235 }
236
237 n_Delete(&inv, r);
238 }
239 } else c = n_Init(1, r);
240
241 return;
242 }
243#endif
244
247
248 n_Normalize(curr, r); // Q: good/bad/ugly??
249
250 if (!n_IsOne(curr, r))
251 {
252 number t = curr; // takes over the curr! note: not a reference!!!
253
254 curr = n_Init(1, r); // ???
255
256 number inv = n_Invers(t, r);
257
258 while( numberCollectionEnumerator.MoveNext() )
259 {
260 number &n = numberCollectionEnumerator.Current();
261 n_InpMult(n, inv, r); // TODO: either this or directly divide!!!?
262// n_Normalize(n, r); // ?
263 }
264
265 n_Delete(&inv, r);
266
267 c = t;
268 } else
269 c = n_Copy(curr, r); // c == 1 and nothing else to do...
270}
virtual reference Current()=0
Gets the current element in the collection (read and write).
virtual void Reset()=0
Sets the enumerator to its initial position: -1, which is before the first element in the collection.
virtual bool MoveNext()=0
Advances the enumerator to the next element of the collection. returns true if the enumerator was suc...
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
Definition: coeffs.h:451
static FORCE_INLINE BOOLEAN nCoeff_has_Units(const coeffs r)
returns TRUE, if r is not a field and r has non-trivial units
Definition: coeffs.h:797
static FORCE_INLINE BOOLEAN nCoeff_is_GF(const coeffs r)
Definition: coeffs.h:839
static FORCE_INLINE number n_Invers(number a, const coeffs r)
return the multiplicative inverse of 'a'; raise an error if 'a' is not invertible
Definition: coeffs.h:564
static FORCE_INLINE BOOLEAN nCoeff_is_numeric(const coeffs r)
Definition: coeffs.h:832
static FORCE_INLINE BOOLEAN nCoeff_is_Zp_a(const coeffs r)
Definition: coeffs.h:859
static FORCE_INLINE BOOLEAN nCoeff_is_Q_algext(const coeffs r)
is it an alg. ext. of Q?
Definition: coeffs.h:914
static FORCE_INLINE BOOLEAN nCoeff_is_Q(const coeffs r)
Definition: coeffs.h:806
static FORCE_INLINE number n_GetUnit(number n, const coeffs r)
in Z: 1 in Z/kZ (where k is not a prime): largest divisor of n (taken in Z) that is co-prime with k i...
Definition: coeffs.h:532
static FORCE_INLINE BOOLEAN nCoeff_is_Ring(const coeffs r)
Definition: coeffs.h:730
static FORCE_INLINE BOOLEAN nCoeff_is_Zp(const coeffs r)
Definition: coeffs.h:800
static FORCE_INLINE void n_InpMult(number &a, number b, const coeffs r)
multiplication of 'a' and 'b'; replacement of 'a' by the product a*b
Definition: coeffs.h:641
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
Definition: coeffs.h:578

◆ ndClearDenominators()

static void ndClearDenominators ( ICoeffsEnumerator ,
number &  d,
const coeffs  r 
)
static

Definition at line 272 of file numbers.cc.

273{
274 assume( r != NULL );
277
278 d = n_Init(1, r);
279}
static FORCE_INLINE BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
Definition: coeffs.h:910
static FORCE_INLINE BOOLEAN nCoeff_is_transExt(const coeffs r)
TRUE iff r represents a transcendental extension field.
Definition: coeffs.h:918

◆ ndCoeffIsEqual()

static BOOLEAN ndCoeffIsEqual ( const coeffs  r,
n_coeffType  n,
void *   
)
static

Definition at line 340 of file numbers.cc.

342{
343 /* test, if r is an instance of nInitCoeffs(n,parameter) */
344 /* if parameter is not needed */
345 return (n==r->type);

◆ ndCoeffName()

static char * ndCoeffName ( const coeffs  r)
static

Definition at line 60 of file numbers.cc.

61{
62 STATIC_VAR char s[20];
63 snprintf(s,11,"Coeffs(%d)",r->type);
64 return s;
65}
#define STATIC_VAR
Definition: globaldefs.h:7

◆ ndCoeffString()

static char * ndCoeffString ( const coeffs  r)
static

Definition at line 52 of file numbers.cc.

53{
54 return omStrDup(r->cfCoeffName(r));
55}
#define omStrDup(s)
Definition: omAllocDecl.h:263

◆ ndCoeffWrite()

static void ndCoeffWrite ( const coeffs  r,
BOOLEAN   
)
static

Definition at line 56 of file numbers.cc.

57{
58 PrintS(r->cfCoeffName(r));
59}
void PrintS(const char *s)
Definition: reporter.cc:284

◆ ndConvFactoryNSingN()

static number ndConvFactoryNSingN ( const  CanonicalForm,
const  coeffs 
)
static

[in, out] a bigint number >= 0

[out] the GMP equivalent

Definition at line 310 of file numbers.cc.

◆ ndConvSingNFactoryN()

CanonicalForm ndConvSingNFactoryN ( number  ,
BOOLEAN  ,
const  coeffs 
)

Definition at line 303 of file numbers.cc.

304{
306 WerrorS("no conversion to factory");
307 return term;
308}
factory's main class
Definition: canonicalform.h:86
Definition: int_poly.h:33
void WerrorS(const char *s)
Definition: feFopen.cc:24

◆ ndCopy()

static number ndCopy ( number  a,
const  coeffs 
)
static

Definition at line 281 of file numbers.cc.

281{ return a; }

◆ ndCopyMap()

number ndCopyMap ( number  a,
const coeffs  aRing,
const coeffs  r 
)

Definition at line 282 of file numbers.cc.

283{
284 // aRing and r need not be the same, but must be the same representation
285 assume(aRing->rep==r->rep);
287 return a;
288 else
289 return r->cfCopy(a, r);
290}
static FORCE_INLINE BOOLEAN nCoeff_has_simple_Alloc(const coeffs r)
TRUE if n_Delete/n_New are empty operations.
Definition: coeffs.h:906

◆ ndDBTest()

static BOOLEAN ndDBTest ( number  ,
const char *  ,
const int  ,
const  coeffs 
)
static

Definition at line 137 of file numbers.cc.

137{ return TRUE; }
#define TRUE
Definition: auxiliary.h:100

◆ ndDelete()

static void ndDelete ( number *  d,
const  coeffs 
)
static

Definition at line 50 of file numbers.cc.

50{ *d=NULL; }

◆ ndDivBy()

static BOOLEAN ndDivBy ( number  ,
number  ,
const  coeffs 
)
static

Definition at line 298 of file numbers.cc.

298{ return TRUE; } // assume a,b !=0

◆ ndDivComp()

static int ndDivComp ( number  ,
number  ,
const  coeffs 
)
static

Definition at line 299 of file numbers.cc.

299{ return 2; }

◆ ndEucNorm()

static number ndEucNorm ( number  a,
const coeffs  cf 
)
static

Definition at line 133 of file numbers.cc.

134{ return cf->cfInit(cf->cfSize(a,cf),cf); }
CanonicalForm cf
Definition: cfModGcd.cc:4083

◆ ndExtGcd()

static number ndExtGcd ( number  ,
number  ,
number *  ,
number *  ,
const coeffs  r 
)
static

Definition at line 300 of file numbers.cc.

300{ return r->cfInit(1,r); }

◆ ndFarey()

static number ndFarey ( number  ,
number  ,
const coeffs  r 
)
static

Definition at line 140 of file numbers.cc.

141{
142 Werror("farey not implemented for %s (c=%d)",r->cfCoeffName(r),getCoeffType(r));
143 return NULL;
144}

◆ ndGcd()

number ndGcd ( number  a,
number  b,
const coeffs  r 
)

Definition at line 192 of file numbers.cc.

192{ return r->cfInit(1,r); }

◆ ndGetDenom()

static number ndGetDenom ( number &  ,
const coeffs  r 
)
static

Definition at line 194 of file numbers.cc.

194{ return r->cfInit(1,r); }

◆ ndGetNumerator()

static number ndGetNumerator ( number &  a,
const coeffs  r 
)
static

Definition at line 195 of file numbers.cc.

195{ return r->cfCopy(a,r); }

◆ ndGetUnit_Ring()

static number ndGetUnit_Ring ( number  ,
const coeffs  r 
)
static

Definition at line 129 of file numbers.cc.

130{ return r->cfInit(1,r); }

◆ ndInitMPZ()

static number ndInitMPZ ( mpz_t  m,
const coeffs  r 
)
static

Definition at line 323 of file numbers.cc.

325{
326 return r->cfInit( mpz_get_si(m), r);
int m
Definition: cfEzgcd.cc:128

◆ ndInpAdd()

void ndInpAdd ( number &  a,
number  b,
const coeffs  r 
)

Definition at line 72 of file numbers.cc.

73{
74 number n=r->cfAdd(a,b,r);
75 r->cfDelete(&a,r);
76 a=n;
77}
CanonicalForm b
Definition: cfModGcd.cc:4103

◆ ndInpMult()

static void ndInpMult ( number &  a,
number  b,
const coeffs  r 
)
static

Definition at line 66 of file numbers.cc.

67{
68 number n=r->cfMult(a,b,r);
69 r->cfDelete(&a,r);
70 a=n;
71}

◆ ndIntMod()

static number ndIntMod ( number  ,
number  ,
const coeffs  r 
)
static

Definition at line 193 of file numbers.cc.

193{ return r->cfInit(0,r); }

◆ ndInvers()

static number ndInvers ( number  a,
const coeffs  r 
)
static

Definition at line 109 of file numbers.cc.

110{
111 number one=r->cfInit(1,r);
112 number res=r->cfDiv(one,a,r);
113 r->cfDelete(&one,r);
114 return res;
115}
CanonicalForm res
Definition: facAbsFact.cc:60

◆ ndInvers_Ring()

static number ndInvers_Ring ( number  a,
const coeffs  r 
)
static

Definition at line 116 of file numbers.cc.

117{
118 if (!r->cfIsUnit(a,r)) Print("ndInvers_Ring used with non-unit\n");
119 number one=r->cfInit(1,r);
120 number res=r->cfDiv(one,a,r);
121 r->cfDelete(&one,r);
122 return res;
123}

◆ ndIsUnit_Field()

static BOOLEAN ndIsUnit_Field ( number  a,
const coeffs  r 
)
static

Definition at line 127 of file numbers.cc.

128{ return !r->cfIsZero(a,r); }

◆ ndIsUnit_Ring()

static BOOLEAN ndIsUnit_Ring ( number  a,
const coeffs  r 
)
static

Definition at line 125 of file numbers.cc.

126{ return r->cfIsOne(a,r)|| r->cfIsMOne(a,r); }

◆ ndKillChar()

static void ndKillChar ( coeffs  )
static

Definition at line 292 of file numbers.cc.

292{}

◆ ndMPZ()

static void ndMPZ ( mpz_t  result,
number &  n,
const coeffs  r 
)
static

Converts a non-negative bigint number into a GMP number.

Definition at line 318 of file numbers.cc.

320{
321 mpz_init_set_si( result, r->cfInt(n, r) );
return result
Definition: facAbsBiFact.cc:75

◆ ndNormalize()

void ndNormalize ( number &  ,
const  coeffs 
)

Definition at line 190 of file numbers.cc.

190{ }

◆ ndParameter()

static number ndParameter ( const int  ,
const coeffs  r 
)
static

Definition at line 171 of file numbers.cc.

172{
173 return r->cfInit(1,r);
174}

◆ ndParDeg()

static int ndParDeg ( number  n,
const coeffs  r 
)
static

Definition at line 166 of file numbers.cc.

167{
168 return (-r->cfIsZero(n,r));
169}

◆ ndPower()

static void ndPower ( number  a,
int  i,
number *  res,
const coeffs  r 
)
static

Definition at line 79 of file numbers.cc.

80{
81 if (i==0)
82 {
83 *res = r->cfInit(1, r);
84 }
85 else if (i==1)
86 {
87 *res = r->cfCopy(a, r);
88 }
89 else if (i==2)
90 {
91 *res = r->cfMult(a, a, r);
92 }
93 else if (i<0)
94 {
95 number b = r->cfInvers(a, r);
96 ndPower(b, -i, res, r);
97 r->cfDelete(&b, r);
98 }
99 else
100 {
101 ndPower(a, i/2, res, r);
102 r->cfInpMult(*res, *res, r);
103 if (i&1)
104 {
105 r->cfInpMult(*res, a, r);
106 }
107 }
108}
int i
Definition: cfEzgcd.cc:132
static void ndPower(number a, int i, number *res, const coeffs r)
Definition: numbers.cc:79

◆ ndQuotRem()

static number ndQuotRem ( number  a,
number  b,
number *  r,
const coeffs  R 
)
static

Definition at line 347 of file numbers.cc.

349{
350 // implementation for a field: r: 0, result: n_Div
351 assume(R->is_field);
352 *r=n_Init(0,R);
353 return n_Div(a,b,R);
static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
return the quotient of 'a' and 'b', i.e., a/b; raises an error if 'b' is not invertible in r exceptio...
Definition: coeffs.h:615
#define R
Definition: sirandom.c:27

◆ ndRandom()

static number ndRandom ( siRandProc  p,
number  p1,
number  p2,
const coeffs  cf 
)
static

Definition at line 131 of file numbers.cc.

132{ return cf->cfInit(p(),cf); }
int p
Definition: cfModGcd.cc:4078

◆ ndRead()

static const char * ndRead ( const char *  s,
number *  ,
const coeffs  r 
)
static

Definition at line 328 of file numbers.cc.

330{
331 Werror("cfRead is undefined for %s",nCoeffString(r));
332 return s;
static FORCE_INLINE char * nCoeffString(const coeffs cf)
TODO: make it a virtual method of coeffs, together with: Decompose & Compose, rParameter & rPar.
Definition: coeffs.h:959

◆ ndReadFd()

number ndReadFd ( const ssiInfo f,
const coeffs  r 
)

Definition at line 155 of file numbers.cc.

156{
157 Warn("ReadFd not implemented for %s (c=%d)",r->cfCoeffName(r),getCoeffType(r));
158 return NULL;
159}
#define Warn
Definition: emacs.cc:77

◆ ndReturn0()

static number ndReturn0 ( number  ,
const coeffs  r 
)
static

Definition at line 191 of file numbers.cc.

191{ return r->cfInit(0,r); }

◆ ndSetChar()

static void ndSetChar ( const  coeffs)
static

Definition at line 293 of file numbers.cc.

293{}

◆ ndSetMap()

static nMapFunc ndSetMap ( const coeffs  src,
const coeffs  dst 
)
static

Definition at line 333 of file numbers.cc.

335{
336 if (src==dst) return ndCopyMap;
337 Werror("cfSetMap is undefined for %s",nCoeffString(dst));
338 return NULL;
number ndCopyMap(number a, const coeffs aRing, const coeffs r)
Definition: numbers.cc:282

◆ ndSize()

static int ndSize ( number  a,
const coeffs  r 
)
static

Definition at line 196 of file numbers.cc.

196{ return (int)r->cfIsZero(a,r)==FALSE; }
#define FALSE
Definition: auxiliary.h:96

◆ ndWriteFd()

static void ndWriteFd ( number  a,
const ssiInfo f,
const coeffs  r 
)
static

Definition at line 161 of file numbers.cc.

162{
163 Warn("WriteFd not implemented for %s (c=%d)",r->cfCoeffName(r),getCoeffType(r));
164}

◆ ndXExtGcd()

static number ndXExtGcd ( number  a,
number  b,
number *  s,
number *  t,
number *  u,
number *  v,
const coeffs  r 
)
static

Definition at line 145 of file numbers.cc.

146{
147 Werror("XExtGcd not implemented for %s (c=%d)",r->cfCoeffName(r),getCoeffType(r));
148 return NULL;
149}

◆ nEati()

char * nEati ( char *  s,
int *  i,
int  m 
)

divide by the first (leading) number and return it, i.e. make monic

does nothing (just returns a dummy one number) helper routine: read an int from a string (mod m), return a pointer to the rest

Definition at line 656 of file numbers.cc.

658{
659
660 if (((*s) >= '0') && ((*s) <= '9'))
661 {
662 unsigned long ii=0L;
663 do
664 {
665 ii *= 10;
666 ii += *s++ - '0';
667 if ((m!=0) && (ii > (MAX_INT_VAL / 10))) ii = ii % m;
668 }
669 while (((*s) >= '0') && ((*s) <= '9'));
670 if ((m!=0) && (ii>=(unsigned)m)) ii=ii%m;
671 *i=(int)ii;
672 }
673 else (*i) = 1;
674 return s;
const int MAX_INT_VAL
Definition: mylimits.h:12

◆ nEatLong()

char * nEatLong ( char *  s,
mpz_ptr  i 
)

extracts a long integer from s, returns the rest

Definition at line 677 of file numbers.cc.

679{
680 const char * start=s;
681
682 while (*s >= '0' && *s <= '9') s++;
683 if (*s=='\0')
684 {
685 mpz_set_str(i,start,10);
686 }
687 else
688 {
689 char c=*s;
690 *s='\0';
691 mpz_set_str(i,start,10);
692 *s=c;
693 }
694 return s;

◆ nFindCoeffByName()

coeffs nFindCoeffByName ( char *  cf_name)

find an existing coeff by its "CoeffName"

Definition at line 624 of file numbers.cc.

626{
628 // try existings coeffs:
629 while(n!=NULL)
630 {
631 if ((n->cfCoeffName!=NULL)
632 && (strcmp(cf_name,n->cfCoeffName(n))==0)) return n;
633 n=n->next;
634 }
635 // TODO: parametrized cf, e.g. flint:Z/26[a]
636 // try existing types:
637 nFindCoeffByName_p p=nFindCoeffByName_Root;
638 while(p!=NULL)
639 {
640 coeffs cf=p->p(cf_name,p->n);
641 if (cf!=NULL) return cf;
642 p=p->next;
643 }
644 return NULL;
The main handler for Singular numbers which are suitable for Singular polynomials.
VAR nFindCoeffByName_p nFindCoeffByName_Root
Definition: numbers.cc:614
VAR n_Procs_s * cf_root
Definition: numbers.cc:45
coeffs next
Definition: coeffs.h:125
char *(* cfCoeffName)(const coeffs r)
default name of cf, should substitue cfCoeffWrite, cfCoeffString
Definition: coeffs.h:154

◆ nInitChar()

coeffs nInitChar ( n_coeffType  t,
void *  parameter 
)

one-time initialisations for new coeffs in case of an error return NULL

Definition at line 392 of file numbers.cc.

394{
396
397 while((n!=NULL) && (n->nCoeffIsEqual!=NULL) && (!n->nCoeffIsEqual(n,t,parameter)))
398 n=n->next;
399
400 if (n==NULL)
401 {
402 n=(n_Procs_s*)omAlloc0(sizeof(n_Procs_s));
403 n->next=cf_root;
404 n->ref=1;
405 n->type=t;
406
407 // default entries (different from NULL) for some routines:
409 n->cfSize = ndSize;
413 n->cfDelete= ndDelete;
414 n->cfAnn = ndAnn;
417 n->cfCoeffName = ndCoeffName; // should alway be changed!
420 n->cfCopy = ndCopy;
421 n->cfIntMod=ndIntMod; /* dummy !! */
423 n->cfGcd = ndGcd;
424 n->cfNormalizeHelper = ndGcd; /* tricky, isn't it ?*/
425 n->cfLcm = ndGcd; /* tricky, isn't it ?*/
426 n->cfInitMPZ = ndInitMPZ;
427 n->cfMPZ = ndMPZ;
428 n->cfPower = ndPower;
429 n->cfQuotRem = ndQuotRem;
430 n->cfInvers = ndInvers;
431 n->cfRandom = ndRandom;
432
433 n->cfKillChar = ndKillChar; /* dummy */
434 n->cfSetChar = ndSetChar; /* dummy */
435 // temp. removed to catch all the coeffs which miss to implement this!
436
437 n->cfChineseRemainder = ndChineseRemainder; /* not implemented */
438 n->cfFarey = ndFarey; /* not implemented */
439 n->cfParDeg = ndParDeg; /* not implemented */
440 n->cfReadFd = ndReadFd; /* not implemented */
441 n->cfWriteFd = ndWriteFd; /* not implemented */
442
444
447
448 n->cfEucNorm = ndEucNorm;
449#ifdef HAVE_RINGS
450 n->cfDivComp = ndDivComp;
451 n->cfDivBy = ndDivBy;
452 n->cfExtGcd = ndExtGcd;
453 n->cfXExtGcd = ndXExtGcd;
454 //n->cfGetUnit = ndGetUnit_Ring;// set afterwards
455#endif
456
457 // report error, if not redefined
458 n->cfRead=ndRead;
460
461#ifdef LDEBUG
463#endif
464
467
468 BOOLEAN nOK=TRUE;
469 // init
470 if ((t<=nLastCoeffs) && (nInitCharTable[t]!=NULL))
471 nOK = (nInitCharTable[t])(n,parameter);
472 else
473 Werror("Sorry: the coeff type [%d] was not registered: it is missing in nInitCharTable", (int)t);
474 if (nOK)
475 {
476 omFreeSize(n,sizeof(*n));
477 return NULL;
478 }
479 cf_root=n;
480 // post init settings:
481 if (n->cfRePart==NULL) n->cfRePart=n->cfCopy;
482 if (n->cfExactDiv==NULL) n->cfExactDiv=n->cfDiv;
483 if (n->cfSubringGcd==NULL) n->cfSubringGcd=n->cfGcd;
484 if (n->cfWriteShort==NULL) n->cfWriteShort = n->cfWriteLong;
485 if (n->cfIsUnit==NULL)
486 {
488 else n->cfIsUnit=ndIsUnit_Ring;
489 }
490 #ifdef HAVE_RINGS
491 if (n->cfGetUnit==NULL)
492 {
493 if (n->is_field) n->cfGetUnit=n->cfCopy;
495 }
496 if ((n->cfInvers==ndInvers)&&(n->is_field))
497 {
499 }
500 #endif
501
502
503 if(n->cfMult==NULL) PrintS("cfMult missing\n");
504 if(n->cfSub==NULL) PrintS("cfSub missing\n");
505 if(n->cfAdd==NULL) PrintS("cfAdd missing\n");
506 if(n->cfDiv==NULL) PrintS("cfDiv missing\n");
507 if(n->cfExactDiv==NULL) PrintS("cfExactDiv missing\n");
508 if(n->cfInit==NULL) PrintS("cfInit missing\n");
509 if(n->cfInt==NULL) PrintS("cfInt missing\n");
510 if(n->cfIsUnit==NULL) PrintS("cfIsUnit missing\n");
511 if(n->cfGetUnit==NULL) PrintS("cfGetUnit missing\n");
512 if(n->cfInpNeg==NULL) PrintS("cfInpNeg missing\n");
513 if(n->cfXExtGcd==NULL) PrintS("cfXExtGcd missing\n");
514 if(n->cfAnn==NULL) PrintS("cfAnn missing\n");
515 if(n->cfWriteLong==NULL) PrintS("cfWriteLong missing\n");
516
518
519 assume( (n->iNumberOfParameters == 0 && n->pParameterNames == NULL) ||
520 (n->iNumberOfParameters > 0 && n->pParameterNames != NULL) );
521
522
523 if(n->cfGreater==NULL) PrintS("cfGreater missing\n");
524 if(n->cfEqual==NULL) PrintS("cfEqual missing\n");
525 if(n->cfIsZero==NULL) PrintS("cfIsZero missing\n");
526 if(n->cfIsOne==NULL) PrintS("cfIsOne missing\n");
527 if(n->cfIsMOne==NULL) PrintS("cfIsMOne missing\n");
528 if(n->cfGreaterZero==NULL) PrintS("cfGreaterZero missing\n");
529 /* error reporter:
530 if(n->cfRead==ndRead) PrintS("cfRead missing\n");
531 if(n->cfSetMap==ndSetMap) PrintS("cfSetMap missing\n");
532 */
533
534 assume(n->type==t);
535
536#ifndef SING_NDEBUG
537 if(n->cfWriteLong==NULL) Warn("cfWrite is NULL for coeff %d",t);
538 if(n->cfWriteShort==NULL) Warn("cfWriteShort is NULL for coeff %d",t);
539#endif
540 }
541 else
542 {
543 n->ref++;
544 }
545 return n;
static BOOLEAN ndIsUnit_Field(number a, const coeffs r)
Definition: numbers.cc:127
CanonicalForm ndConvSingNFactoryN(number, BOOLEAN, const coeffs)
Definition: numbers.cc:303
static int ndDivComp(number, number, const coeffs)
Definition: numbers.cc:299
static number ndEucNorm(number a, const coeffs cf)
Definition: numbers.cc:133
static number ndGetUnit_Ring(number, const coeffs r)
Definition: numbers.cc:129
static BOOLEAN ndDBTest(number, const char *, const int, const coeffs)
Definition: numbers.cc:137
number ndGcd(number, number, const coeffs r)
Definition: numbers.cc:192
static void ndKillChar(coeffs)
Definition: numbers.cc:292
static number ndConvFactoryNSingN(const CanonicalForm, const coeffs)
[in, out] a bigint number >= 0
Definition: numbers.cc:310
static void ndClearDenominators(ICoeffsEnumerator &, number &d, const coeffs r)
Definition: numbers.cc:272
static void ndClearContent(ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs r)
Definition: numbers.cc:198
number ndReadFd(const ssiInfo *f, const coeffs r)
Definition: numbers.cc:155
static int ndParDeg(number n, const coeffs r)
Definition: numbers.cc:166
static BOOLEAN ndCoeffIsEqual(const coeffs r, n_coeffType n, void *)
Definition: numbers.cc:340
static BOOLEAN ndIsUnit_Ring(number a, const coeffs r)
Definition: numbers.cc:125
void ndNormalize(number &, const coeffs)
Definition: numbers.cc:190
static int ndSize(number a, const coeffs r)
Definition: numbers.cc:196
static number ndIntMod(number, number, const coeffs r)
Definition: numbers.cc:193
void ndInpAdd(number &a, number b, const coeffs r)
Definition: numbers.cc:72
static void ndWriteFd(number a, const ssiInfo *f, const coeffs r)
Definition: numbers.cc:161
static number ndFarey(number, number, const coeffs r)
Definition: numbers.cc:140
static void ndMPZ(mpz_t result, number &n, const coeffs r)
Converts a non-negative bigint number into a GMP number.
Definition: numbers.cc:318
STATIC_VAR n_coeffType nLastCoeffs
Definition: numbers.cc:354
static number ndAnn(number, const coeffs)
Definition: numbers.cc:51
static number ndGetDenom(number &, const coeffs r)
Definition: numbers.cc:194
static void ndDelete(number *d, const coeffs)
Definition: numbers.cc:50
STATIC_VAR cfInitCharProc * nInitCharTable
Definition: numbers.cc:388
static number ndInvers_Ring(number a, const coeffs r)
Definition: numbers.cc:116
static number ndParameter(const int, const coeffs r)
Definition: numbers.cc:171
static number ndXExtGcd(number a, number b, number *s, number *t, number *u, number *v, const coeffs r)
Definition: numbers.cc:145
static number ndCopy(number a, const coeffs)
Definition: numbers.cc:281
static void ndInpMult(number &a, number b, const coeffs r)
Definition: numbers.cc:66
static number ndChineseRemainder(number *, number *, int, BOOLEAN, CFArray &, const coeffs r)
Definition: numbers.cc:150
static char * ndCoeffString(const coeffs r)
Definition: numbers.cc:52
static number ndGetNumerator(number &a, const coeffs r)
Definition: numbers.cc:195
static BOOLEAN ndDivBy(number, number, const coeffs)
Definition: numbers.cc:298
static number ndInitMPZ(mpz_t m, const coeffs r)
Definition: numbers.cc:323
static nMapFunc ndSetMap(const coeffs src, const coeffs dst)
Definition: numbers.cc:333
static const char * ndRead(const char *s, number *, const coeffs r)
Definition: numbers.cc:328
static number ndInvers(number a, const coeffs r)
Definition: numbers.cc:109
static void ndCoeffWrite(const coeffs r, BOOLEAN)
Definition: numbers.cc:56
static number ndRandom(siRandProc p, number p1, number p2, const coeffs cf)
Definition: numbers.cc:131
static number ndReturn0(number, const coeffs r)
Definition: numbers.cc:191
static number ndExtGcd(number, number, number *, number *, const coeffs r)
Definition: numbers.cc:300
static number ndQuotRem(number a, number b, number *r, const coeffs R)
Definition: numbers.cc:347
static char * ndCoeffName(const coeffs r)
Definition: numbers.cc:60
static void ndSetChar(const coeffs)
Definition: numbers.cc:293
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
#define omAlloc0(size)
Definition: omAllocDecl.h:211
BOOLEAN(* cfIsUnit)(number a, const coeffs r)
Definition: coeffs.h:378
number(* cfChineseRemainder)(number *x, number *q, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs)
chinese remainder returns X with X mod q[i]=x[i], i=0..rl-1
Definition: coeffs.h:297
number(* cfNormalizeHelper)(number a, number b, const coeffs r)
Definition: coeffs.h:271
int(* cfDivComp)(number a, number b, const coeffs r)
Definition: coeffs.h:377
BOOLEAN(*)(*)(*)(*)(*)(*) cfGreaterZero(number a, const coeffs r)
Definition: coeffs.h:237
number(* cfExtGcd)(number a, number b, number *s, number *t, const coeffs r)
Definition: coeffs.h:248
number(* cfGetUnit)(number a, const coeffs r)
Definition: coeffs.h:379
number(* cfLcm)(number a, number b, const coeffs r)
Definition: coeffs.h:270
number(* cfGetNumerator)(number &n, const coeffs r)
Definition: coeffs.h:241
number(* cfInvers)(number a, const coeffs r)
return 1/a
Definition: coeffs.h:197
number(* cfInit)(long i, const coeffs r)
init with an integer
Definition: coeffs.h:178
int iNumberOfParameters
Number of Parameters in the coeffs (default 0)
Definition: coeffs.h:319
number(* cfInpNeg)(number a, const coeffs r)
changes argument inline: a:= -a return -a! (no copy is returned) the result should be assigned to the...
Definition: coeffs.h:195
number(* cfInitMPZ)(mpz_t i, const coeffs r)
init with a GMP integer
Definition: coeffs.h:181
BOOLEAN is_field
TRUE, if cf is a field.
Definition: coeffs.h:140
nMapFunc(* cfSetMap)(const coeffs src, const coeffs dst)
Definition: coeffs.h:275
number(* cfParameter)(const int i, const coeffs r)
create i^th parameter or NULL if not possible
Definition: coeffs.h:303
void(* cfSetChar)(const coeffs r)
Definition: coeffs.h:161
number(* convFactoryNSingN)(const CanonicalForm n, const coeffs r)
conversion to CanonicalForm(factory) to number
Definition: coeffs.h:315
number(* cfGcd)(number a, number b, const coeffs r)
Definition: coeffs.h:246
number(* cfImPart)(number a, const coeffs r)
Definition: coeffs.h:201
number(* cfFarey)(number p, number n, const coeffs)
rational reconstruction: "best" rational a/b with a/b = p mod n
Definition: coeffs.h:291
number(* cfCopy)(number a, const coeffs r)
return a copy of a
Definition: coeffs.h:199
int ref
Definition: coeffs.h:126
BOOLEAN(*)(*)(*) cfIsZero(number a, const coeffs r)
Definition: coeffs.h:228
void(* cfKillChar)(coeffs r)
Definition: coeffs.h:159
BOOLEAN(*)(*) cfEqual(number a, number b, const coeffs r)
tests
Definition: coeffs.h:227
numberfunc cfIntMod
Definition: coeffs.h:175
numberfunc cfExactDiv
Definition: coeffs.h:175
void(* cfMPZ)(mpz_t result, number &n, const coeffs r)
Converts a (integer) number n into a GMP number, 0 if impossible.
Definition: coeffs.h:190
BOOLEAN(* nCoeffIsEqual)(const coeffs r, n_coeffType n, void *parameter)
Definition: coeffs.h:145
number(* cfXExtGcd)(number a, number b, number *s, number *t, number *u, number *v, const coeffs r)
Definition: coeffs.h:256
void(* cfWriteShort)(number a, const coeffs r)
print a given number in a shorter way, if possible e.g. in K(a): a2 instead of a^2
Definition: coeffs.h:208
number(* cfRePart)(number a, const coeffs r)
Definition: coeffs.h:200
void(* cfNormalize)(number &a, const coeffs r)
Definition: coeffs.h:223
numberfunc cfMult
Definition: coeffs.h:175
number(* cfGetDenom)(number &n, const coeffs r)
Definition: coeffs.h:240
void(* cfWriteLong)(number a, const coeffs r)
print a given number (long format)
Definition: coeffs.h:204
number(* cfSubringGcd)(number a, number b, const coeffs r)
Definition: coeffs.h:247
BOOLEAN(*)(*)(*)(*) cfIsOne(number a, const coeffs r)
Definition: coeffs.h:229
number(* cfEucNorm)(number a, const coeffs r)
Definition: coeffs.h:258
number(* cfAnn)(number a, const coeffs r)
Definition: coeffs.h:261
char *(* cfCoeffString)(const coeffs r)
string output of coeff description
Definition: coeffs.h:151
number(* cfReadFd)(const ssiInfo *f, const coeffs r)
Definition: coeffs.h:278
void(* cfPower)(number a, int i, number *result, const coeffs r)
Definition: coeffs.h:239
CanonicalForm(* convSingNFactoryN)(number n, BOOLEAN setChar, const coeffs r)
Definition: coeffs.h:316
long(* cfInt)(number &n, const coeffs r)
convertion to long, 0 if impossible
Definition: coeffs.h:187
BOOLEAN(* cfGreater)(number a, number b, const coeffs r)
Definition: coeffs.h:225
number(* cfQuotRem)(number a, number b, number *rem, const coeffs r)
Definition: coeffs.h:269
void(* cfCoeffWrite)(const coeffs r, BOOLEAN details)
output of coeff description via Print
Definition: coeffs.h:148
void(* cfDelete)(number *a, const coeffs r)
Definition: coeffs.h:272
numberfunc cfSub
Definition: coeffs.h:175
BOOLEAN(* cfDBTest)(number a, const char *f, const int l, const coeffs r)
Test: is "a" a correct number?
Definition: coeffs.h:415
void(* cfWriteFd)(number a, const ssiInfo *f, const coeffs r)
Definition: coeffs.h:277
n_coeffType type
Definition: coeffs.h:128
numberfunc cfAdd
Definition: coeffs.h:175
number(* cfRandom)(siRandProc p, number p1, number p2, const coeffs cf)
a function returning random elements
Definition: coeffs.h:306
BOOLEAN(*)(*)(*)(*)(*) cfIsMOne(number a, const coeffs r)
Definition: coeffs.h:232
numberfunc cfDiv
Definition: coeffs.h:175
char const ** pParameterNames
array containing the names of Parameters (default NULL)
Definition: coeffs.h:322
int(* cfParDeg)(number x, const coeffs r)
degree for coeffcients: -1 for 0, 0 for "constants", ...
Definition: coeffs.h:300
void(* cfInpMult)(number &a, number b, const coeffs r)
Inplace: a *= b.
Definition: coeffs.h:281
int(* cfSize)(number n, const coeffs r)
how complicated, (0) => 0, or positive
Definition: coeffs.h:184
void(* cfInpAdd)(number &a, number b, const coeffs r)
Inplace: a += b.
Definition: coeffs.h:284
BOOLEAN(* cfDivBy)(number a, number b, const coeffs r)
Definition: coeffs.h:381
nCoeffsEnumeratorFunc cfClearContent
function pointer behind n_ClearContent
Definition: coeffs.h:309
nCoeffsEnumeratorFunc cfClearDenominators
function pointer behind n_ClearDenominators
Definition: coeffs.h:312
const char *(* cfRead)(const char *s, number *a, const coeffs r)
Definition: coeffs.h:221

◆ nKillChar()

void nKillChar ( coeffs  r)

undo all initialisations

Definition at line 547 of file numbers.cc.

549{
550 if (r!=NULL)
551 {
552 r->ref--;
553 if (r->ref<=0)
554 {
555 n_Procs_s tmp;
556 n_Procs_s* n=&tmp;
557 tmp.next=cf_root;
558 while((n->next!=NULL) && (n->next!=r)) n=n->next;
559 if (n->next==r)
560 {
561 n->next=n->next->next;
562 if (cf_root==r) cf_root=n->next;
563 assume (r->cfKillChar!=NULL); r->cfKillChar(r);
564 omFreeSize((void *)r, sizeof(n_Procs_s));
565 r=NULL;
566 }
567 else
568 {
569 WarnS("cf_root list destroyed");
570 }
571 }
572 }
#define WarnS
Definition: emacs.cc:78

◆ nNew()

void nNew ( number *  d)

Definition at line 47 of file numbers.cc.

47{ *d=NULL; }

◆ nRegister()

n_coeffType nRegister ( n_coeffType  n,
cfInitCharProc  p 
)

Definition at line 574 of file numbers.cc.

576{
577 if (n==n_unknown)
578 {
581 {
583 ((int)nLastCoeffs+1)*sizeof(cfInitCharProc));
585 ((int)nLastCoeffs)*sizeof(cfInitCharProc));
586 }
587 else
588 {
590 ((int)nLastCoeffs)*sizeof(cfInitCharProc),
591 (((int)nLastCoeffs)+1)*sizeof(cfInitCharProc));
592 }
593
595 return nLastCoeffs;
596 }
597 else
598 {
599 if (nInitCharTable[n]!=NULL) Print("coeff %d already initialized\n",n);
600 nInitCharTable[n]=p;
601 return n;
602 }
n_coeffType
Definition: coeffs.h:27
@ n_unknown
Definition: coeffs.h:28
VAR cfInitCharProc nInitCharTableDefault[]
Definition: numbers.cc:355
BOOLEAN(* cfInitCharProc)(coeffs, void *)
initialize an object of type coeff, return FALSE in case of success
Definition: numbers.h:94
#define omReallocSize(addr, o_size, size)
Definition: omAllocDecl.h:220

◆ nRegisterCfByName()

void nRegisterCfByName ( cfInitCfByNameProc  p,
n_coeffType  n 
)

Definition at line 615 of file numbers.cc.

617{
618 nFindCoeffByName_p h=(nFindCoeffByName_p)omAlloc0(sizeof(*h));
619 h->p=p;
620 h->n=n;
STATIC_VAR Poly * h
Definition: janet.cc:971

Variable Documentation

◆ cf_root

VAR n_Procs_s* cf_root =NULL

Definition at line 45 of file numbers.cc.

◆ nFindCoeffByName_Root

VAR nFindCoeffByName_p nFindCoeffByName_Root =NULL

Definition at line 614 of file numbers.cc.

◆ nInitCharTable

Definition at line 388 of file numbers.cc.

◆ nInitCharTableDefault

VAR cfInitCharProc nInitCharTableDefault[]

Definition at line 355 of file numbers.cc.

◆ nLastCoeffs

STATIC_VAR n_coeffType nLastCoeffs =n_CF

Definition at line 354 of file numbers.cc.