 |
My Project
debian-1:4.1.1-p2+ds-4
|
|
| 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 68 of file mpr_base.cc.
◆ resMatrixSparse() [1/2]
resMatrixSparse::resMatrixSparse |
( |
const ideal |
_gls, |
|
|
const int |
special = SNONE |
|
) |
| |
Definition at line 1573 of file mpr_base.cc.
1585 WerrorS(
"resMatrixSparse::resMatrixSparse: Too many variables!");
1608 shift[0]=0.005; shift[1]=0.003; shift[2]=0.008; shift[3]=0.005; shift[4]=0.002;
1609 shift[5]=0.1; shift[6]=0.3; shift[7]=0.2; shift[8]=0.4; shift[9]=0.2;
1613 #ifdef mprDEBUG_PROT
1614 PrintS(
" shift vector: ");
1621 Qi= chnp.newtonPolytopesP(
gls );
1628 E= mpa.getInnerPoints( Qi, shift );
1631 #ifdef mprDEBUG_PROT
1635 PrintS(
"\n E = (Q_0 + ... + Q_n) \\cap \\N :\n");
1636 for ( pnt= 1; pnt <=
E->num; pnt++ )
1638 Print(
"%d: <",pnt);print_exp( (*
E)[pnt],
E->dim );
PrintS(
">\n");
1654 for (
i= 0;
i <=
n;
i++ ) Qi[
i]->
lift();
1659 for ( pnt= 1; pnt <=
E->num; pnt++ )
1661 RC( Qi,
E, pnt, shift );
1666 for ( pnt=
k; pnt > 0; pnt-- )
1668 if ( (*
E)[pnt]->rcPnt ==
NULL )
1670 E->removePoint(pnt);
1676 #ifdef mprDEBUG_PROT
1677 PrintS(
" points which lie in a cell:\n");
1678 for ( pnt= 1; pnt <=
E->num; pnt++ )
1680 Print(
"%d: <",pnt);print_exp( (*
E)[pnt],
E->dim );
PrintS(
">\n");
1686 for (
i= 0;
i <=
n;
i++ ) Qi[
i]->unlift();
1690 #ifdef mprDEBUG_PROT
1691 Print(
" points with a[ij] (%d):\n",
E->num);
1692 for ( pnt= 1; pnt <=
E->num; pnt++ )
1694 Print(
"Punkt p \\in E[%d]: <",pnt);print_exp( (*
E)[pnt],
E->dim );
1695 Print(
">, RC(p) = (i:%d, j:%d), a[i,j] = <",(*
E)[pnt]->rc.set,(*
E)[pnt]->rc.pnt);
1697 print_exp( (*
E)[pnt]->rcPnt,
E->dim );
PrintS(
">\n");
1704 WerrorS(
"could not handle a degenerate situation: no inner points found");
1711 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 1411 of file mpr_base.cc.
1422 int *epp_mon, *eexp;
1424 epp_mon= (
int *)
omAlloc( (
n+2) *
sizeof(int) );
1442 for (
i= 1;
i <=
E->num;
i++ )
1444 E->getRowMP(
i, epp_mon );
1453 while ( iterp!=
NULL )
1455 epos=
E->getExpPos( iterp );
1460 Werror(
"resMatrixSparse::createMatrix: Found exponent not in E, id %d, set [%d, %d]!",
1461 i,(*
E)[
i]->rc.set,(*
E)[
i]->rc.pnt);
1479 (
rmat->m)[
i-1]= rowp;
1483 omFreeSize( (
void *) epp_mon, (
n+2) *
sizeof(
int) );
1496 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 1797 of file mpr_base.cc.
1812 for ( cp= 2; cp <=
idelem; cp++ )
1814 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 1239 of file mpr_base.cc.
1253 for (
i= 0;
i <=
n;
i++ )
1264 for (
j = 0;
j <=
n;
j++ )
1273 for (
j = 1;
j <=
n;
j++ )
1280 for (
j = 0;
j <=
n;
j++ )
LP->
LiPM[
j+2][1] = 1.0;
1291 Print(
" n= %d, LP->m=M= %d, LP->n=N= %d\n",
n,
LP->
m,
LP->
n);
1319 for (
i= 1;
i <
LP->
m;
i++ )
1340 PrintS(
" now split into sets\n");
1345 for (
i= 0;
i <=
E->dim;
i++ ) bucket[
i]= 0;
1349 for (
i= 0;
i <
LP->
m;
i++ )
1352 if (
LP->
LiPM[
i+2][1] > 1e-12 )
1356 Werror(
" resMatrixSparse::RC: Found bad solution in LP: %d!",
LP->
iposv[
i+1]);
1357 WerrorS(
" resMatrixSparse::RC: remapXiToPoint failed!");
1360 bucket[optSum[c].
set]++;
1368 for (
i= 1;
i <
E->dim;
i++ )
1370 if ( bucket[c] >= bucket[
i] )
1376 for (
i= onum - 1;
i >= 0;
i-- )
1378 if ( optSum[
i].
set == c )
1382 (*E)[vert]->rc.set= c;
1383 (*E)[vert]->rc.pnt= optSum[
i].
pnt;
1384 (*E)[vert]->rcPnt= (*pQ[c])[optSum[
i].
pnt];
1388 #ifdef mprDEBUG_PROT
1389 Print(
"\n Point E[%d] was <",vert);print_exp((*
E)[vert],
E->dim-1);
Print(
">, bucket={");
1390 for (
j= 0;
j <
E->dim;
j++ )
1394 PrintS(
" }\n optimal Sum: Qi ");
1395 for (
j= 0;
j <
LP->
m;
j++ )
1399 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 1220 of file mpr_base.cc.
1224 for (
i= 0;
i <= nn;
i++ )
1226 if ( (loffset < indx) && (indx <= pQ[
i]->
num + loffset) )
1232 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]
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
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)
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)