1583 WerrorS(
"resMatrixSparse::resMatrixSparse: Too many variables!");
1602 LP =
new simplex( idelem+totverts*2+5, totverts+5 );
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: ");
1613 for ( i= 1; i <=
idelem; i++ )
Print(
" %.12f ",(
double)shift[i]);
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++ )
1643 lift[0][1]=3; lift[0][2]=4; lift[0][3]=8; lift[0][4]=2;
1644 lift[1][1]=6; lift[1][2]=1; lift[1][3]=7; lift[1][4]=4;
1645 lift[2][1]=2; lift[2][2]=5; lift[2][3]=9; lift[2][4]=6;
1646 lift[3][1]=2; lift[3][2]=1; lift[3][3]=9; lift[3][4]=5;
1647 lift[4][1]=3; lift[4][2]=7; lift[4][3]=1; lift[4][4]=5;
1649 for ( i= 0; i <=
n; i++ ) Qi[i]->
lift( lift[i] );
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 )
1674 #ifdef mprDEBUG_PROT 1675 PrintS(
" points which lie in a cell:\n");
1676 for ( pnt= 1; pnt <= E->
num; pnt++ )
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!");
1715 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)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
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)
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) .