My Project  UNKNOWN_GIT_VERSION
number2.h
Go to the documentation of this file.
1 #ifndef NUMBER2_H
2 #define NUMBER2_H
3 
4 #include "kernel/mod2.h"
5 
6 #include "omalloc/omalloc.h"
7 #include "coeffs/coeffs.h"
8 #include "kernel/structs.h"
9 #ifdef SINGULAR_4_2
10 struct snumber2;
11 struct spoly2;
12 typedef struct snumber2 * number2;
13 typedef struct spoly2 * poly2;
14 struct snumber2
15 { coeffs cf;
16  number n;
17 };
18 
19 struct spoly2
20 { ring cf;
21  poly n;
22 };
23 
24 static inline number2 n2Init(long i, coeffs c)
25 { number2 N=(number2)omAlloc0(sizeof(snumber2)); if (c!=NULL) { N->cf=c; N->n=n_Init(i,c);} return N;}
26 
27 static inline poly2 p2Init(long i, ring c)
28 { poly2 N=(poly2)omAlloc0(sizeof(spoly2)); if (c!=NULL) { N->cf=c; N->n=p_ISet(i,c);} return N;}
29 
30 // type conversion:
31 BOOLEAN jjNUMBER2CR(leftv res, leftv a, leftv b); // <any>,cring ->number2
32 BOOLEAN jjN2_CR(leftv res, leftv a); // number2 ->cring
33 BOOLEAN jjCM_CR(leftv res, leftv a); // cmatrix ->cring
34 BOOLEAN jjBIM2_CR(leftv res, leftv a); // bigint ->cring
35 BOOLEAN jjN2_N(leftv res, leftv a); // number2 ->number
36 BOOLEAN jjP2_R(leftv res, leftv a); // poly2 ->ring
37 // operations:
38 BOOLEAN jjNUMBER2_OP1(leftv res, leftv a);
39 BOOLEAN jjNUMBER2_OP2(leftv res, leftv a, leftv b);
40 BOOLEAN jjNUMBER2_POW(leftv res, leftv a, leftv b);
41 BOOLEAN jjPOLY2_OP1(leftv res, leftv a);
42 BOOLEAN jjPOLY2_OP2(leftv res, leftv a, leftv b);
43 BOOLEAN jjPOLY2_POW(leftv res, leftv a, leftv b);
44 
45 number2 n2Copy(const number2 d);
46 void n2Delete(number2 &d);
47 char *n2String(number2 d, BOOLEAN typed);
48 void n2Print(number2 d);
49 
50 poly2 p2Copy(const poly2 d);
51 void p2Delete(poly2 &d);
52 char *p2String(poly2 d, BOOLEAN typed);
53 void p2Print(poly2 d);
54 
55 BOOLEAN jjCMATRIX_3(leftv, leftv, leftv,leftv);
56 #endif
57 char *crString(coeffs c);
58 
59 void crPrint(coeffs cf);
60 
61 BOOLEAN jjR2_CR(leftv res, leftv a); // ring ->cring
62 
65 
66 BOOLEAN jjEQUAL_CR(leftv res, leftv a, leftv b); // compare cring
67 
68 #endif
omalloc.h
crString
char * crString(coeffs c)
Definition: number2.cc:17
cf
CanonicalForm cf
Definition: cfModGcd.cc:4024
jjR2_CR
BOOLEAN jjR2_CR(leftv res, leftv a)
Definition: number2.cc:132
N
const CanonicalForm CFMap CFMap & N
Definition: cfEzgcd.cc:49
sleftv
Class used for (list of) interpreter objects.
Definition: subexpr.h:83
b
CanonicalForm b
Definition: cfModGcd.cc:4044
crPrint
void crPrint(coeffs cf)
Definition: number2.cc:25
i
int i
Definition: cfEzgcd.cc:125
res
CanonicalForm res
Definition: facAbsFact.cc:64
jjCRING_Zp
BOOLEAN jjCRING_Zp(leftv res, leftv a, leftv b)
Definition: number2.cc:35
BOOLEAN
int BOOLEAN
Definition: auxiliary.h:85
structs.h
mod2.h
coeffs
The main handler for Singular numbers which are suitable for Singular polynomials.
n_Init
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
jjCRING_Zm
BOOLEAN jjCRING_Zm(leftv res, leftv a, leftv b)
Definition: number2.cc:88
NULL
#define NULL
Definition: omList.c:10
jjEQUAL_CR
BOOLEAN jjEQUAL_CR(leftv res, leftv a, leftv b)
Definition: number2.cc:124
p_ISet
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
Definition: p_polys.cc:1289
omAlloc0
#define omAlloc0(size)
Definition: omAllocDecl.h:211
coeffs.h
Coefficient rings, fields and other domains suitable for Singular polynomials.