1585 WerrorS(
"resMatrixSparse::resMatrixSparse: Too many variables!");
1604 LP =
new simplex( idelem+totverts*2+5, totverts+5 );
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: ");
1615 for ( i= 1; i <=
idelem; i++ )
Print(
" %.12f ",(
double)shift[i]);
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++ )
1645 lift[0][1]=3; lift[0][2]=4; lift[0][3]=8; lift[0][4]=2;
1646 lift[1][1]=6; lift[1][2]=1; lift[1][3]=7; lift[1][4]=4;
1647 lift[2][1]=2; lift[2][2]=5; lift[2][3]=9; lift[2][4]=6;
1648 lift[3][1]=2; lift[3][2]=1; lift[3][3]=9; lift[3][4]=5;
1649 lift[4][1]=3; lift[4][2]=7; lift[4][3]=1; lift[4][4]=5;
1651 for ( i= 0; i <=
n; i++ ) Qi[i]->
lift( lift[i] );
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 )
1676 #ifdef mprDEBUG_PROT 1677 PrintS(
" points which lie in a cell:\n");
1678 for ( pnt= 1; pnt <= E->
num; pnt++ )
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!");
1717 for ( i= 0; i <
idelem; i++ )
#define mprSTICKYPROT(msg)
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 randomVector(const int dim, mprfloat shift[])
Linear Programming / Linear Optimization using Simplex - Algorithm.
#define omFreeSize(addr, size)
void WerrorS(const char *s)
ideal lift(const ideal J, const ring r, const ideal inI, const ring s)
void PrintS(const char *s)
static unsigned pLength(poly a)
REvaluation E(1, terms.length(), IntRandom(25))
bool removePoint(const int indx)
pointSet * minkSumAll(pointSet **pQ, int numq, int dim)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
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) .