58 int __i = (_i), __j=(_j); \
63 for (
int i=0;
i<
nm;
i++)
64 for (
int j=
i+1;
j<
nm;
j++)
70 for(
int j=0;
j<n;
j++)
75 for (
int i=
nm;
i<n;
i++)
76 for(
int j=0;
j<
m;
j++)
151 for (
int i=0;
i <
l;
i++)
161 if (&
lhr == &
rhr) {
return true; }
162 if (
lhr.cols() !=
rhr.cols()) {
return false; }
163 if (
lhr.rows() !=
rhr.rows()) {
return false; }
164 if (
lhr.basecoeffs() !=
rhr.basecoeffs()) {
return false; }
166 const int l = (
lhr.rows())*(
lhr.cols());
168 for (
int i=0;
i <
l;
i++)
211 for (
i=1;
i<=
mn;
i++)
247 for (
i=1;
i<=
mn;
i++)
258 const int cb =
b->cols();
261 const int rb =
b->rows();
266 Werror(
"wrong bigintmat sizes at multiplication a * b: acols: %d != brows: %d\n",
ca,
rb);
283 for (
i=1;
i<=
ra;
i++)
284 for (
j=1;
j<=
cb;
j++)
288 for (
k=1;
k<=
ca;
k++)
344 for (
int i=0;
i<(
b->rows())*(
b->cols());
i++)
345 (*iv)[
i] =
n_Int((*
b)[
i],
b->basecoeffs());
351 const int l = (
b->rows())*(
b->cols());
354 for (
int i=0;
i <
l;
i++)
368 WerrorS(
"wrong bigintmat comparison: different basecoeffs!\n");
371 if ((
col!=1) ||(op->
cols()!=1))
417 for(
int i=1;
i<=
m;
i++)
419 for(
int j=1;
j< n;
j++)
456 WerrorS(
"not enough space to print bigintmat");
457 WerrorS(
"try string(...) for a unformatted output");
552 for (
int i=0;
i<rows;
i++)
557 min = floor(log10((
double)cols))+floor(log10((
double)rows))+5;
566 min = floor(log10((
double)cols))+floor(log10((
double)rows))+5;
578 int const c = (
col-1)+1;
683 if ((
i <=
col) && (
j <=
col) && (
i>0) && (
j>0))
687 for (
int k=1;
k<=
row;
k++)
702 if ((
i <=
row) && (
j <=
row) && (
i>0) && (
j>0))
706 for (
int k=1;
k<=
col;
k++)
721 for (
int j=1;
j<=
col;
j++)
733 for (
int i=
row;
i>=1;
i--)
749 WerrorS(
"Error in getcol. Dimensions must agree!");
789 if ((
i>
row) || (
i<1))
791 WerrorS(
"Error in getrow: Index out of range!");
796 WerrorS(
"Error in getrow. Dimensions must agree!");
824 if ((
j>
col) || (
j<1))
826 WerrorS(
"Error in setcol: Index out of range!");
829 if (((
m->rows() !=
row) || (
m->cols() != 1)) && ((
m->rows() != 1) || (
m->cols() !=
row)))
831 WerrorS(
"Error in setcol. Dimensions must agree!");
838 for (
int i=1;
i<=
row;
i++)
849 for (
int i=1;
i<=
row;
i++)
858 if ((
j>
row) || (
j<1))
860 WerrorS(
"Error in setrow: Index out of range!");
863 if (((
m->rows() != 1) || (
m->cols() !=
col)) && ((
m->rows() !=
col) || (
m->cols() != 1)))
865 WerrorS(
"Error in setrow. Dimensions must agree!");
872 for (
int i=1;
i<=
col;
i++)
883 for (
int i=1;
i<=
col;
i++)
892 if ((
b->rows() !=
row) || (
b->cols() !=
col))
894 WerrorS(
"Error in bigintmat::add. Dimensions do not agree!");
899 WerrorS(
"Error in bigintmat::add. coeffs do not agree!");
902 for (
int i=1;
i<=
row;
i++)
904 for (
int j=1;
j<=
col;
j++)
914 if ((
b->rows() !=
row) || (
b->cols() !=
col))
916 WerrorS(
"Error in bigintmat::sub. Dimensions do not agree!");
921 WerrorS(
"Error in bigintmat::sub. coeffs do not agree!");
924 for (
int i=1;
i<=
row;
i++)
926 for (
int j=1;
j<=
col;
j++)
943 for (
int i=1;
i<=
row;
i++)
945 for (
int j=1;
j<=
col;
j++)
959 WerrorS(
"Error in addcol: Index out of range!");
964 WerrorS(
"Error in addcol: coeffs do not agree!");
968 for (
int k=1;
k<=
row;
k++)
983 WerrorS(
"Error in addrow: Index out of range!");
988 WerrorS(
"Error in addrow: coeffs do not agree!");
992 for (
int k=1;
k<=
col;
k++)
1008 for (
int j=1;
j<=
row;
j++)
1016 WerrorS(
"Error in colskalmult");
1024 for (
int j=1;
j<=
col;
j++)
1032 WerrorS(
"Error in rowskalmult");
1044 WerrorS(
"Error in concatrow. Dimensions must agree!");
1049 WerrorS(
"Error in concatrow. coeffs do not agree!");
1052 for (
int i=1;
i<=
ax;
i++)
1054 for (
int j=1;
j<=
ay;
j++)
1061 for (
int i=1;
i<=
bx;
i++)
1063 for (
int j=1;
j<=
by;
j++)
1089 tmp->concatcol(
this, a);
1105 for (
int i=1;
i<=
ax;
i++)
1107 for (
int j=1;
j<=
ay;
j++)
1113 for (
int i=1;
i<=
bx;
i++)
1115 for (
int j=1;
j<=
by;
j++)
1132 WerrorS(
"Error in splitrow. Dimensions must agree!");
1136 WerrorS(
"Error in splitrow. Dimensions must agree!");
1140 WerrorS(
"Error in splitrow. coeffs do not agree!");
1144 for(
int i = 1;
i<=
ax;
i++)
1146 for(
int j = 1;
j<=
ay;
j++)
1153 for (
int i =1;
i<=
bx;
i++)
1174 WerrorS(
"Error in splitcol. Dimensions must agree!");
1178 WerrorS(
"Error in splitcol. Dimensions must agree!");
1182 WerrorS(
"Error in splitcol. coeffs do not agree!");
1186 for (
int i=1;
i<=
ax;
i++)
1188 for (
int j=1;
j<=
ay;
j++)
1194 for (
int i=1;
i<=
bx;
i++)
1196 for (
int j=1;
j<=
by;
j++)
1210 WerrorS(
"Error in splitcol. Dimensions must agree!");
1215 WerrorS(
"Error in splitcol. coeffs do not agree!");
1221 for (
int k=1;
k<=
row;
k++)
1235 WerrorS(
"Error in Marco-splitrow");
1241 WerrorS(
"Error in splitrow. coeffs do not agree!");
1247 for (
int k=1;
k<=
col;
k++)
1257 if ((
b->rows() !=
row) || (
b->cols() !=
col))
1259 WerrorS(
"Error in bigintmat::copy. Dimensions do not agree!");
1264 WerrorS(
"Error in bigintmat::copy. coeffs do not agree!");
1268 for (
int i=1;
i<=
row;
i++)
1270 for (
int j=1;
j<=
col;
j++)
1286 for (
int i=1;
i<=n;
i++)
1288 for (
int j=1;
j<=
m;
j++)
1290 t1 =
B->view(a+
i-1,
b+
j-1);
1291 set(c+
i-1, d+
j-1, t1);
1301 for (
int i=1;
i<=
row;
i++)
1303 for (
int j=1;
j<=
col;
j++)
1327 for (
int i=1;
i<=
row;
i++)
1329 for (
int j=1;
j<=
col;
j++)
1349 for (
int i=1;
i<=
row;
i++)
1351 for (
int j=1;
j<=
col;
j++)
1361 for (
int i=1;
i<=
row;
i++) {
1362 for (
int j=1;
j<=
col;
j++) {
1386 for (
int k=1;
k<=
row;
k++) {
1390 for (
int l=1;
l<=
col;
l++)
1423 m->concatrow(a,
this);
1429 for (
int i=1;
i<=
col;
i++) {
1431 for (
int j=
i+1;
j<=
col;
j++) {
1444 for (
int j=1;
j<=
col;
j++) {
1446 for (
int i=1;
i<=2*
row;
i++) {
1455 m->colskaldiv(
j,
g);
1463 for (
int i=1;
i<=
col;
i++) {
1477 for (
int j=1;
j<=
col;
j++) {
1500 for(
int i=2;
i<=
col;
i++) {
1522 for (
int i=1;
i<=
row;
i++) {
1529 if ((
i+1)>>1<<1==(
i+1))
1551 for (
int i=1;
i<=
col;
i++) {
1607 for (
int c =
cols(); c>0; c--) {
1682 while ((
i>0) && (
j>0))
1692 for (
int l=1;
l<=
j-1;
l++)
1809 for (
int i=1;
i<=a->
rows();
i++)
1811 for (
int j=1;
j<=a->
cols();
j++)
1841 C->
set(piv, piv,
p,
R);
1860 for (
int i=1;
i<=
row;
i++)
1862 for (
int j=1;
j<=
col;
j++)
1875 for (
int i=1;
i<=
row;
i++)
1888 for (
int i=1;
i<=
row;
i++)
1916 for (
int i=1;
i<=
row;
i++)
1918 for (
int j=1;
j<=
col;
j++)
1932 WerrorS(
"Error in bimMult. Coeffs do not agree!");
1935 if ((a->
rows() != c->
rows()) || (
b->cols() != c->
cols()) || (a->
cols() !=
b->rows()))
1937 WerrorS(
"Error in bimMult. Dimensions do not agree!");
1953 PrintS(
"reduce_mod_howell: A:\n");
1973 PrintS(
"\n****************************************\n");
1979 for(
int i=1;
i<=
b->cols();
i++)
1983 for(
int j =
B->rows();
j>0;
j--)
2005 x->rawset(
x->rows() -
B->rows() +
j,
i, q);
2006 for(
int k=
j;
k>
B->rows() -
A->rows();
k--)
2028 PrintS(
"\n****************************************\n");
2036 m->copySubmatInto(
A, 1, 1,
A->rows(),
A->cols(),
A->cols()+1, 1);
2038 for(
int i=1;
i<=
A->cols();
i++)
2051 for(
int i=1;
i<=
A->rows();
i++)
2053 for(
int j=1;
j<=
A->cols();
j++)
2082 PrintS(
"den increasing to ");
2093 PrintS(
"bimFarey worked\n");
2118 Hp->copySubmatInto(
m,
A->cols()+1, 1,
A->rows(),
A->cols(), 1, 1);
2120 Tp->copySubmatInto(
m, 1, 1,
A->cols(),
A->cols(), 1, 1);
2124 for(
i=1;
i<=
A->cols();
i++)
2126 for(
j=
m->rows();
j>
A->cols();
j--)
2130 if (
j>
A->cols())
break;
2134 kp->copySubmatInto(
Tp, 1, 1,
A->cols(),
i-1, 1, 1);
2150 x->skalmult(zero,
R);
2162 if (!
eps_p->isZero())
2164 PrintS(
"no solution, since no modular solution\n");
2205 x_p->extendCols(
kp->cols());
2206 eps_p->extendCols(
kp->cols());
2207 fps_p->extendCols(
kp->cols());
2239 bd->extendCols(
kp->cols());
2253 kern->swapMatrix(c);
2322 for(
int i=1;
i<=
b->cols();
i++)
2326 B->skalmult(
den,
R);
2327 for(
int j =
B->rows();
j>0;
j--)
2367 x->rawset(
x->rows() -
B->rows() +
j,
i,
xi);
2368 for(
int k=
j;
k>0;
k--)
2393 T->copySubmatInto(
m, 1, 1,
A->cols(),
A->cols(), 1, 1);
2397 for(
i=1;
i<=
A->cols();
i++)
2399 for(
j=
m->rows();
j>
A->cols();
j--)
2403 if (
j>
A->cols())
break;
2405 Print(
"Found nullity (kern dim) of %d\n",
i-1);
2407 ker->copySubmatInto(
T, 1, 1,
A->rows(),
i-1, 1, 1);
2415 x->simplifyContentDen(&
den);
2429 PrintS(
"Solve Ax=b for A=\n");
2441 assume ((
x->cols() ==
b->cols()) && (
x->rows() ==
A->cols()) && (
A->rows() ==
b->rows()));
2458 WarnS(
"have field, should use Gauss or better");
2461 if (
R->cfXExtGcd &&
R->cfAnn)
2465 WerrorS(
"have no solve algorithm");
2517 for(
int i=0;
i<a->
cols();
i++)
2522 for (
int i=0;
i<a->
rows();
i++)
2528 for(
int i=0;
i<a->
cols();
i++)
2533 for(
int i=0;
i<a->
rows();
i++)
2549 Print(
"\n2:X: %ld %ld %ld\n",
X, *S, *
T);
2551 Print(
"\n2:x: %ld\n",
x);
2564 for(
int j=a->
cols();
j>0;
j--)
2621#define MIN(a,b) (a < b ? a : b)
2625 for(
int i=0;
i<
rg;
i++)
2628 k->set(
m->cols()-
i,
i+1,
A);
2631 for(
int i=
rg;
i<
m->cols();
i++)
static int si_min(const int a, const int b)
static void reduce_mod_howell(bigintmat *A, bigintmat *b, bigintmat *eps, bigintmat *x)
int kernbase(bigintmat *a, bigintmat *c, number p, coeffs q)
a basis for the nullspace of a mod p: only used internally in Round2. Don't use it.
number solveAx(bigintmat *A, bigintmat *b, bigintmat *x)
solve Ax=b*d. x needs to be pre-allocated to the same number of columns as b. the minimal denominator...
static number solveAx_dixon(bigintmat *A, bigintmat *B, bigintmat *x, bigintmat *kern)
bigintmat * bimChangeCoeff(bigintmat *a, coeffs cnew)
Liefert Kopier von Matrix a zurück, mit coeffs cnew statt den ursprünglichen.
bigintmat * bimCopy(const bigintmat *b)
same as copy constructor - apart from it being able to accept NULL as input
static bigintmat * prependIdentity(bigintmat *A)
bool nCoeffs_are_equal(coeffs r, coeffs s)
intvec * bim2iv(bigintmat *b)
bigintmat * bimMult(bigintmat *a, bigintmat *b)
static int intArrSum(int *a, int length)
bigintmat * bimSub(bigintmat *a, bigintmat *b)
static number solveAx_howell(bigintmat *A, bigintmat *b, bigintmat *x, bigintmat *kern)
void diagonalForm(bigintmat *A, bigintmat **S, bigintmat **T)
bigintmat * iv2bim(intvec *b, const coeffs C)
static int findLongest(int *a, int length)
static int getShorter(int *a, int l, int j, int cols, int rows)
static number bimFarey(bigintmat *A, number N, bigintmat *L)
bool operator!=(const bigintmat &lhr, const bigintmat &rhr)
static coeffs numbercoeffs(number n, coeffs c)
create Z/nA of type n_Zn
bigintmat * bimAdd(bigintmat *a, bigintmat *b)
Matrix-Add/-Sub/-Mult so oder mit operator+/-/* ? @Note: NULL as a result means an error (non-compati...
bool operator==(const bigintmat &lhr, const bigintmat &rhr)
#define BIMATELEM(M, I, J)
bigintmat * bimChangeCoeff(bigintmat *a, coeffs cnew)
Liefert Kopier von Matrix a zurück, mit coeffs cnew statt den ursprünglichen.
bool nCoeffs_are_equal(coeffs r, coeffs s)
const CanonicalForm CFMap CFMap & N
void Print()
IO: simply prints the matrix to the current output (screen?)
void colskaldiv(int j, number b)
Macht Ganzzahldivision aller j-ten Spalteneinträge mit b.
number det()
det (via LaPlace in general, hnf for euc. rings)
void splitrow(bigintmat *a, bigintmat *b)
Speichert in Matrix a den oberen, in b den unteren Teil der Matrix, vorausgesetzt die Dimensionen sti...
int isOne()
is matrix is identity
void zero()
Setzt alle Einträge auf 0.
void appendCol(bigintmat *a)
horizontally join the matrices, m <- m|a
number trace()
the trace ....
bool addrow(int i, int j, number a, coeffs c)
... Zeile ...
void swap(int i, int j)
swap columns i and j
void coltransform(int i, int j, number a, number b, number c, number d)
transforms cols (i,j) using the 2x2 matrix ((a,b)(c,d)) (hopefully)
bool addcol(int i, int j, number a, coeffs c)
addiert a-faches der j-ten Spalte zur i-ten dazu
void hnf()
transforms INPLACE to HNF
char * StringAsPrinted()
Returns a string as it would have been printed in the interpreter.
void swapMatrix(bigintmat *a)
number hnfdet()
det via HNF Primzahlen als long long int, müssen noch in number umgewandelt werden?
int findnonzero(int i)
find index of 1st non-zero entry in row i
bigintmat * modhnf(number p, coeffs c)
computes HNF(this | p*I)
void setcol(int j, bigintmat *m)
Setzt j-te Spalte gleich übergebenem Vektor (Matrix) m.
bool add(bigintmat *b)
Addiert zur Matrix die Matrix b dazu. Return false => an error occurred.
void inpMult(number bintop, const coeffs C=NULL)
inplace version of skalar mult. CHANGES input.
void setrow(int i, bigintmat *m)
Setzt i-te Zeile gleich übergebenem Vektor (Matrix) m.
void Write()
IO: writes the matrix into the current internal string buffer which must be started/ allocated before...
void rowskalmult(int i, number a, coeffs c)
... Zeile ...
bool skalmult(number b, coeffs c)
Multipliziert zur Matrix den Skalar b hinzu.
void simplifyContentDen(number *den)
ensures that Gcd(den, content)=1 enden hier wieder
void extendCols(int i)
append i zero-columns to the matrix
void splitcol(bigintmat *a, bigintmat *b)
... linken ... rechten ...
number content()
the content, the gcd of all entries. Only makes sense for Euclidean rings (or possibly constructive P...
void skaldiv(number b)
Macht Ganzzahldivision aller Matrixeinträge mit b.
void colskalmult(int i, number a, coeffs c)
Multipliziert zur i-ten Spalte den Skalar a hinzu.
bool copy(bigintmat *b)
Kopiert Einträge von b auf Bigintmat.
int index(int r, int c) const
helper function to map from 2-dim coordinates, starting by 1 to 1-dim coordinate, starting by 0
void getcol(int j, bigintmat *a)
copies the j-th column into the matrix a - which needs to be pre-allocated with the correct size.
number pseudoinv(bigintmat *a)
Speichert in Matrix a die Pseudoinverse, liefert den Nenner zurück.
number get(int i, int j) const
get a copy of an entry. NOTE: starts at [1,1]
void getColRange(int j, int no, bigintmat *a)
copies the no-columns staring by j (so j...j+no-1) into the pre-allocated a
void concatcol(bigintmat *a, bigintmat *b)
int findcolnonzero(int j)
find index of 1st non-zero entry in column j
void copySubmatInto(bigintmat *, int sr, int sc, int nr, int nc, int tr, int tc)
copy the submatrix of b, staring at (a,b) having n rows, m cols into the given matrix at pos....
number view(int i, int j) const
view an entry an entry. NOTE: starts at [1,1]
void inpTranspose()
transpose in place
void one()
Macht Matrix (Falls quadratisch) zu Einheitsmatrix.
void howell()
dito, but Howell form (only different for zero-divsors)
void rawset(int i, number n, const coeffs C=NULL)
replace an entry with the given number n (only delete old). NOTE: starts at [0]. Should be named set_...
void operator*=(int intop)
UEberladener *=-Operator (fuer int und bigint) Frage hier: *= verwenden oder lieber = und * einzeln?...
coeffs basecoeffs() const
void getrow(int i, bigintmat *a)
Schreibt i-te Zeile in Vektor (Matrix) a.
void concatrow(bigintmat *a, bigintmat *b)
Fügt zwei Matrixen untereinander/nebeneinander in gegebene Matrix ein, bzw spaltet gegebenen Matrix a...
void set(int i, int j, number n, const coeffs C=NULL)
replace an entry with a copy (delete old + copy new!). NOTE: starts at [1,1]
bigintmat * elim(int i, int j)
Liefert Streichungsmatrix (i-te Zeile und j-te Spalte gestrichen) zurück.
int compare(const bigintmat *op) const
bool sub(bigintmat *b)
Subtrahiert ...
char * String()
IO: String returns a singular string containing the matrix, needs freeing afterwards.
void swaprow(int i, int j)
swap rows i and j
void mod(number p)
Reduziert komplette Matrix modulo p.
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
static FORCE_INLINE void number2mpz(number n, coeffs c, mpz_t m)
static FORCE_INLINE long n_Int(number &n, const coeffs r)
conversion of n to an int; 0 if not possible in Z/pZ: the representing int lying in (-p/2 ....
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
static FORCE_INLINE number n_Add(number a, number b, const coeffs r)
return the sum of 'a' and 'b', i.e., a+b
static FORCE_INLINE number n_GetDenom(number &n, const coeffs r)
return the denominator of n (if elements of r are by nature not fractional, result is 1)
@ n_Q
rational (GMP) numbers
@ n_Znm
only used if HAVE_RINGS is defined
@ n_algExt
used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic
@ n_Zn
only used if HAVE_RINGS is defined
@ n_Z2m
only used if HAVE_RINGS is defined
@ n_transExt
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...
@ n_Z
only used if HAVE_RINGS is defined
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,...
static FORCE_INLINE number n_QuotRem(number a, number b, number *q, const coeffs r)
static FORCE_INLINE char * nCoeffString(const coeffs cf)
TODO: make it a virtual method of coeffs, together with: Decompose & Compose, rParameter & rPar.
static FORCE_INLINE BOOLEAN n_GreaterZero(number n, const coeffs r)
ordered fields: TRUE iff 'n' is positive; in Z/pZ: TRUE iff 0 < m <= roundedBelow(p/2),...
static FORCE_INLINE number n_Ann(number a, const coeffs r)
if r is a ring with zero divisors, return an annihilator!=0 of b otherwise return NULL
void n_Print(number &a, const coeffs r)
print a number (BEWARE of string buffers!) mostly for debugging
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
static FORCE_INLINE number n_InpNeg(number n, const coeffs r)
in-place negation of n MUST BE USED: n = n_InpNeg(n) (no copy is returned)
static FORCE_INLINE number n_Farey(number a, number b, const coeffs 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...
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
static FORCE_INLINE BOOLEAN n_Greater(number a, number b, const coeffs r)
ordered fields: TRUE iff 'a' is larger than 'b'; in Z/pZ: TRUE iff la > lb, where la and lb are the l...
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
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...
static FORCE_INLINE number n_Sub(number a, number b, const coeffs r)
return the difference of 'a' and 'b', i.e., a-b
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static FORCE_INLINE void n_Write(number n, const coeffs r, const BOOLEAN bShortOut=TRUE)
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
static FORCE_INLINE number n_IntMod(number a, number b, const coeffs r)
for r a field, return n_Init(0,r) always: n_Div(a,b,r)*b+n_IntMod(a,b,r)==a n_IntMod(a,...
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
static FORCE_INLINE BOOLEAN n_Equal(number a, number b, const coeffs r)
TRUE iff 'a' and 'b' represent the same number; they may have different representations.
static FORCE_INLINE number n_GetNumerator(number &n, const coeffs r)
return the numerator of n (if elements of r are by nature not fractional, result is n)
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
void nKillChar(coeffs r)
undo all initialisations
static FORCE_INLINE void n_InpAdd(number &a, number b, const coeffs r)
addition of 'a' and 'b'; replacement of 'a' by the sum a+b
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
static FORCE_INLINE number n_XExtGcd(number a, number b, number *s, number *t, number *u, number *v, const coeffs r)
const CanonicalForm int s
const CanonicalForm int const CFList const Variable & y
static int min(int a, int b)
void WerrorS(const char *s)
std::pair< ideal, ring > flip(const ideal I, const ring r, const gfan::ZVector interiorPoint, const gfan::ZVector facetNormal, const gfan::ZVector adjustedInteriorPoint, const gfan::ZVector adjustedFacetNormal)
static BOOLEAN length(leftv result, leftv arg)
int lcm(unsigned long *l, unsigned long *a, unsigned long *b, unsigned long p, int dega, int degb)
The main handler for Singular numbers which are suitable for Singular polynomials.
static int index(p_Length length, p_Ord ord)
void StringSetS(const char *st)
void StringAppendS(const char *st)
void PrintS(const char *s)
void Werror(const char *fmt,...)