#include <string.h>
#include <omalloc/omalloc.h>
#include <reporter/reporter.h>
Go to the source code of this file.
#define IMATELEM |
( |
|
M, |
|
|
|
I, |
|
|
|
J |
|
) |
| (M)[(I-1)*(M).cols()+J-1] |
Definition at line 276 of file intvec.cc.
286 for (i=0; i<mn; i++) (*iv)[
i] = (*a)[
i] + (*b)[
i];
291 for(i=mn; i<ma; i++) (*iv)[
i] = (*a)[
i];
295 for(i=mn; i<ma; i++) (*iv)[
i] = (*b)[
i];
300 if (mn != ma)
return NULL;
302 for (i=0; i<mn*a->
cols(); i++) { (*iv)[
i] += (*b)[
i]; }
static int si_min(const int a, const int b)
static int si_max(const int a, const int b)
Definition at line 831 of file intvec.cc.
838 for (i=1; i<=a->
rows(); i++)
843 for (i=1; i<=b->
rows(); i++)
845 for(j=1; j<=b->
cols(); j++)
static int si_max(const int a, const int b)
#define IMATELEM(M, I, J)
Definition at line 358 of file intvec.cc.
364 if (ca != rb)
return NULL;
365 iv =
new intvec(ra, cb, 0);
372 sum += (*a)[i*ca+
k]*(*b)[k*cb+
j];
Definition at line 451 of file intvec.cc.
462 for (r=1;r<=dimtr;r++)
469 for (r=dimtr;r>0;r--)
static intvec * ivOptimizeKern(intvec *)
intvec * ivTranp(intvec *o)
static void ivKernFromRow(intvec *, intvec *, intvec *, int, int, int)
#define IMATELEM(M, I, J)
Definition at line 306 of file intvec.cc.
316 for (i=0; i<mn; i++) (*iv)[
i] = (*a)[
i] - (*b)[
i];
321 for(i=mn; i<ma; i++) (*iv)[
i] = (*a)[
i];
325 for(i=mn; i<ma; i++) (*iv)[
i] = -(*b)[
i];
330 if (mn != ma)
return NULL;
332 for (i=0; i<mn*a->
cols(); i++) { (*iv)[
i] -= (*b)[
i]; }
static int si_min(const int a, const int b)
static int si_max(const int a, const int b)
Definition at line 348 of file intvec.cc.
const CanonicalForm int s
static int si_min(const int a, const int b)
Definition at line 336 of file intvec.cc.
343 (*iv)[j*r+
i] = (*o)[i*c+
j];
void ivTriangIntern |
( |
intvec * |
imat, |
|
|
int & |
ready, |
|
|
int & |
all |
|
) |
| |
Definition at line 413 of file intvec.cc.
415 int rpiv, colpos=0, rowpos=0;
416 int ia=ready, ie=all;
424 rpiv =
ivColPivot(imat, colpos, rowpos, ia, ie);
436 if (ia==imat->
cols())
443 ivReduce(imat, rpiv, colpos, ia, ie);
static void ivZeroElim(intvec *, int, int, int &)
static void ivFreeRow(intvec *, int, int)
static void ivSaveRow(intvec *, int)
static int ivColPivot(intvec *, int, int, int, int)
static void ivReduce(intvec *, int, int, int, int)
static void ivSetRow(intvec *, int, int)