Go to the source code of this file.
◆ IMATELEM
#define IMATELEM |
( |
|
M, |
|
|
|
I, |
|
|
|
J |
|
) |
| (M)[(I-1)*(M).cols()+J-1] |
◆ ivTest
◆ ivAdd()
Definition at line 249 of file intvec.cc.
259 for (
i=0;
i<mn;
i++) (*iv)[
i] = (*a)[
i] + (*b)[
i];
264 for(
i=mn;
i<ma;
i++) (*iv)[
i] = (*a)[
i];
268 for(
i=mn;
i<ma;
i++) (*iv)[
i] = (*b)[
i];
273 if (mn != ma)
return NULL;
275 for (
i=0;
i<mn*a->
cols();
i++) { (*iv)[
i] += (*b)[
i]; }
static int si_max(const int a, const int b)
static int si_min(const int a, const int b)
◆ ivAddShift()
Definition at line 279 of file intvec.cc.
290 for(
i=
b->rows()+
s-1;
i>=
s;
i--)
291 (*iv)[
i] += (*b)[
i-
s];
const CanonicalForm int s
◆ ivConcat()
Definition at line 822 of file intvec.cc.
825 int c = ac +
b->cols();
int r =
si_max(a->
rows(),
b->rows());
834 for (
i=1;
i<=
b->rows();
i++)
836 for(
j=1;
j<=
b->cols();
j++)
#define IMATELEM(M, I, J)
◆ ivCopy()
◆ ivMult()
Definition at line 349 of file intvec.cc.
353 rb =
b->rows(), cb =
b->cols();
355 if (ca != rb)
return NULL;
356 iv =
new intvec(ra, cb, 0);
363 sum += (*a)[
i*ca+
k]*(*b)[
k*cb+
j];
◆ ivSolveKern()
Definition at line 442 of file intvec.cc.
453 for (r=1;r<=dimtr;r++)
460 for (r=dimtr;r>0;r--)
static intvec * ivOptimizeKern(intvec *)
static void ivKernFromRow(intvec *, intvec *, intvec *, int, int, int)
intvec * ivTranp(intvec *o)
◆ ivSub()
Definition at line 297 of file intvec.cc.
307 for (
i=0;
i<mn;
i++) (*iv)[
i] = (*a)[
i] - (*b)[
i];
312 for(
i=mn;
i<ma;
i++) (*iv)[
i] = (*a)[
i];
316 for(
i=mn;
i<ma;
i++) (*iv)[
i] = -(*b)[
i];
321 if (mn != ma)
return NULL;
323 for (
i=0;
i<mn*a->
cols();
i++) { (*iv)[
i] -= (*b)[
i]; }
◆ ivTrace()
◆ ivTranp()
◆ ivTriangIntern()
void ivTriangIntern |
( |
intvec * |
imat, |
|
|
int & |
ready, |
|
|
int & |
all |
|
) |
| |
Definition at line 404 of file intvec.cc.
406 int rpiv, colpos=0, rowpos=0;
407 int ia=ready, ie=all;
415 rpiv =
ivColPivot(imat, colpos, rowpos, ia, ie);
427 if (ia==imat->
cols())
434 ivReduce(imat, rpiv, colpos, ia, ie);
static int ivColPivot(intvec *, int, int, int, int)
static void ivSetRow(intvec *, int, int)
static void ivFreeRow(intvec *, int, int)
static void ivZeroElim(intvec *, int, int, int &)
static void ivSaveRow(intvec *, int)
static void ivReduce(intvec *, int, int, int, int)