 |
My Project
debian-1:4.1.2-p1+ds-2
|
|
| resMatrixSparse (const resMatrixSparse &) |
|
void | randomVector (const int dim, mprfloat shift[]) |
|
int | RC (pointSet **pQ, pointSet *E, int vert, mprfloat shift[]) |
| Row Content Function Finds the largest i such that F[i] is a point, F[i]= a[ij] in A[i] for some j. More...
|
|
bool | remapXiToPoint (const int indx, pointSet **pQ, int *set, int *vtx) |
|
int | createMatrix (pointSet *E) |
| create coeff matrix uRPos[i][1]: row of matrix uRPos[i][idelem+1]: col of u(0) uRPos[i][2..idelem]: col of u(1) . More...
|
|
pointSet * | minkSumAll (pointSet **pQ, int numq, int dim) |
|
pointSet * | minkSumTwo (pointSet *Q1, pointSet *Q2, int dim) |
|
Definition at line 66 of file mpr_base.cc.
◆ resMatrixSparse() [1/2]
resMatrixSparse::resMatrixSparse |
( |
const ideal |
_gls, |
|
|
const int |
special = SNONE |
|
) |
| |
Definition at line 1571 of file mpr_base.cc.
1583 WerrorS(
"resMatrixSparse::resMatrixSparse: Too many variables!");
1606 shift[0]=0.005; shift[1]=0.003; shift[2]=0.008; shift[3]=0.005; shift[4]=0.002;
1607 shift[5]=0.1; shift[6]=0.3; shift[7]=0.2; shift[8]=0.4; shift[9]=0.2;
1611 #ifdef mprDEBUG_PROT
1612 PrintS(
" shift vector: ");
1619 Qi= chnp.newtonPolytopesP(
gls );
1626 E= mpa.getInnerPoints( Qi, shift );
1629 #ifdef mprDEBUG_PROT
1633 PrintS(
"\n E = (Q_0 + ... + Q_n) \\cap \\N :\n");
1634 for ( pnt= 1; pnt <=
E->num; pnt++ )
1636 Print(
"%d: <",pnt);print_exp( (*
E)[pnt],
E->dim );
PrintS(
">\n");
1652 for (
i= 0;
i <=
n;
i++ ) Qi[
i]->
lift();
1657 for ( pnt= 1; pnt <=
E->num; pnt++ )
1659 RC( Qi,
E, pnt, shift );
1664 for ( pnt=
k; pnt > 0; pnt-- )
1666 if ( (*
E)[pnt]->rcPnt ==
NULL )
1668 E->removePoint(pnt);
1674 #ifdef mprDEBUG_PROT
1675 PrintS(
" points which lie in a cell:\n");
1676 for ( pnt= 1; pnt <=
E->num; pnt++ )
1678 Print(
"%d: <",pnt);print_exp( (*
E)[pnt],
E->dim );
PrintS(
">\n");
1684 for (
i= 0;
i <=
n;
i++ ) Qi[
i]->unlift();
1688 #ifdef mprDEBUG_PROT
1689 Print(
" points with a[ij] (%d):\n",
E->num);
1690 for ( pnt= 1; pnt <=
E->num; pnt++ )
1692 Print(
"Punkt p \\in E[%d]: <",pnt);print_exp( (*
E)[pnt],
E->dim );
1693 Print(
">, RC(p) = (i:%d, j:%d), a[i,j] = <",(*
E)[pnt]->rc.set,(*
E)[pnt]->rc.pnt);
1695 print_exp( (*
E)[pnt]->rcPnt,
E->dim );
PrintS(
">\n");
1702 WerrorS(
"could not handle a degenerate situation: no inner points found");
1709 WerrorS(
"resMatrixSparse::resMatrixSparse: Error in resMatrixSparse::createMatrix!");
◆ ~resMatrixSparse()
resMatrixSparse::~resMatrixSparse |
( |
| ) |
|
◆ resMatrixSparse() [2/2]
◆ createMatrix()
int resMatrixSparse::createMatrix |
( |
pointSet * |
E | ) |
|
|
private |
create coeff matrix uRPos[i][1]: row of matrix uRPos[i][idelem+1]: col of u(0) uRPos[i][2..idelem]: col of u(1) .
. u(n) i= 1 .. numSet0 Returns the dimension of the matrix or -1 in case of an error
Definition at line 1409 of file mpr_base.cc.
1420 int *epp_mon, *eexp;
1422 epp_mon= (
int *)
omAlloc( (
n+2) *
sizeof(int) );
1440 for (
i= 1;
i <=
E->num;
i++ )
1442 E->getRowMP(
i, epp_mon );
1451 while ( iterp!=
NULL )
1453 epos=
E->getExpPos( iterp );
1458 Werror(
"resMatrixSparse::createMatrix: Found exponent not in E, id %d, set [%d, %d]!",
1459 i,(*
E)[
i]->rc.set,(*
E)[
i]->rc.pnt);
1477 (
rmat->m)[
i-1]= rowp;
1481 omFreeSize( (
void *) epp_mon, (
n+2) *
sizeof(
int) );
1494 PrintS(
" Sparse Matrix done\n");
◆ getDetAt()
number resMatrixSparse::getDetAt |
( |
const number * |
evpoint | ) |
|
|
virtual |
Fills in resMat[][] with evpoint[] and gets determinant uRPos[i][1]: row of matrix uRPos[i][idelem+1]: col of u(0) uRPos[i][2..idelem]: col of u(1) .
. u(n) i= 1 .. numSet0
Reimplemented from resMatrixBase.
Definition at line 1795 of file mpr_base.cc.
1810 for ( cp= 2; cp <=
idelem; cp++ )
1812 if ( !
nIsZero(evpoint[cp-1]) )
◆ getMatrix()
ideal resMatrixSparse::getMatrix |
( |
| ) |
|
|
virtual |
◆ getUDet()
poly resMatrixSparse::getUDet |
( |
const number * |
evpoint | ) |
|
|
virtual |
◆ minkSumAll()
◆ minkSumTwo()
◆ randomVector()
void resMatrixSparse::randomVector |
( |
const int |
dim, |
|
|
mprfloat |
shift[] |
|
) |
| |
|
private |
◆ RC()
Row Content Function Finds the largest i such that F[i] is a point, F[i]= a[ij] in A[i] for some j.
Returns -1 iff the point vert does not lie in a cell
Definition at line 1237 of file mpr_base.cc.
1251 for (
i= 0;
i <=
n;
i++ )
1262 for (
j = 0;
j <=
n;
j++ )
1271 for (
j = 1;
j <=
n;
j++ )
1278 for (
j = 0;
j <=
n;
j++ )
LP->
LiPM[
j+2][1] = 1.0;
1289 Print(
" n= %d, LP->m=M= %d, LP->n=N= %d\n",
n,
LP->
m,
LP->
n);
1317 for (
i= 1;
i <
LP->
m;
i++ )
1338 PrintS(
" now split into sets\n");
1343 for (
i= 0;
i <=
E->dim;
i++ ) bucket[
i]= 0;
1347 for (
i= 0;
i <
LP->
m;
i++ )
1350 if (
LP->
LiPM[
i+2][1] > 1e-12 )
1354 Werror(
" resMatrixSparse::RC: Found bad solution in LP: %d!",
LP->
iposv[
i+1]);
1355 WerrorS(
" resMatrixSparse::RC: remapXiToPoint failed!");
1358 bucket[optSum[c].
set]++;
1366 for (
i= 1;
i <
E->dim;
i++ )
1368 if ( bucket[c] >= bucket[
i] )
1374 for (
i= onum - 1;
i >= 0;
i-- )
1376 if ( optSum[
i].
set == c )
1380 (*E)[vert]->rc.set= c;
1381 (*E)[vert]->rc.pnt= optSum[
i].
pnt;
1382 (*E)[vert]->rcPnt= (*pQ[c])[optSum[
i].
pnt];
1386 #ifdef mprDEBUG_PROT
1387 Print(
"\n Point E[%d] was <",vert);print_exp((*
E)[vert],
E->dim-1);
Print(
">, bucket={");
1388 for (
j= 0;
j <
E->dim;
j++ )
1392 PrintS(
" }\n optimal Sum: Qi ");
1393 for (
j= 0;
j <
LP->
m;
j++ )
1397 Print(
" -> i= %d, j = %d\n",(*
E)[vert]->rc.set,optSum[
i].pnt);
◆ remapXiToPoint()
bool resMatrixSparse::remapXiToPoint |
( |
const int |
indx, |
|
|
pointSet ** |
pQ, |
|
|
int * |
set, |
|
|
int * |
vtx |
|
) |
| |
|
private |
Definition at line 1218 of file mpr_base.cc.
1222 for (
i= 0;
i <= nn;
i++ )
1224 if ( (loffset < indx) && (indx <= pQ[
i]->
num + loffset) )
1230 else loffset+= pQ[
i]->
num;
◆ gls
ideal resMatrixSparse::gls |
|
private |
◆ idelem
int resMatrixSparse::idelem |
|
private |
◆ LP
◆ msize
int resMatrixSparse::msize |
|
private |
◆ numSet0
int resMatrixSparse::numSet0 |
|
private |
◆ rmat
ideal resMatrixSparse::rmat |
|
private |
◆ uRPos
intvec* resMatrixSparse::uRPos |
|
private |
The documentation for this class was generated from the following file:
#define idDelete(H)
delete an ideal
int createMatrix(pointSet *E)
create coeff matrix uRPos[i][1]: row of matrix uRPos[i][idelem+1]: col of u(0) uRPos[i][2....
ideal lift(const ideal J, const ring r, const ideal inI, const ring s)
pointSet * minkSumAll(pointSet **pQ, int numq, int dim)
REvaluation E(1, terms.length(), IntRandom(25))
#define mprSTICKYPROT(msg)
void randomVector(const int dim, mprfloat shift[])
#define mprSTICKYPROT2(msg, arg)
static unsigned pLength(poly a)
for(int i=0;i<=n;i++) degsf[i]
CanonicalForm cd(bCommonDen(FF))
void PrintS(const char *s)
#define omFreeSize(addr, size)
bool addPoint(const onePointP vert)
Adds a point to pointSet, copy vert[0,...,dim] ot point[num+1][0,...,dim].
Linear Programming / Linear Optimization using Simplex - Algorithm.
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
#define IMATELEM(M, I, J)
bool mergeWithExp(const onePointP vert)
Adds point to pointSet, iff pointSet \cap point = \emptyset.
bool remapXiToPoint(const int indx, pointSet **pQ, int *set, int *vtx)
#define pSetmComp(p)
TODO:
void Werror(const char *fmt,...)
ideal idInit(int idsize, int rank)
initialise an ideal / module
int RC(pointSet **pQ, pointSet *E, int vert, mprfloat shift[])
Row Content Function Finds the largest i such that F[i] is a point, F[i]= a[ij] in A[i] for some j.
void WerrorS(const char *s)
poly sm_CallDet(ideal I, const ring R)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
pointSet * minkSumTwo(pointSet *Q1, pointSet *Q2, int dim)