#include <string.h>
#include <omalloc/omallocClass.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 250 of file intvec.cc.
260 for (i=0; i<mn; i++) (*iv)[
i] = (*a)[
i] + (*b)[
i];
265 for(i=mn; i<ma; i++) (*iv)[
i] = (*a)[
i];
269 for(i=mn; i<ma; i++) (*iv)[
i] = (*b)[
i];
274 if (mn != ma)
return NULL;
276 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 805 of file intvec.cc.
812 for (i=1; i<=a->
rows(); i++)
817 for (i=1; i<=b->
rows(); i++)
819 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 332 of file intvec.cc.
338 if (ca != rb)
return NULL;
339 iv =
new intvec(ra, cb, 0);
346 sum += (*a)[i*ca+
k]*(*b)[k*cb+
j];
Definition at line 425 of file intvec.cc.
436 for (r=1;r<=dimtr;r++)
443 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 280 of file intvec.cc.
290 for (i=0; i<mn; i++) (*iv)[
i] = (*a)[
i] - (*b)[
i];
295 for(i=mn; i<ma; i++) (*iv)[
i] = (*a)[
i];
299 for(i=mn; i<ma; i++) (*iv)[
i] = -(*b)[
i];
304 if (mn != ma)
return NULL;
306 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 322 of file intvec.cc.
const CanonicalForm int s
static int si_min(const int a, const int b)
Definition at line 310 of file intvec.cc.
317 (*iv)[j*r+
i] = (*o)[i*c+
j];
void ivTriangIntern |
( |
intvec * |
imat, |
|
|
int & |
ready, |
|
|
int & |
all |
|
) |
| |
Definition at line 387 of file intvec.cc.
389 int rpiv, colpos=0, rowpos=0;
390 int ia=ready, ie=all;
398 rpiv =
ivColPivot(imat, colpos, rowpos, ia, ie);
410 if (ia==imat->
cols())
417 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)