My Project  UNKNOWN_GIT_VERSION
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
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  assume ( !((i<0)||(i>=row*col)) );
120 #endif
121  return v[i]; // Hier sollte imho kein nlCopy rein...
122  }
123  inline const number& operator[](int i) const
124  {
125 #ifndef SING_NDEBUG
126  if((i<0)||(i>=row*col))
127  {
128  Werror("wrong bigintmat index:%d\n",i);
129  }
130  assume ( !((i<0)||(i>=row*col)) );
131 #endif
132  return v[i];
133  }
134 #define BIMATELEM(M,I,J) (M)[(I-1)*(M).cols()+J-1]
135 
136  /// UEberladener *=-Operator (fuer int und bigint)
137  /// Frage hier: *= verwenden oder lieber = und * einzeln?
138  /// problem: what about non-commuting rings. Is this from left or right?
139  void operator*=(int intop);
140 
141  /// inplace version of skalar mult. CHANGES input.
142  void inpMult(number bintop, const coeffs C = NULL);
143 
144  inline int length() { return col*row; }
145  inline int cols() const { return col; }
146  inline int rows() const { return row; }
147  inline coeffs basecoeffs() const { return m_coeffs; }
148 
149  /// canonical destructor.
151  {
152  if (v!=NULL)
153  {
154  for (int i=row*col-1;i>=0; i--) { n_Delete(&(v[i]), basecoeffs()); }
155  omFreeSize((ADDRESS)v, sizeof(number)*row*col);
156  v=NULL;
157  }
158  }
159 
160  /// helper function to map from 2-dim coordinates, starting by 1 to
161  /// 1-dim coordinate, starting by 0
162  int index(int r, int c) const
163  {
164  assume (rows() >= 0 && cols() >= 0);
165 
166  assume (r > 0 && c > 0);
167  assume (r <= rows() && c <= cols());
168 
169  const int index = ((r-1)*cols() + (c-1));
170 
171  assume (index >= 0 && index < rows() * cols());
172  return index;
173  }
174 
175  /// get a copy of an entry. NOTE: starts at [1,1]
176  number get(int i, int j) const;
177  /// view an entry an entry. NOTE: starts at [1,1]
178  //do NOT delete.
179  number view(int i, int j) const;
180 
181  /// get a copy of an entry. NOTE: starts at [0]
182  number get(int i) const;
183  /// view an entry. NOTE: starts at [0]
184  number view(int i) const;
185 
186  /// replace an entry with a copy (delete old + copy new!).
187  /// NOTE: starts at [1,1]
188  void set(int i, int j, number n, const coeffs C = NULL);
189 
190  /// replace an entry with a copy (delete old + copy new!).
191  /// NOTE: starts at [0]
192  void set(int i, number n, const coeffs C = NULL);
193 
194 
195  /// replace an entry with the given number n (only delete old).
196  /// NOTE: starts at [0]. Should be named set_transfer
197  inline void rawset(int i, number n, const coeffs C = NULL)
198  {
199  assume (C == NULL || C == basecoeffs());
200  assume (i >= 0);
201  const int l = rows() * cols();
202  assume (i<l);
203 
204  if (i < l)
205  {
206  n_Delete(&(v[i]), basecoeffs()); v[i] = n;
207  }
208 #ifndef SING_NDEBUG
209  else
210  {
211  Werror("wrong bigintmat index:%d\n",i);
212  }
213 #endif
214  }
215 
216  /// as above, but the 2-dim version
217  inline void rawset(int i, int j, number n, const coeffs C = NULL)
218  {
219  rawset( index(i,j), n, C);
220  }
221 
222  ///IO: String returns a singular string containing the matrix, needs
223  /// freeing afterwards
224  char * String();
225  ///IO: writes the matrix into the current internal string buffer which
226  /// must be started/ allocated before (e.g. @ref StringSetS)
227  void Write();
228  ///IO: simply prints the matrix to the current output (screen?)
229  void Print();
230 
231  /**
232  * Returns a string as it would have been printed in the interpreter.
233  * Used e.g. in print functions of various blackbox types.
234  */
235  char * StringAsPrinted();
236  void pprint(int maxwid);
237  int compare(const bigintmat* op) const;
238  int * getwid(int maxwid);
239 
240 
241  // Funktionen von Kira, Jan, Marco
242  // !WICHTIG: Überall, wo eine number übergeben wird, und damit gearbeitet wird, die coeffs mitübergeben und erst
243  // überprüfen, ob diese mit basecoeffs übereinstimmen. Falls nein: Breche ab!
244 
245  /// swap columns i and j
246  void swap(int i, int j);
247 
248  /// swap rows i and j
249  void swaprow(int i, int j);
250 
251  ///find index of 1st non-zero entry in row i
252  int findnonzero(int i);
253 
254  ///find index of 1st non-zero entry in column j
255  int findcolnonzero(int j);
256 
257  ///copies the j-th column into the matrix a - which needs to be pre-allocated with the correct size.
258  void getcol(int j, bigintmat *a);
259 
260  ///copies the no-columns staring by j (so j...j+no-1) into the pre-allocated a
261  void getColRange(int j, int no, bigintmat *a);
262 
263  void getrow(int i, bigintmat *a); ///< Schreibt i-te Zeile in Vektor (Matrix) a
264  void setcol(int j, bigintmat *m); ///< Setzt j-te Spalte gleich übergebenem Vektor (Matrix) m
265  void setrow(int i, bigintmat *m); ///< Setzt i-te Zeile gleich übergebenem Vektor (Matrix) m
266 
267  ///horizontally join the matrices, m <- m|a
268  void appendCol (bigintmat *a);
269 
270  ///append i zero-columns to the matrix
271  void extendCols (int i);
272 
273  bool add(bigintmat *b); ///< Addiert zur Matrix die Matrix b dazu. Return false => an error occurred
274  bool sub(bigintmat *b); ///< Subtrahiert ...
275  bool skalmult(number b, coeffs c); ///< Multipliziert zur Matrix den Skalar b hinzu
276  bool addcol(int i, int j, number a, coeffs c); ///< addiert a-faches der j-ten Spalte zur i-ten dazu
277  bool addrow(int i, int j, number a, coeffs c); ///< ... Zeile ...
278  void colskalmult(int i, number a, coeffs c); ///< Multipliziert zur i-ten Spalte den Skalar a hinzu
279  void rowskalmult(int i, number a, coeffs c); ///< ... Zeile ...
280  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)
281  void concatrow(bigintmat *a, bigintmat *b); ///< Fügt zwei Matrixen untereinander/nebeneinander in gegebene Matrix ein, bzw spaltet gegebenen Matrix auf
282  void concatcol(bigintmat *a, bigintmat *b);
283  void splitrow(bigintmat *a, bigintmat *b); ///< Speichert in Matrix a den oberen, in b den unteren Teil der Matrix, vorausgesetzt die Dimensionen stimmen überein
284  void splitcol(bigintmat *a, bigintmat *b); ///< ... linken ... rechten ...
285  void splitcol(bigintmat *a, int i); ///< Speichert die ersten i Spalten als Teilmatrix in a
286  void splitrow(bigintmat *a, int i); ///< ... Zeilen ...
287  bool copy(bigintmat *b); ///< Kopiert Einträge von b auf Bigintmat
288  void copySubmatInto(bigintmat *, int sr, int sc, int nr, int nc, int tr, int tc);
289  void one(); ///< Macht Matrix (Falls quadratisch) zu Einheitsmatrix
290  int isOne(); ///< is matrix is identity
291  void zero(); ///< Setzt alle Einträge auf 0
292  int isZero();
293  int colIsZero(int i);
294  bigintmat *elim(int i, int j); ///< Liefert Streichungsmatrix (i-te Zeile und j-te Spalte gestrichen) zurück
295  number pseudoinv(bigintmat *a); ///< Speichert in Matrix a die Pseudoinverse, liefert den Nenner zurück
296  number trace(); ///< the trace ....
297  number det(); ///< det (via LaPlace in general, hnf for euc. rings)
298  number hnfdet(); ///< det via HNF
299  /// Primzahlen als long long int, müssen noch in number umgewandelt werden?
300  void hnf(); ///< transforms INPLACE to HNF
301  void howell(); ///<dito, but Howell form (only different for zero-divsors)
302  void swapMatrix(bigintmat * a);
303  #ifdef HAVE_RINGS
304  bigintmat * modhnf(number p, coeffs c); ///< computes HNF(this | p*I)
305  #endif
306  bigintmat * modgauss(number p, coeffs c);
307  void skaldiv(number b); ///< Macht Ganzzahldivision aller Matrixeinträge mit b
308  void colskaldiv(int j, number b); ///< Macht Ganzzahldivision aller j-ten Spalteneinträge mit b
309  void mod(number p); ///< Reduziert komplette Matrix modulo p
310  bigintmat* inpmod(number p, coeffs c); ///< Liefert Kopie der Matrix zurück, allerdings im Ring Z modulo p
311  number content(); ///<the content, the gcd of all entries. Only makes sense for Euclidean rings (or possibly constructive PIR)
312  void simplifyContentDen(number *den); ///< ensures that Gcd(den, content)=1
313  ///< enden hier wieder
314 };
315 
316 bool operator==(const bigintmat & lhr, const bigintmat & rhr);
317 bool operator!=(const bigintmat & lhr, const bigintmat & rhr);
318 
319 /// Matrix-Add/-Sub/-Mult so oder mit operator+/-/* ?
320 /// @Note: NULL as a result means an error (non-compatible matrices?)
322 bigintmat * bimAdd(bigintmat * a, int b);
324 bigintmat * bimSub(bigintmat * a, int b);
326 bigintmat * bimMult(bigintmat * a, int b);
327 bigintmat * bimMult(bigintmat * a, number b, const coeffs cf);
328 
329 ///same as copy constructor - apart from it being able to accept NULL as input
330 bigintmat * bimCopy(const bigintmat * b);
331 
332 class intvec;
333 intvec * bim2iv(bigintmat * b);
334 bigintmat * iv2bim(intvec * b, const coeffs C);
335 
336 // Wieder von Kira, Jan, Marco
337 bigintmat * bimChangeCoeff(bigintmat *a, coeffs cnew); ///< Liefert Kopier von Matrix a zurück, mit coeffs cnew statt den ursprünglichen
338 void bimMult(bigintmat *a, bigintmat *b, bigintmat *c); ///< Multipliziert Matrix a und b und speichert Ergebnis in c
339 
340 ///solve Ax=b*d. x needs to be pre-allocated to the same number of columns as b.
341 /// the minimal denominator d is returned. Currently available for Z, Q and Z/nZ (and possibly for all fields: d=1 there)
342 ///Beware that the internal functions can find the kernel as well - but the interface is lacking.
343 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
344 
345 ///a basis for the nullspace of a mod p: only used internally in Round2.
346 /// Don't use it.
347 int kernbase (bigintmat *a, bigintmat *c, number p, coeffs q);
349 // enden wieder
350 void diagonalForm(bigintmat *a, bigintmat **b, bigintmat **c);
351 
352 #endif /* #ifndef BIGINTMAT_H */
void * ADDRESS
Definition: auxiliary.h:133
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:2601
bigintmat * bimSub(bigintmat *a, bigintmat *b)
Definition: bigintmat.cc:218
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:2431
void diagonalForm(bigintmat *a, bigintmat **b, bigintmat **c)
Definition: bigintmat.cc:2476
bool nCoeffs_are_equal(coeffs r, coeffs s)
Definition: bigintmat.cc:2646
bigintmat * bimChangeCoeff(bigintmat *a, coeffs cnew)
Liefert Kopier von Matrix a zurück, mit coeffs cnew statt den ursprünglichen.
Definition: bigintmat.cc:1805
bigintmat * bimMult(bigintmat *a, bigintmat *b)
Definition: bigintmat.cc:255
bigintmat * iv2bim(intvec *b, const coeffs C)
Definition: bigintmat.cc:349
bigintmat * bimCopy(const bigintmat *b)
same as copy constructor - apart from it being able to accept NULL as input
Definition: bigintmat.cc:405
bool operator!=(const bigintmat &lhr, const bigintmat &rhr)
Definition: bigintmat.cc:176
intvec * bim2iv(bigintmat *b)
Definition: bigintmat.cc:341
bigintmat * bimAdd(bigintmat *a, bigintmat *b)
Matrix-Add/-Sub/-Mult so oder mit operator+/-/* ? @Note: NULL as a result means an error (non-compati...
Definition: bigintmat.cc:182
bool operator==(const bigintmat &lhr, const bigintmat &rhr)
Definition: bigintmat.cc:159
CanonicalForm den(const CanonicalForm &f)
int l
Definition: cfEzgcd.cc:93
int m
Definition: cfEzgcd.cc:121
int i
Definition: cfEzgcd.cc:125
Variable x
Definition: cfModGcd.cc:4023
int p
Definition: cfModGcd.cc:4019
CanonicalForm cf
Definition: cfModGcd.cc:4024
CanonicalForm b
Definition: cfModGcd.cc:4044
Matrices of numbers.
Definition: bigintmat.h:52
void Print()
IO: simply prints the matrix to the current output (screen?)
Definition: bigintmat.cc:443
~bigintmat()
canonical destructor.
Definition: bigintmat.h:150
void colskaldiv(int j, number b)
Macht Ganzzahldivision aller j-ten Spalteneinträge mit b.
Definition: bigintmat.cc:1877
const number & operator[](int i) const
Definition: bigintmat.h:123
int length()
Definition: bigintmat.h:144
number det()
det (via LaPlace in general, hnf for euc. rings)
Definition: bigintmat.cc:1513
bigintmat * modgauss(number p, coeffs c)
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:1128
coeffs m_coeffs
Definition: bigintmat.h:54
int isOne()
is matrix is identity
Definition: bigintmat.cc:1301
void zero()
Setzt alle Einträge auf 0.
Definition: bigintmat.cc:1351
void appendCol(bigintmat *a)
horizontally join the matrices, m <- m|a
Definition: bigintmat.cc:1084
number trace()
the trace ....
Definition: bigintmat.cc:1499
bool addrow(int i, int j, number a, coeffs c)
... Zeile ...
Definition: bigintmat.cc:984
void swap(int i, int j)
swap columns i and j
Definition: bigintmat.cc:686
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:1890
bool addcol(int i, int j, number a, coeffs c)
addiert a-faches der j-ten Spalte zur i-ten dazu
Definition: bigintmat.cc:960
number * v
Definition: bigintmat.h:55
void hnf()
transforms INPLACE to HNF
Definition: bigintmat.cc:1661
char * StringAsPrinted()
Returns a string as it would have been printed in the interpreter.
Definition: bigintmat.cc:451
void swapMatrix(bigintmat *a)
Definition: bigintmat.cc:1567
int cols() const
Definition: bigintmat.h:145
int isZero()
Definition: bigintmat.cc:1364
number hnfdet()
det via HNF Primzahlen als long long int, müssen noch in number umgewandelt werden?
Definition: bigintmat.cc:1546
int findnonzero(int i)
find index of 1st non-zero entry in row i
Definition: bigintmat.cc:724
bigintmat * modhnf(number p, coeffs c)
computes HNF(this | p*I)
Definition: bigintmat.cc:1833
void setcol(int j, bigintmat *m)
Setzt j-te Spalte gleich übergebenem Vektor (Matrix) m.
Definition: bigintmat.cc:827
bool add(bigintmat *b)
Addiert zur Matrix die Matrix b dazu. Return false => an error occurred.
Definition: bigintmat.cc:895
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:580
void inpMult(number bintop, const coeffs C=NULL)
inplace version of skalar mult. CHANGES input.
Definition: bigintmat.cc:145
bigintmat * transpose()
Definition: bigintmat.cc:37
void setrow(int i, bigintmat *m)
Setzt i-te Zeile gleich übergebenem Vektor (Matrix) m.
Definition: bigintmat.cc:861
void Write()
IO: writes the matrix into the current internal string buffer which must be started/ allocated before...
Definition: bigintmat.cc:413
void rowskalmult(int i, number a, coeffs c)
... Zeile ...
Definition: bigintmat.cc:1024
bool skalmult(number b, coeffs c)
Multipliziert zur Matrix den Skalar b hinzu.
Definition: bigintmat.cc:939
void simplifyContentDen(number *den)
ensures that Gcd(den, content)=1 enden hier wieder
Definition: bigintmat.cc:2689
void extendCols(int i)
append i zero-columns to the matrix
Definition: bigintmat.cc:1077
void splitcol(bigintmat *a, bigintmat *b)
... linken ... rechten ...
Definition: bigintmat.cc:1170
number content()
the content, the gcd of all entries. Only makes sense for Euclidean rings (or possibly constructive P...
Definition: bigintmat.cc:2676
void skaldiv(number b)
Macht Ganzzahldivision aller Matrixeinträge mit b.
Definition: bigintmat.cc:1862
void colskalmult(int i, number a, coeffs c)
Multipliziert zur i-ten Spalte den Skalar a hinzu.
Definition: bigintmat.cc:1008
int colIsZero(int i)
Definition: bigintmat.cc:1578
bool copy(bigintmat *b)
Kopiert Einträge von b auf Bigintmat.
Definition: bigintmat.cc:1260
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:162
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:748
number pseudoinv(bigintmat *a)
Speichert in Matrix a die Pseudoinverse, liefert den Nenner zurück.
Definition: bigintmat.cc:1416
int col
Definition: bigintmat.h:57
bigintmat(const bigintmat *m)
copy constructor
Definition: bigintmat.h:90
int rows() const
Definition: bigintmat.h:146
number get(int i, int j) const
get a copy of an entry. NOTE: starts at [1,1]
Definition: bigintmat.cc:119
bigintmat * inpmod(number p, coeffs c)
Liefert Kopie der Matrix zurück, allerdings im Ring Z modulo p.
void pprint(int maxwid)
Definition: bigintmat.cc:611
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:779
void rawset(int i, int j, number n, const coeffs C=NULL)
as above, but the 2-dim version
Definition: bigintmat.h:217
void concatcol(bigintmat *a, bigintmat *b)
Definition: bigintmat.cc:1099
int findcolnonzero(int j)
find index of 1st non-zero entry in column j
Definition: bigintmat.cc:736
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:1288
number view(int i, int j) const
view an entry an entry. NOTE: starts at [1,1]
Definition: bigintmat.cc:127
void inpTranspose()
transpose in place
Definition: bigintmat.cc:50
void one()
Macht Matrix (Falls quadratisch) zu Einheitsmatrix.
Definition: bigintmat.cc:1326
void howell()
dito, but Howell form (only different for zero-divsors)
Definition: bigintmat.cc:1586
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:197
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
void operator*=(int intop)
UEberladener *=-Operator (fuer int und bigint) Frage hier: *= verwenden oder lieber = und * einzeln?...
Definition: bigintmat.cc:136
coeffs basecoeffs() const
Definition: bigintmat.h:147
void getrow(int i, bigintmat *a)
Schreibt i-te Zeile in Vektor (Matrix) a.
Definition: bigintmat.cc:792
void concatrow(bigintmat *a, bigintmat *b)
Fügt zwei Matrixen untereinander/nebeneinander in gegebene Matrix ein, bzw spaltet gegebenen Matrix a...
Definition: bigintmat.cc:1040
bigintmat()
Definition: bigintmat.h:60
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:95
bigintmat * elim(int i, int j)
Liefert Streichungsmatrix (i-te Zeile und j-te Spalte gestrichen) zurück.
Definition: bigintmat.cc:1382
int compare(const bigintmat *op) const
Definition: bigintmat.cc:362
bool sub(bigintmat *b)
Subtrahiert ...
Definition: bigintmat.cc:917
int row
Definition: bigintmat.h:56
char * String()
IO: String returns a singular string containing the matrix, needs freeing afterwards.
Definition: bigintmat.cc:436
void swaprow(int i, int j)
swap rows i and j
Definition: bigintmat.cc:705
void mod(number p)
Reduziert komplette Matrix modulo p.
Definition: bigintmat.cc:1917
Definition: intvec.h:21
Coefficient rings, fields and other domains suitable for Singular polynomials.
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
Definition: coeffs.h:451
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition: coeffs.h:455
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:538
const CanonicalForm int s
Definition: facAbsFact.cc:55
int j
Definition: facHensel.cc:105
#define assume(x)
Definition: mod2.h:390
The main handler for Singular numbers which are suitable for Singular polynomials.
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
#define omAlloc(size)
Definition: omAllocDecl.h:210
#define NULL
Definition: omList.c:10
void Werror(const char *fmt,...)
Definition: reporter.cc:189
#define A
Definition: sirandom.c:23