 |
My Project
debian-1:4.1.1-p2+ds-4build1
|
Go to the documentation of this file.
82 for (
int i =
l - 1;
i>=0;
i--)
105 for (
int i =
l-1;
i>=0;
i--)
117 Werror(
"wrong bigintmat index:%d\n",
i);
128 Werror(
"wrong bigintmat index:%d\n",
i);
134 #define BIMATELEM(M,I,J) (M)[(I-1)*(M).cols()+J-1]
162 int index(
int r,
int c)
const
169 const int index = ((r-1)*
cols() + (c-1));
176 number
get(
int i,
int j)
const;
179 number
view(
int i,
int j)
const;
182 number
get(
int i)
const;
184 number
view(
int i)
const;
211 Werror(
"wrong bigintmat index:%d\n",
i);
280 void coltransform(
int i,
int j, number a, number
b, number c, number d);
void appendCol(bigintmat *a)
horizontally join the matrices, m <- m|a
bool operator==(const bigintmat &lhr, const bigintmat &rhr)
void swaprow(int i, int j)
swap rows i and j
void setrow(int i, bigintmat *m)
Setzt i-te Zeile gleich übergebenem Vektor (Matrix) m.
bigintmat * elim(int i, int j)
Liefert Streichungsmatrix (i-te Zeile und j-te Spalte gestrichen) zurück.
void mod(number p)
Reduziert komplette Matrix modulo p.
bool addcol(int i, int j, number a, coeffs c)
addiert a-faches der j-ten Spalte zur i-ten dazu
char * String()
IO: String returns a singular string containing the matrix, needs freeing afterwards.
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...
void splitrow(bigintmat *a, bigintmat *b)
Speichert in Matrix a den oberen, in b den unteren Teil der Matrix, vorausgesetzt die Dimensionen sti...
void concatcol(bigintmat *a, bigintmat *b)
void concatrow(bigintmat *a, bigintmat *b)
Fügt zwei Matrixen untereinander/nebeneinander in gegebene Matrix ein, bzw spaltet gegebenen Matrix a...
void extendCols(int i)
append i zero-columns to the matrix
void Write()
IO: writes the matrix into the current internal string buffer which must be started/ allocated before...
void zero()
Setzt alle Einträge auf 0.
char * StringAsPrinted()
Returns a string as it would have been printed in the interpreter.
void inpMult(number bintop, const coeffs C=NULL)
inplace version of skalar mult. CHANGES input.
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]
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
coeffs basecoeffs() const
bool operator!=(const bigintmat &lhr, const bigintmat &rhr)
int findcolnonzero(int j)
find index of 1st non-zero entry in column j
void one()
Macht Matrix (Falls quadratisch) zu Einheitsmatrix.
void colskalmult(int i, number a, coeffs c)
Multipliziert zur i-ten Spalte den Skalar a hinzu.
number det()
det (via LaPlace in general, hnf for euc. rings)
bigintmat * bimCopy(const bigintmat *b)
same as copy constructor - apart from it being able to accept NULL as input
void hnf()
transforms INPLACE to HNF
void skaldiv(number b)
Macht Ganzzahldivision aller Matrixeinträge mit b.
~bigintmat()
canonical destructor.
void operator*=(int intop)
UEberladener *=-Operator (fuer int und bigint) Frage hier: *= verwenden oder lieber = und * einzeln?...
int findnonzero(int i)
find index of 1st non-zero entry in row i
intvec * bim2iv(bigintmat *b)
int compare(const bigintmat *op) const
bigintmat * bimAdd(bigintmat *a, bigintmat *b)
Matrix-Add/-Sub/-Mult so oder mit operator+/-/* ? @Note: NULL as a result means an error (non-compati...
bigintmat * iv2bim(intvec *b, const coeffs C)
#define omFreeSize(addr, size)
bool copy(bigintmat *b)
Kopiert Einträge von b auf Bigintmat.
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]
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 getColRange(int j, int no, bigintmat *a)
copies the no-columns staring by j (so j...j+no-1) into the pre-allocated a
bool nCoeffs_are_equal(coeffs r, coeffs s)
bigintmat * modhnf(number p, coeffs c)
computes HNF(this | p*I)
int isOne()
is matrix is identity
bigintmat * bimMult(bigintmat *a, bigintmat *b)
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
bigintmat * bimSub(bigintmat *a, bigintmat *b)
void Print()
IO: simply prints the matrix to the current output (screen?)
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.
bool add(bigintmat *b)
Addiert zur Matrix die Matrix b dazu. Return false => an error occurred.
number pseudoinv(bigintmat *a)
Speichert in Matrix a die Pseudoinverse, liefert den Nenner zurück.
void splitcol(bigintmat *a, bigintmat *b)
... linken ... rechten ...
void setcol(int j, bigintmat *m)
Setzt j-te Spalte gleich übergebenem Vektor (Matrix) m.
number get(int i, int j) const
get a copy of an entry. NOTE: starts at [1,1]
void diagonalForm(bigintmat *a, bigintmat **b, bigintmat **c)
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.
void colskaldiv(int j, number b)
Macht Ganzzahldivision aller j-ten Spalteneinträge mit b.
void howell()
dito, but Howell form (only different for zero-divsors)
void Werror(const char *fmt,...)
void swap(int i, int j)
swap columns i and j
bigintmat * bimChangeCoeff(bigintmat *a, coeffs cnew)
Liefert Kopier von Matrix a zurück, mit coeffs cnew statt den ursprünglichen.
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_...
number hnfdet()
det via HNF Primzahlen als long long int, müssen noch in number umgewandelt werden?
bigintmat * inpmod(number p, coeffs c)
Liefert Kopie der Matrix zurück, allerdings im Ring Z modulo p.
number content()
the content, the gcd of all entries. Only makes sense for Euclidean rings (or possibly constructive P...
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
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....
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)
bigintmat * modgauss(number p, coeffs c)
const CanonicalForm int s
void simplifyContentDen(number *den)
ensures that Gcd(den, content)=1 enden hier wieder
number trace()
the trace ....
bool addrow(int i, int j, number a, coeffs c)
... Zeile ...
number & operator[](int i)
dubious: 1-dim access to 2-dim array. Entries are read row by row.
void inpTranspose()
transpose in place
void swapMatrix(bigintmat *a)
bool sub(bigintmat *b)
Subtrahiert ...
void rowskalmult(int i, number a, coeffs c)
... Zeile ...
bool skalmult(number b, coeffs c)
Multipliziert zur Matrix den Skalar b hinzu.