 |
My Project
UNKNOWN_GIT_VERSION
|
Go to the source code of this file.
|
bool | operator== (const bigintmat &lhr, const bigintmat &rhr) |
|
bool | operator!= (const bigintmat &lhr, const bigintmat &rhr) |
|
bigintmat * | bimAdd (bigintmat *a, bigintmat *b) |
| Matrix-Add/-Sub/-Mult so oder mit operator+/-/* ? @Note: NULL as a result means an error (non-compatible matrices?) More...
|
|
bigintmat * | bimAdd (bigintmat *a, int b) |
|
bigintmat * | bimSub (bigintmat *a, bigintmat *b) |
|
bigintmat * | bimSub (bigintmat *a, int b) |
|
bigintmat * | bimMult (bigintmat *a, bigintmat *b) |
|
bigintmat * | bimMult (bigintmat *a, int b) |
|
bigintmat * | bimMult (bigintmat *a, number b, const coeffs cf) |
|
bigintmat * | bimCopy (const bigintmat *b) |
| same as copy constructor - apart from it being able to accept NULL as input More...
|
|
intvec * | bim2iv (bigintmat *b) |
|
bigintmat * | iv2bim (intvec *b, const coeffs C) |
|
bigintmat * | bimChangeCoeff (bigintmat *a, coeffs cnew) |
| Liefert Kopier von Matrix a zurück, mit coeffs cnew statt den ursprünglichen. More...
|
|
void | bimMult (bigintmat *a, bigintmat *b, bigintmat *c) |
| Multipliziert Matrix a und b und speichert Ergebnis in c. More...
|
|
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 d is returned. Currently available for Z, Q and Z/nZ (and possibly for all fields: d=1 there) Beware that the internal functions can find the kernel as well - but the interface is lacking. More...
|
|
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. More...
|
|
bool | nCoeffs_are_equal (coeffs r, coeffs s) |
|
void | diagonalForm (bigintmat *a, bigintmat **b, bigintmat **c) |
|
◆ BIMATELEM
#define BIMATELEM |
( |
|
M, |
|
|
|
I, |
|
|
|
J |
|
) |
| (M)[(I-1)*(M).cols()+J-1] |
◆ bim2iv()
◆ bimAdd() [1/2]
Matrix-Add/-Sub/-Mult so oder mit operator+/-/* ? @Note: NULL as a result means an error (non-compatible matrices?)
Definition at line 182 of file bigintmat.cc.
◆ bimAdd() [2/2]
◆ bimChangeCoeff()
Liefert Kopier von Matrix a zurück, mit coeffs cnew statt den ursprünglichen.
Definition at line 1805 of file bigintmat.cc.
1814 for (
int i=1;
i<=a->
rows();
i++)
1816 for (
int j=1;
j<=a->
cols();
j++)
1819 t2 =
f(t1, cold, cnew);
◆ bimCopy()
same as copy constructor - apart from it being able to accept NULL as input
Definition at line 405 of file bigintmat.cc.
◆ bimMult() [1/4]
Definition at line 255 of file bigintmat.cc.
257 const int ca = a->
cols();
258 const int cb =
b->cols();
260 const int ra = a->
rows();
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++)
286 sum =
n_Init(0, basecoeffs);
288 for (
k=1;
k<=ca;
k++)
◆ bimMult() [2/4]
Multipliziert Matrix a und b und speichert Ergebnis in c.
Definition at line 1933 of file bigintmat.cc.
1937 WerrorS(
"Error in bimMult. Coeffs do not agree!");
1940 if ((a->
rows() != c->
rows()) || (
b->cols() != c->
cols()) || (a->
cols() !=
b->rows()))
1942 WerrorS(
"Error in bimMult. Dimensions do not agree!");
◆ bimMult() [3/4]
◆ bimMult() [4/4]
◆ bimSub() [1/2]
◆ bimSub() [2/2]
◆ diagonalForm()
Definition at line 2476 of file bigintmat.cc.
2522 for(
int i=0;
i<a->
cols();
i++)
2527 for (
int i=0;
i<a->
rows();
i++)
2533 for(
int i=0;
i<a->
cols();
i++)
2538 for(
int i=0;
i<a->
rows();
i++)
2547 Print(
"X: %ld\n", X);
2554 Print(
"\n2:X: %ld %ld %ld\n", X, *S, *
T);
2556 Print(
"\n2:x: %ld\n",
x);
2567 for(
int i=a->
rows(); diag &&
i>0;
i--)
2569 for(
int j=a->
cols();
j>0;
j--)
2579 PrintS(
"Diag ? %d\n", diag);
◆ iv2bim()
Definition at line 349 of file bigintmat.cc.
351 const int l = (
b->rows())*(
b->cols());
354 for (
int i=0;
i <
l;
i++)
◆ kernbase()
a basis for the nullspace of a mod p: only used internally in Round2. Don't use it.
Definition at line 2601 of file bigintmat.cc.
2626 #define MIN(a,b) (a < b ? a : b)
2627 for(rg=0; rg<
MIN(
m->rows(),
m->cols()) && !
n_IsZero(
m->view(
m->rows()-rg,
m->cols()-rg), coe); rg++);
2630 for(
int i=0;
i<rg;
i++)
2632 number
A =
n_Ann(
m->view(
m->rows()-
i,
m->cols()-
i), coe);
2633 k->set(
m->cols()-
i,
i+1,
A);
2636 for(
int i=rg;
i<
m->cols();
i++)
◆ nCoeffs_are_equal()
◆ operator!=()
◆ operator==()
Definition at line 159 of file bigintmat.cc.
161 if (&lhr == &rhr) {
return true; }
162 if (lhr.
cols() != rhr.
cols()) {
return false; }
163 if (lhr.
rows() != rhr.
rows()) {
return false; }
168 for (
int i=0;
i <
l;
i++)
◆ solveAx()
solve Ax=b*d. x needs to be pre-allocated to the same number of columns as b. the minimal denominator d is returned. Currently available for Z, Q and Z/nZ (and possibly for all fields: d=1 there) Beware that the internal functions can find the kernel as well - but the interface is lacking.
Definition at line 2431 of file bigintmat.cc.
2434 PrintS(
"Solve Ax=b for A=\n");
2446 assume ((
x->cols() ==
b->cols()) && (
x->rows() ==
A->cols()) && (
A->rows() ==
b->rows()));
2463 WarnS(
"have field, should use Gauss or better");
2466 if (
R->cfXExtGcd &&
R->cfAnn)
2470 WerrorS(
"have no solve algorithm");
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
@ n_Zn
only used if HAVE_RINGS is defined
void setrow(int i, bigintmat *m)
Setzt i-te Zeile gleich übergebenem Vektor (Matrix) m.
void getrow(int i, bigintmat *a)
Schreibt i-te Zeile in Vektor (Matrix) a.
number view(int i, int j) const
view an entry an entry. NOTE: starts at [1,1]
@ n_Z2m
only used if HAVE_RINGS is defined
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
coeffs basecoeffs() const
@ n_Q
rational (GMP) numbers
bool nCoeffs_are_equal(coeffs r, coeffs s)
@ n_Znm
only used if HAVE_RINGS is defined
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
void one()
Macht Matrix (Falls quadratisch) zu Einheitsmatrix.
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)
bigintmat * bimMult(bigintmat *a, bigintmat *b)
void hnf()
transforms INPLACE to HNF
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 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 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
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
void PrintS(const char *s)
bool copy(bigintmat *b)
Kopiert Einträge von b auf Bigintmat.
@ n_Z
only used if HAVE_RINGS is defined
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 number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
void Print()
IO: simply prints the matrix to the current output (screen?)
static coeffs numbercoeffs(number n, coeffs c)
create Z/nA of type n_Zn
@ n_transExt
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...
void n_Print(number &a, const coeffs r)
print a number (BEWARE of string buffers!) mostly for debugging
static FORCE_INLINE number n_Sub(number a, number b, const coeffs r)
return the difference of 'a' and 'b', i.e., a-b
number get(int i, int j) const
get a copy of an entry. NOTE: starts at [1,1]
void diagonalForm(bigintmat *A, bigintmat **S, bigintmat **T)
void Werror(const char *fmt,...)
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_...
static number solveAx_howell(bigintmat *A, bigintmat *b, bigintmat *x, bigintmat *kern)
void WerrorS(const char *s)
#define BIMATELEM(M, I, J)
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 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 number solveAx_dixon(bigintmat *A, bigintmat *B, bigintmat *x, bigintmat *kern)
const CanonicalForm int s
bigintmat * bimChangeCoeff(bigintmat *a, coeffs cnew)
Liefert Kopier von Matrix a zurück, mit coeffs cnew statt den ursprünglichen.
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
@ n_algExt
used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic