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