bigintmat.h
Go to the documentation of this file.
1 /****************************************
2 * Computer Algebra System SINGULAR *
3 ****************************************/
4 /*
5 * ABSTRACT: class bigintmat: matrices of number
6 *
7 * Matrices are stored as 1-dim c-arrays but interpreted 2-dim as matrices.
8 * Both modes of addressing are supported, note however, that the 1-dim
9 * adressing starts at 0, the 2-dim at 1.
10 *
11 * Matrices are meant to represent column modules, thus the default
12 * operations are always by column.
13 *
14 * While basic operations are supported over any ring (coeff), some more
15 * advanced ones require more special rings: eg. echelon forms, solving
16 * of linear equations is only effective over principal ideal or even
17 * Euclidean rings.
18 *
19 * Be careful with the get/set/view/rawset functions to understand which
20 * arguments are copied/ deleted or only assigned.
21 */
22 
23 #ifndef BIGINTMAT_H
24 #define BIGINTMAT_H
25 
26 #include <omalloc/omalloc.h>
27 #include <coeffs/coeffs.h>
28 
29 /**
30  * @class bigintmat bigintmat.h <coeffs/bigintmat.h>
31  *
32  * Matrices of numbers
33  *
34  * Matrices are stored as 1-dim c-arrays but interpreted 2-dim as matrices.
35  * Both modes of addressing are supported, note however, that the 1-dim
36  * adressing starts at 0, the 2-dim at 1.
37  *
38  * Matrices are meant to represent column modules, thus the default
39  * operations are always by column.
40  *
41  * While basic operations are supported over any ring (coeff), some more
42  * advanced ones require more special rings: eg. echelon forms, solving
43  * of linear equations is only effective over principal ideal or even
44  * Euclidean rings.
45  *
46  * Be careful with the get/set/view/rawset functions to understand which
47  * arguments are copied/ deleted or only assigned.
48  *
49  * @Note: no reference counting here!
50  */
51 class bigintmat
52 {
53  private:
55  number *v;
56  int row;
57  int col;
58  public:
59 
60  bigintmat(): m_coeffs(NULL), v(NULL), row(1), col(0){}
61 
62  bigintmat * transpose();
63 
64  /// transpose in place
65  void inpTranspose();
66 
67 
68  /// constructor: the r times c zero-matrix. Beware that the creation
69  /// of a large zero matrix is expensive in terms of time and memory.
70  bigintmat(int r, int c, const coeffs n): m_coeffs(n), v(NULL), row(r), col(c)
71  {
72  assume (rows() >= 0);
73  assume (cols() >= 0);
74 
75  const int l = r*c;
76 
77  if (l>0) /*(r>0) && (c>0) */
78  {
79  v = (number *)omAlloc(sizeof(number)*l);
80 
81  assume (basecoeffs() != NULL);
82  for (int i = l - 1; i>=0; i--)
83  {
84  v[i] = n_Init(0, basecoeffs());
85  }
86  }
87  }
88 
89  /// copy constructor
90  bigintmat(const bigintmat *m): m_coeffs(m->basecoeffs()), v(NULL), row(m->rows()), col(m->cols())
91  {
92  const int l = row*col;
93 
94  if (l > 0)
95  {
96  assume (rows() > 0);
97  assume (cols() > 0);
98 
99  assume (m->v != NULL);
100 
101  v = (number *)omAlloc(sizeof(number)*row*col);
102 
103  assume (basecoeffs() != NULL);
104 
105  for (int i = l-1; i>=0; i--)
106  {
107  v[i] = n_Copy((*m)[i], basecoeffs());
108  }
109  }
110  }
111  /// dubious: 1-dim access to 2-dim array. Entries are read row by row.
112  inline number& operator[](int i)
113  {
114 #ifndef SING_NDEBUG
115  if((i<0)||(i>=row*col))
116  {
117  Werror("wrong bigintmat index:%d\n",i);
118  }
119 #endif
120  assume ( !((i<0)||(i>=row*col)) );
121 
122  return v[i]; // Hier sollte imho kein nlCopy rein...
123  }
124  inline const number& operator[](int i) const
125  {
126 #ifndef SING_NDEBUG
127  if((i<0)||(i>=row*col))
128  {
129  Werror("wrong bigintmat index:%d\n",i);
130  }
131 #endif
132  assume ( !((i<0)||(i>=row*col)) );
133 
134  return v[i];
135  }
136 #define BIMATELEM(M,I,J) (M)[(I-1)*(M).cols()+J-1]
137 
138  /// UEberladener *=-Operator (fuer int und bigint)
139  /// Frage hier: *= verwenden oder lieber = und * einzeln?
140  /// problem: what about non-commuting rings. Is this from left or right?
141  void operator*=(int intop);
142 
143  /// inplace versio of skalar mult. CHANGES input.
144  void inpMult(number bintop, const coeffs C = NULL);
145 
146  inline int length() { return col*row; }
147  inline int cols() const { return col; }
148  inline int rows() const { return row; }
149  inline coeffs basecoeffs() const { return m_coeffs; }
150 
151  /// canonical destructor.
153  {
154  if (v!=NULL)
155  {
156  for (int i=0; i<row*col; i++) { n_Delete(&(v[i]), basecoeffs()); }
157  omFreeSize((ADDRESS)v, sizeof(number)*row*col);
158  v=NULL;
159  }
160  }
161 
162  /// helper function to map from 2-dim coordinates, starting by 1 to
163  /// 1-dim coordinate, starting by 0
164  int index(int r, int c) const
165  {
166  assume (rows() >= 0 && cols() >= 0);
167 
168  assume (r > 0 && c > 0);
169  assume (r <= rows() && c <= cols());
170 
171  const int index = ((r-1)*cols() + (c-1));
172 
173  assume (index >= 0 && index < rows() * cols());
174  return index;
175  }
176 
177  /// get a copy of an entry. NOTE: starts at [1,1]
178  number get(int i, int j) const;
179  /// view an entry an entry. NOTE: starts at [1,1]
180  //do NOT delete.
181  number view(int i, int j) const;
182 
183  /// get a copy of an entry. NOTE: starts at [0]
184  number get(int i) const;
185  /// view an entry. NOTE: starts at [0]
186  number view(int i) const;
187 
188  /// replace an entry with a copy (delete old + copy new!).
189  /// NOTE: starts at [1,1]
190  void set(int i, int j, number n, const coeffs C = NULL);
191 
192  /// replace an entry with a copy (delete old + copy new!).
193  /// NOTE: starts at [0]
194  void set(int i, number n, const coeffs C = NULL);
195 
196 
197  /// replace an entry with the given number n (only delete old).
198  /// NOTE: starts at [0]. Should be named set_transfer
199  inline void rawset(int i, number n, const coeffs C = NULL)
200  {
201  assume (C == NULL || C == basecoeffs());
202  assume (i >= 0);
203  const int l = rows() * cols();
204  assume (i<l);
205 
206  if (i < l)
207  {
208  n_Delete(&(v[i]), basecoeffs()); v[i] = n;
209  }
210 #ifndef SING_NDEBUG
211  else
212  {
213  Werror("wrong bigintmat index:%d\n",i);
214  }
215 #endif
216  }
217 
218  /// as above, but the 2-dim version
219  inline void rawset(int i, int j, number n, const coeffs C = NULL)
220  {
221  rawset( index(i,j), n, C);
222  }
223 
224  ///IO: String returns a singular string containing the matrix, needs
225  /// freeing afterwards
226  char * String();
227  ///IO: writes the matrix into the current internal string buffer which
228  /// must be started/ allocated before (e.g. @ref StringSetS)
229  void Write();
230  ///IO: simply prints the matrix to the current output (screen?)
231  void Print();
232 
233  /**
234  * Returns a string as it would have been printed in the interpreter.
235  * Used e.g. in print functions of various blackbox types.
236  */
237  char * StringAsPrinted();
238  void pprint(int maxwid);
239  int compare(const bigintmat* op) const;
240  int * getwid(int maxwid);
241 
242 
243  // Funktionen von Kira, Jan, Marco
244  // !WICHTIG: Überall, wo eine number übergeben wird, und damit gearbeitet wird, die coeffs mitübergeben und erst
245  // überprüfen, ob diese mit basecoeffs übereinstimmen. Falls nein: Breche ab!
246 
247  /// swap columns i and j
248  void swap(int i, int j);
249 
250  /// swap rows i and j
251  void swaprow(int i, int j);
252 
253  ///find index of 1st non-zero entry in row i
254  int findnonzero(int i);
255 
256  ///find index of 1st non-zero entry in column j
257  int findcolnonzero(int j);
258 
259  ///copies the j-th column into the matrix a - which needs to be pre-allocated with the correct size.
260  void getcol(int j, bigintmat *a);
261 
262  ///copies the no-columns staring by j (so j...j+no-1) into the pre-allocated a
263  void getColRange(int j, int no, bigintmat *a);
264 
265  void getrow(int i, bigintmat *a); ///< Schreibt i-te Zeile in Vektor (Matrix) a
266  void setcol(int j, bigintmat *m); ///< Setzt j-te Spalte gleich übergebenem Vektor (Matrix) m
267  void setrow(int i, bigintmat *m); ///< Setzt i-te Zeile gleich übergebenem Vektor (Matrix) m
268 
269  ///horizontally join the matrices, m <- m|a
270  void appendCol (bigintmat *a);
271 
272  ///append i zero-columns to the matrix
273  void extendCols (int i);
274 
275  bool add(bigintmat *b); ///< Addiert zur Matrix die Matrix b dazu. Return false => an error occurred
276  bool sub(bigintmat *b); ///< Subtrahiert ...
277  bool skalmult(number b, coeffs c); ///< Multipliziert zur Matrix den Skalar b hinzu
278  bool addcol(int i, int j, number a, coeffs c); ///< addiert a-faches der j-ten Spalte zur i-ten dazu
279  bool addrow(int i, int j, number a, coeffs c); ///< ... Zeile ...
280  void colskalmult(int i, number a, coeffs c); ///< Multipliziert zur i-ten Spalte den Skalar a hinzu
281  void rowskalmult(int i, number a, coeffs c); ///< ... Zeile ...
282  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)
283  void concatrow(bigintmat *a, bigintmat *b); ///< Fügt zwei Matrixen untereinander/nebeneinander in gegebene Matrix ein, bzw spaltet gegebenen Matrix auf
284  void concatcol(bigintmat *a, bigintmat *b);
285  void splitrow(bigintmat *a, bigintmat *b); ///< Speichert in Matrix a den oberen, in b den unteren Teil der Matrix, vorausgesetzt die Dimensionen stimmen überein
286  void splitcol(bigintmat *a, bigintmat *b); ///< ... linken ... rechten ...
287  void splitcol(bigintmat *a, int i); ///< Speichert die ersten i Spalten als Teilmatrix in a
288  void splitrow(bigintmat *a, int i); ///< ... Zeilen ...
289  bool copy(bigintmat *b); ///< Kopiert Einträge von b auf Bigintmat
290  void copySubmatInto(bigintmat *, int sr, int sc, int nr, int nc, int tr, int tc);
291  void one(); ///< Macht Matrix (Falls quadratisch) zu Einheitsmatrix
292  int isOne(); ///< is matrix is identity
293  void zero(); ///< Setzt alle Einträge auf 0
294  int isZero();
295  int colIsZero(int i);
296  bigintmat *elim(int i, int j); ///< Liefert Streichungsmatrix (i-te Zeile und j-te Spalte gestrichen) zurück
297  number pseudoinv(bigintmat *a); ///< Speichert in Matrix a die Pseudoinverse, liefert den Nenner zurück
298  number trace(); ///< the trace ....
299  number det(); ///< det (via LaPlace in general, hnf for euc. rings)
300  number hnfdet(); ///< det via HNF
301  /// Primzahlen als long long int, müssen noch in number umgewandelt werden?
302  void hnf(); ///< transforms INPLACE to HNF
303  void howell(); ///<dito, but Howell form (only different for zero-divsors)
304  void swapMatrix(bigintmat * a);
305  #ifdef HAVE_RINGS
306  bigintmat * modhnf(number p, coeffs c); ///< computes HNF(this | p*I)
307  #endif
308  bigintmat * modgauss(number p, coeffs c);
309  void skaldiv(number b); ///< Macht Ganzzahldivision aller Matrixeinträge mit b
310  void colskaldiv(int j, number b); ///< Macht Ganzzahldivision aller j-ten Spalteneinträge mit b
311  void mod(number p); ///< Reduziert komplette Matrix modulo p
312  bigintmat* inpmod(number p, coeffs c); ///< Liefert Kopie der Matrix zurück, allerdings im Ring Z modulo p
313  number content(); ///<the content, the gcd of all entries. Only makes sense for Euclidean rings (or possibly constructive PIR)
314  void simplifyContentDen(number *den); ///< ensures that Gcd(den, content)=1
315  ///< enden hier wieder
316 };
317 
318 bool operator==(const bigintmat & lhr, const bigintmat & rhr);
319 bool operator!=(const bigintmat & lhr, const bigintmat & rhr);
320 
321 /// Matrix-Add/-Sub/-Mult so oder mit operator+/-/* ?
322 /// @Note: NULL as a result means an error (non-compatible matrices?)
324 bigintmat * bimAdd(bigintmat * a, int b);
325 bigintmat * bimSub(bigintmat * a, bigintmat * b);
326 bigintmat * bimSub(bigintmat * a, int b);
328 bigintmat * bimMult(bigintmat * a, int b);
329 bigintmat * bimMult(bigintmat * a, number b, const coeffs cf);
330 
331 ///same as copy constructor - apart from it being able to accept NULL as input
332 bigintmat * bimCopy(const bigintmat * b);
333 
334 class intvec;
335 intvec * bim2iv(bigintmat * b);
336 bigintmat * iv2bim(intvec * b, const coeffs C);
337 
338 // Wieder von Kira, Jan, Marco
339 bigintmat * bimChangeCoeff(bigintmat *a, coeffs cnew); ///< Liefert Kopier von Matrix a zurück, mit coeffs cnew statt den ursprünglichen
340 void bimMult(bigintmat *a, bigintmat *b, bigintmat *c); ///< Multipliziert Matrix a und b und speichert Ergebnis in c
341 
342 ///solve Ax=b*d. x needs to be pre-allocated to the same number of columns as b.
343 /// the minimal denominator d is returned. Currently available for Z, Q and Z/nZ (and possibly for all fields: d=1 there)
344 ///Beware that the internal functions can find the kernel as well - but the interface is lacking.
345 number solveAx(bigintmat *A, bigintmat *b, bigintmat *x); // solves Ax=b*d for a minimal denominator d. if x needs to have as many cols as b
346 
347 ///a basis for the nullspace of a mod p: only used internally in Round2.
348 /// Don't use it.
349 int kernbase (bigintmat *a, bigintmat *c, number p, coeffs q);
351 // enden wieder
352 void diagonalForm(bigintmat *a, bigintmat **b, bigintmat **c);
353 
354 #endif /* #ifndef BIGINTMAT_H */
void operator*=(int intop)
UEberladener *=-Operator (fuer int und bigint) Frage hier: *= verwenden oder lieber = und * einzeln...
Definition: bigintmat.cc:134
bigintmat * transpose()
Definition: bigintmat.cc:38
void concatcol(bigintmat *a, bigintmat *b)
Definition: bigintmat.cc:1049
void skaldiv(number b)
Macht Ganzzahldivision aller Matrixeinträge mit b.
Definition: bigintmat.cc:1763
number view(int i, int j) const
view an entry an entry. NOTE: starts at [1,1]
Definition: bigintmat.cc:125
int compare(const bigintmat *op) const
Definition: bigintmat.cc:362
void splitcol(bigintmat *a, bigintmat *b)
... linken ... rechten ...
Definition: bigintmat.cc:1107
const CanonicalForm int s
Definition: facAbsFact.cc:55
void concatrow(bigintmat *a, bigintmat *b)
Fügt zwei Matrixen untereinander/nebeneinander in gegebene Matrix ein, bzw spaltet gegebenen Matrix a...
Definition: bigintmat.cc:999
int colIsZero(int i)
Definition: bigintmat.cc:1479
const poly a
Definition: syzextra.cc:212
void swaprow(int i, int j)
swap rows i and j
Definition: bigintmat.cc:705
number det()
det (via LaPlace in general, hnf for euc. rings)
Definition: bigintmat.cc:1414
bool addcol(int i, int j, number a, coeffs c)
addiert a-faches der j-ten Spalte zur i-ten dazu
Definition: bigintmat.cc:927
void colskaldiv(int j, number b)
Macht Ganzzahldivision aller j-ten Spalteneinträge mit b.
Definition: bigintmat.cc:1778
void getrow(int i, bigintmat *a)
Schreibt i-te Zeile in Vektor (Matrix) a.
Definition: bigintmat.cc:781
bool operator!=(const bigintmat &lhr, const bigintmat &rhr)
Definition: bigintmat.cc:174
void simplifyContentDen(number *den)
ensures that Gcd(den, content)=1 < enden hier wieder
Definition: bigintmat.cc:2510
return P p
Definition: myNF.cc:203
Matrices of numbers.
Definition: bigintmat.h:51
void inpTranspose()
transpose in place
Definition: bigintmat.cc:51
void setcol(int j, bigintmat *m)
Setzt j-te Spalte gleich übergebenem Vektor (Matrix) m.
Definition: bigintmat.cc:812
void appendCol(bigintmat *a)
horizontally join the matrices, m <- m|a
Definition: bigintmat.cc:1034
bool sub(bigintmat *b)
Subtrahiert ...
Definition: bigintmat.cc:888
int isOne()
is matrix is identity
Definition: bigintmat.cc:1218
void rowskalmult(int i, number a, coeffs c)
... Zeile ...
Definition: bigintmat.cc:986
bigintmat(int r, int c, const coeffs n)
constructor: the r times c zero-matrix. Beware that the creation of a large zero matrix is expensive ...
Definition: bigintmat.h:70
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:539
int row
Definition: bigintmat.h:56
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
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...
Definition: bigintmat.cc:2281
bigintmat * bimChangeCoeff(bigintmat *a, coeffs cnew)
Liefert Kopier von Matrix a zurück, mit coeffs cnew statt den ursprünglichen.
Definition: bigintmat.cc:1706
void zero()
Setzt alle Einträge auf 0.
Definition: bigintmat.cc:1256
int findnonzero(int i)
find index of 1st non-zero entry in row i
Definition: bigintmat.cc:721
char * StringAsPrinted()
Returns a string as it would have been printed in the interpreter.
Definition: bigintmat.cc:448
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
Definition: bigintmat.cc:770
void * ADDRESS
Definition: auxiliary.h:161
void setrow(int i, bigintmat *m)
Setzt i-te Zeile gleich übergebenem Vektor (Matrix) m.
Definition: bigintmat.cc:841
int length()
Definition: bigintmat.h:146
int findcolnonzero(int j)
find index of 1st non-zero entry in column j
Definition: bigintmat.cc:732
#define omAlloc(size)
Definition: omAllocDecl.h:210
number & operator[](int i)
dubious: 1-dim access to 2-dim array. Entries are read row by row.
Definition: bigintmat.h:112
int * getwid(int maxwid)
Definition: bigintmat.cc:578
const number & operator[](int i) const
Definition: bigintmat.h:124
bigintmat * iv2bim(intvec *b, const coeffs C)
Definition: bigintmat.cc:349
void Write()
IO: writes the matrix into the current internal string buffer which must be started/ allocated before...
Definition: bigintmat.cc:413
bigintmat * bimCopy(const bigintmat *b)
same as copy constructor - apart from it being able to accept NULL as input
Definition: bigintmat.cc:405
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_...
Definition: bigintmat.h:199
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 ...
Definition: bigintmat.h:164
~bigintmat()
canonical destructor.
Definition: bigintmat.h:152
const ring r
Definition: syzextra.cc:208
Coefficient rings, fields and other domains suitable for Singular polynomials.
Definition: intvec.h:16
bigintmat * bimAdd(bigintmat *a, bigintmat *b)
Matrix-Add/-Sub/-Mult so oder mit operator+/-/* ? : NULL as a result means an error (non-compatible m...
Definition: bigintmat.cc:180
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...
Definition: bigintmat.cc:1204
bool addrow(int i, int j, number a, coeffs c)
... Zeile ...
Definition: bigintmat.cc:950
int j
Definition: myNF.cc:70
void extendCols(int i)
append i zero-columns to the matrix
Definition: bigintmat.cc:1029
#define assume(x)
Definition: mod2.h:405
void swapMatrix(bigintmat *a)
Definition: bigintmat.cc:1468
The main handler for Singular numbers which are suitable for Singular polynomials.
#define A
Definition: sirandom.c:23
void pprint(int maxwid)
Definition: bigintmat.cc:610
bool skalmult(number b, coeffs c)
Multipliziert zur Matrix den Skalar b hinzu.
Definition: bigintmat.cc:906
void swap(int i, int j)
swap columns i and j
Definition: bigintmat.cc:690
bigintmat * bimMult(bigintmat *a, bigintmat *b)
Definition: bigintmat.cc:253
int m
Definition: cfEzgcd.cc:119
void hnf()
transforms INPLACE to HNF
Definition: bigintmat.cc:1562
int i
Definition: cfEzgcd.cc:123
bigintmat * bimSub(bigintmat *a, bigintmat *b)
Definition: bigintmat.cc:216
void rawset(int i, int j, number n, const coeffs C=NULL)
as above, but the 2-dim version
Definition: bigintmat.h:219
bigintmat * modgauss(number p, coeffs c)
int cols() const
Definition: bigintmat.h:147
void Print()
IO: simply prints the matrix to the current output (screen?)
Definition: bigintmat.cc:440
number content()
the content, the gcd of all entries. Only makes sense for Euclidean rings (or possibly constructive P...
Definition: bigintmat.cc:2498
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...
Definition: bigintmat.cc:743
int rows() const
Definition: bigintmat.h:148
bigintmat(const bigintmat *m)
copy constructor
Definition: bigintmat.h:90
bigintmat * modhnf(number p, coeffs c)
computes HNF(this | p*I)
Definition: bigintmat.cc:1734
int col
Definition: bigintmat.h:57
CanonicalForm cf
Definition: cfModGcd.cc:4024
number trace()
the trace ....
Definition: bigintmat.cc:1400
void colskalmult(int i, number a, coeffs c)
Multipliziert zur i-ten Spalte den Skalar a hinzu.
Definition: bigintmat.cc:973
number * v
Definition: bigintmat.h:55
#define NULL
Definition: omList.c:10
bigintmat()
Definition: bigintmat.h:60
void diagonalForm(bigintmat *a, bigintmat **b, bigintmat **c)
Definition: bigintmat.cc:2323
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of &#39;n&#39;
Definition: coeffs.h:452
CanonicalForm den(const CanonicalForm &f)
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&#39;t use it.
Definition: bigintmat.cc:2428
char * String()
IO: String returns a singular string containing the matrix, needs freeing afterwards.
Definition: bigintmat.cc:433
coeffs basecoeffs() const
Definition: bigintmat.h:149
bool operator==(const bigintmat &lhr, const bigintmat &rhr)
Definition: bigintmat.cc:157
bool copy(bigintmat *b)
Kopiert Einträge von b auf Bigintmat.
Definition: bigintmat.cc:1178
void inpMult(number bintop, const coeffs C=NULL)
inplace versio of skalar mult. CHANGES input.
Definition: bigintmat.cc:143
Variable x
Definition: cfModGcd.cc:4023
bool nCoeffs_are_equal(coeffs r, coeffs s)
Definition: bigintmat.cc:2473
number hnfdet()
det via HNF Primzahlen als long long int, müssen noch in number umgewandelt werden?
Definition: bigintmat.cc:1447
bigintmat * elim(int i, int j)
Liefert Streichungsmatrix (i-te Zeile und j-te Spalte gestrichen) zurück.
Definition: bigintmat.cc:1283
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)
Definition: bigintmat.cc:1791
bigintmat * inpmod(number p, coeffs c)
Liefert Kopie der Matrix zurück, allerdings im Ring Z modulo p.
void splitrow(bigintmat *a, bigintmat *b)
Speichert in Matrix a den oberen, in b den unteren Teil der Matrix, vorausgesetzt die Dimensionen sti...
Definition: bigintmat.cc:1074
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete &#39;p&#39;
Definition: coeffs.h:456
number pseudoinv(bigintmat *a)
Speichert in Matrix a die Pseudoinverse, liefert den Nenner zurück.
Definition: bigintmat.cc:1317
int isZero()
Definition: bigintmat.cc:1266
const poly b
Definition: syzextra.cc:213
intvec * bim2iv(bigintmat *b)
Definition: bigintmat.cc:341
void howell()
dito, but Howell form (only different for zero-divsors)
Definition: bigintmat.cc:1487
coeffs m_coeffs
Definition: bigintmat.h:54
bool add(bigintmat *b)
Addiert zur Matrix die Matrix b dazu. Return false => an error occurred.
Definition: bigintmat.cc:870
void Werror(const char *fmt,...)
Definition: reporter.cc:199
void one()
Macht Matrix (Falls quadratisch) zu Einheitsmatrix.
Definition: bigintmat.cc:1238
int l
Definition: cfEzgcd.cc:94
void mod(number p)
Reduziert komplette Matrix modulo p.
Definition: bigintmat.cc:1818