My Project  debian-1:4.1.1-p2+ds-4build3
Macros | Functions
mpr_inout.h File Reference

Go to the source code of this file.

Macros

#define DEFAULT_DIGITS   30
 
#define MPR_DENSE   1
 
#define MPR_SPARSE   2
 

Functions

BOOLEAN nuUResSolve (leftv res, leftv args)
 solve a multipolynomial system using the u-resultant Input ideal must be 0-dimensional and (currRing->N) == IDELEMS(ideal). More...
 
BOOLEAN nuMPResMat (leftv res, leftv arg1, leftv arg2)
 returns module representing the multipolynomial resultant matrix Arguments 2: ideal i, int k k=0: use sparse resultant matrix of Gelfand, Kapranov and Zelevinsky k=1: use resultant matrix of Macaulay (k=0 is default) More...
 
BOOLEAN nuLagSolve (leftv res, leftv arg1, leftv arg2, leftv arg3)
 find the (complex) roots an univariate polynomial Determines the roots of an univariate polynomial using Laguerres' root-solver. More...
 
BOOLEAN nuVanderSys (leftv res, leftv arg1, leftv arg2, leftv arg3)
 COMPUTE: polynomial p with values given by v at points p1,..,pN derived from p; more precisely: consider p as point in K^n and v as N elements in K, let p1,..,pN be the points in K^n obtained by evaluating all monomials of degree 0,1,...,N at p in lexicographical order, then the procedure computes the polynomial f satisfying f(pi) = v[i] RETURN: polynomial f of degree d. More...
 
BOOLEAN loNewtonP (leftv res, leftv arg1)
 compute Newton Polytopes of input polynomials More...
 
BOOLEAN loSimplex (leftv res, leftv args)
 Implementation of the Simplex Algorithm. More...
 

Macro Definition Documentation

◆ DEFAULT_DIGITS

#define DEFAULT_DIGITS   30

Definition at line 14 of file mpr_inout.h.

◆ MPR_DENSE

#define MPR_DENSE   1

Definition at line 16 of file mpr_inout.h.

◆ MPR_SPARSE

#define MPR_SPARSE   2

Definition at line 17 of file mpr_inout.h.

Function Documentation

◆ loNewtonP()

BOOLEAN loNewtonP ( leftv  res,
leftv  arg1 
)

compute Newton Polytopes of input polynomials

Definition at line 4501 of file ipshell.cc.

4502 {
4503  res->data= (void*)loNewtonPolytope( (ideal)arg1->Data() );
4504  return FALSE;
4505 }

◆ loSimplex()

BOOLEAN loSimplex ( leftv  res,
leftv  args 
)

Implementation of the Simplex Algorithm.

For args, see class simplex.

Definition at line 4507 of file ipshell.cc.

4508 {
4509  if ( !(rField_is_long_R(currRing)) )
4510  {
4511  WerrorS("Ground field not implemented!");
4512  return TRUE;
4513  }
4514 
4515  simplex * LP;
4516  matrix m;
4517 
4518  leftv v= args;
4519  if ( v->Typ() != MATRIX_CMD ) // 1: matrix
4520  return TRUE;
4521  else
4522  m= (matrix)(v->CopyD());
4523 
4524  LP = new simplex(MATROWS(m),MATCOLS(m));
4525  LP->mapFromMatrix(m);
4526 
4527  v= v->next;
4528  if ( v->Typ() != INT_CMD ) // 2: m = number of constraints
4529  return TRUE;
4530  else
4531  LP->m= (int)(long)(v->Data());
4532 
4533  v= v->next;
4534  if ( v->Typ() != INT_CMD ) // 3: n = number of variables
4535  return TRUE;
4536  else
4537  LP->n= (int)(long)(v->Data());
4538 
4539  v= v->next;
4540  if ( v->Typ() != INT_CMD ) // 4: m1 = number of <= constraints
4541  return TRUE;
4542  else
4543  LP->m1= (int)(long)(v->Data());
4544 
4545  v= v->next;
4546  if ( v->Typ() != INT_CMD ) // 5: m2 = number of >= constraints
4547  return TRUE;
4548  else
4549  LP->m2= (int)(long)(v->Data());
4550 
4551  v= v->next;
4552  if ( v->Typ() != INT_CMD ) // 6: m3 = number of == constraints
4553  return TRUE;
4554  else
4555  LP->m3= (int)(long)(v->Data());
4556 
4557 #ifdef mprDEBUG_PROT
4558  Print("m (constraints) %d\n",LP->m);
4559  Print("n (columns) %d\n",LP->n);
4560  Print("m1 (<=) %d\n",LP->m1);
4561  Print("m2 (>=) %d\n",LP->m2);
4562  Print("m3 (==) %d\n",LP->m3);
4563 #endif
4564 
4565  LP->compute();
4566 
4567  lists lres= (lists)omAlloc( sizeof(slists) );
4568  lres->Init( 6 );
4569 
4570  lres->m[0].rtyp= MATRIX_CMD; // output matrix
4571  lres->m[0].data=(void*)LP->mapToMatrix(m);
4572 
4573  lres->m[1].rtyp= INT_CMD; // found a solution?
4574  lres->m[1].data=(void*)(long)LP->icase;
4575 
4576  lres->m[2].rtyp= INTVEC_CMD;
4577  lres->m[2].data=(void*)LP->posvToIV();
4578 
4579  lres->m[3].rtyp= INTVEC_CMD;
4580  lres->m[3].data=(void*)LP->zrovToIV();
4581 
4582  lres->m[4].rtyp= INT_CMD;
4583  lres->m[4].data=(void*)(long)LP->m;
4584 
4585  lres->m[5].rtyp= INT_CMD;
4586  lres->m[5].data=(void*)(long)LP->n;
4587 
4588  res->data= (void*)lres;
4589 
4590  return FALSE;
4591 }

◆ nuLagSolve()

BOOLEAN nuLagSolve ( leftv  res,
leftv  arg1,
leftv  arg2,
leftv  arg3 
)

find the (complex) roots an univariate polynomial Determines the roots of an univariate polynomial using Laguerres' root-solver.

Good for polynomials with low and middle degree (<40). Arguments 3: poly arg1 , int arg2 , int arg3 arg2>0: defines precision of fractional part if ground field is Q arg3: number of iterations for approximation of roots (default=2) Returns a list of all (complex) roots of the polynomial arg1

Definition at line 4616 of file ipshell.cc.

4617 {
4618 
4619  poly gls;
4620  gls= (poly)(arg1->Data());
4621  int howclean= (int)(long)arg3->Data();
4622 
4623  if ( !(rField_is_R(currRing) ||
4624  rField_is_Q(currRing) ||
4627  {
4628  WerrorS("Ground field not implemented!");
4629  return TRUE;
4630  }
4631 
4634  {
4635  unsigned long int ii = (unsigned long int)arg2->Data();
4636  setGMPFloatDigits( ii, ii );
4637  }
4638 
4639  if ( gls == NULL || pIsConstant( gls ) )
4640  {
4641  WerrorS("Input polynomial is constant!");
4642  return TRUE;
4643  }
4644 
4645  int ldummy;
4646  int deg= currRing->pLDeg( gls, &ldummy, currRing );
4647  int i,vpos=0;
4648  poly piter;
4649  lists elist;
4650  lists rlist;
4651 
4652  elist= (lists)omAlloc( sizeof(slists) );
4653  elist->Init( 0 );
4654 
4655  if ( rVar(currRing) > 1 )
4656  {
4657  piter= gls;
4658  for ( i= 1; i <= rVar(currRing); i++ )
4659  if ( pGetExp( piter, i ) )
4660  {
4661  vpos= i;
4662  break;
4663  }
4664  while ( piter )
4665  {
4666  for ( i= 1; i <= rVar(currRing); i++ )
4667  if ( (vpos != i) && (pGetExp( piter, i ) != 0) )
4668  {
4669  WerrorS("The input polynomial must be univariate!");
4670  return TRUE;
4671  }
4672  pIter( piter );
4673  }
4674  }
4675 
4676  rootContainer * roots= new rootContainer();
4677  number * pcoeffs= (number *)omAlloc( (deg+1) * sizeof( number ) );
4678  piter= gls;
4679  for ( i= deg; i >= 0; i-- )
4680  {
4681  if ( piter && pTotaldegree(piter) == i )
4682  {
4683  pcoeffs[i]= nCopy( pGetCoeff( piter ) );
4684  //nPrint( pcoeffs[i] );PrintS(" ");
4685  pIter( piter );
4686  }
4687  else
4688  {
4689  pcoeffs[i]= nInit(0);
4690  }
4691  }
4692 
4693 #ifdef mprDEBUG_PROT
4694  for (i=deg; i >= 0; i--)
4695  {
4696  nPrint( pcoeffs[i] );PrintS(" ");
4697  }
4698  PrintLn();
4699 #endif
4700 
4701  roots->fillContainer( pcoeffs, NULL, 1, deg, rootContainer::onepoly, 1 );
4702  roots->solver( howclean );
4703 
4704  int elem= roots->getAnzRoots();
4705  char *dummy;
4706  int j;
4707 
4708  rlist= (lists)omAlloc( sizeof(slists) );
4709  rlist->Init( elem );
4710 
4712  {
4713  for ( j= 0; j < elem; j++ )
4714  {
4715  rlist->m[j].rtyp=NUMBER_CMD;
4716  rlist->m[j].data=(void *)nCopy((number)(roots->getRoot(j)));
4717  //rlist->m[j].data=(void *)(number)(roots->getRoot(j));
4718  }
4719  }
4720  else
4721  {
4722  for ( j= 0; j < elem; j++ )
4723  {
4724  dummy = complexToStr( (*roots)[j], gmp_output_digits, currRing->cf );
4725  rlist->m[j].rtyp=STRING_CMD;
4726  rlist->m[j].data=(void *)dummy;
4727  }
4728  }
4729 
4730  elist->Clean();
4731  //omFreeSize( (ADDRESS) elist, sizeof(slists) );
4732 
4733  // this is (via fillContainer) the same data as in root
4734  //for ( i= deg; i >= 0; i-- ) nDelete( &pcoeffs[i] );
4735  //omFreeSize( (ADDRESS) pcoeffs, (deg+1) * sizeof( number ) );
4736 
4737  delete roots;
4738 
4739  res->rtyp= LIST_CMD;
4740  res->data= (void*)rlist;
4741 
4742  return FALSE;
4743 }

◆ nuMPResMat()

BOOLEAN nuMPResMat ( leftv  res,
leftv  arg1,
leftv  arg2 
)

returns module representing the multipolynomial resultant matrix Arguments 2: ideal i, int k k=0: use sparse resultant matrix of Gelfand, Kapranov and Zelevinsky k=1: use resultant matrix of Macaulay (k=0 is default)

Definition at line 4593 of file ipshell.cc.

4594 {
4595  ideal gls = (ideal)(arg1->Data());
4596  int imtype= (int)(long)arg2->Data();
4597 
4598  uResultant::resMatType mtype= determineMType( imtype );
4599 
4600  // check input ideal ( = polynomial system )
4601  if ( mprIdealCheck( gls, arg1->Name(), mtype, true ) != mprOk )
4602  {
4603  return TRUE;
4604  }
4605 
4606  uResultant *resMat= new uResultant( gls, mtype, false );
4607  if (resMat!=NULL)
4608  {
4609  res->rtyp = MODUL_CMD;
4610  res->data= (void*)resMat->accessResMat()->getMatrix();
4611  if (!errorreported) delete resMat;
4612  }
4613  return errorreported;
4614 }

◆ nuUResSolve()

BOOLEAN nuUResSolve ( leftv  res,
leftv  args 
)

solve a multipolynomial system using the u-resultant Input ideal must be 0-dimensional and (currRing->N) == IDELEMS(ideal).

Resultant method can be MPR_DENSE, which uses Macaulay Resultant (good for dense homogeneous polynoms) or MPR_SPARSE, which uses Sparse Resultant (Gelfand, Kapranov, Zelevinsky). Arguments 4: ideal i, int k, int l, int m k=0: use sparse resultant matrix of Gelfand, Kapranov and Zelevinsky k=1: use resultant matrix of Macaulay (k=0 is default) l>0: defines precision of fractional part if ground field is Q m=0,1,2: number of iterations for approximation of roots (default=2) Returns a list containing the roots of the system.

Definition at line 4846 of file ipshell.cc.

4847 {
4848  leftv v= args;
4849 
4850  ideal gls;
4851  int imtype;
4852  int howclean;
4853 
4854  // get ideal
4855  if ( v->Typ() != IDEAL_CMD )
4856  return TRUE;
4857  else gls= (ideal)(v->Data());
4858  v= v->next;
4859 
4860  // get resultant matrix type to use (0,1)
4861  if ( v->Typ() != INT_CMD )
4862  return TRUE;
4863  else imtype= (int)(long)v->Data();
4864  v= v->next;
4865 
4866  if (imtype==0)
4867  {
4868  ideal test_id=idInit(1,1);
4869  int j;
4870  for(j=IDELEMS(gls)-1;j>=0;j--)
4871  {
4872  if (gls->m[j]!=NULL)
4873  {
4874  test_id->m[0]=gls->m[j];
4875  intvec *dummy_w=id_QHomWeight(test_id, currRing);
4876  if (dummy_w!=NULL)
4877  {
4878  WerrorS("Newton polytope not of expected dimension");
4879  delete dummy_w;
4880  return TRUE;
4881  }
4882  }
4883  }
4884  }
4885 
4886  // get and set precision in digits ( > 0 )
4887  if ( v->Typ() != INT_CMD )
4888  return TRUE;
4889  else if ( !(rField_is_R(currRing) || rField_is_long_R(currRing) || \
4891  {
4892  unsigned long int ii=(unsigned long int)v->Data();
4893  setGMPFloatDigits( ii, ii );
4894  }
4895  v= v->next;
4896 
4897  // get interpolation steps (0,1,2)
4898  if ( v->Typ() != INT_CMD )
4899  return TRUE;
4900  else howclean= (int)(long)v->Data();
4901 
4902  uResultant::resMatType mtype= determineMType( imtype );
4903  int i,count;
4904  lists listofroots= NULL;
4905  number smv= NULL;
4906  BOOLEAN interpolate_det= (mtype==uResultant::denseResMat)?TRUE:FALSE;
4907 
4908  //emptylist= (lists)omAlloc( sizeof(slists) );
4909  //emptylist->Init( 0 );
4910 
4911  //res->rtyp = LIST_CMD;
4912  //res->data= (void *)emptylist;
4913 
4914  // check input ideal ( = polynomial system )
4915  if ( mprIdealCheck( gls, args->Name(), mtype ) != mprOk )
4916  {
4917  return TRUE;
4918  }
4919 
4920  uResultant * ures;
4921  rootContainer ** iproots;
4922  rootContainer ** muiproots;
4923  rootArranger * arranger;
4924 
4925  // main task 1: setup of resultant matrix
4926  ures= new uResultant( gls, mtype );
4927  if ( ures->accessResMat()->initState() != resMatrixBase::ready )
4928  {
4929  WerrorS("Error occurred during matrix setup!");
4930  return TRUE;
4931  }
4932 
4933  // if dense resultant, check if minor nonsingular
4934  if ( mtype == uResultant::denseResMat )
4935  {
4936  smv= ures->accessResMat()->getSubDet();
4937 #ifdef mprDEBUG_PROT
4938  PrintS("// Determinant of submatrix: ");nPrint(smv);PrintLn();
4939 #endif
4940  if ( nIsZero(smv) )
4941  {
4942  WerrorS("Unsuitable input ideal: Minor of resultant matrix is singular!");
4943  return TRUE;
4944  }
4945  }
4946 
4947  // main task 2: Interpolate specialized resultant polynomials
4948  if ( interpolate_det )
4949  iproots= ures->interpolateDenseSP( false, smv );
4950  else
4951  iproots= ures->specializeInU( false, smv );
4952 
4953  // main task 3: Interpolate specialized resultant polynomials
4954  if ( interpolate_det )
4955  muiproots= ures->interpolateDenseSP( true, smv );
4956  else
4957  muiproots= ures->specializeInU( true, smv );
4958 
4959 #ifdef mprDEBUG_PROT
4960  int c= iproots[0]->getAnzElems();
4961  for (i=0; i < c; i++) pWrite(iproots[i]->getPoly());
4962  c= muiproots[0]->getAnzElems();
4963  for (i=0; i < c; i++) pWrite(muiproots[i]->getPoly());
4964 #endif
4965 
4966  // main task 4: Compute roots of specialized polys and match them up
4967  arranger= new rootArranger( iproots, muiproots, howclean );
4968  arranger->solve_all();
4969 
4970  // get list of roots
4971  if ( arranger->success() )
4972  {
4973  arranger->arrange();
4974  listofroots= listOfRoots(arranger, gmp_output_digits );
4975  }
4976  else
4977  {
4978  WerrorS("Solver was unable to find any roots!");
4979  return TRUE;
4980  }
4981 
4982  // free everything
4983  count= iproots[0]->getAnzElems();
4984  for (i=0; i < count; i++) delete iproots[i];
4985  omFreeSize( (ADDRESS) iproots, count * sizeof(rootContainer*) );
4986  count= muiproots[0]->getAnzElems();
4987  for (i=0; i < count; i++) delete muiproots[i];
4988  omFreeSize( (ADDRESS) muiproots, count * sizeof(rootContainer*) );
4989 
4990  delete ures;
4991  delete arranger;
4992  nDelete( &smv );
4993 
4994  res->data= (void *)listofroots;
4995 
4996  //emptylist->Clean();
4997  // omFreeSize( (ADDRESS) emptylist, sizeof(slists) );
4998 
4999  return FALSE;
5000 }

◆ nuVanderSys()

BOOLEAN nuVanderSys ( leftv  res,
leftv  arg1,
leftv  arg2,
leftv  arg3 
)

COMPUTE: polynomial p with values given by v at points p1,..,pN derived from p; more precisely: consider p as point in K^n and v as N elements in K, let p1,..,pN be the points in K^n obtained by evaluating all monomials of degree 0,1,...,N at p in lexicographical order, then the procedure computes the polynomial f satisfying f(pi) = v[i] RETURN: polynomial f of degree d.

Definition at line 4745 of file ipshell.cc.

4746 {
4747  int i;
4748  ideal p,w;
4749  p= (ideal)arg1->Data();
4750  w= (ideal)arg2->Data();
4751 
4752  // w[0] = f(p^0)
4753  // w[1] = f(p^1)
4754  // ...
4755  // p can be a vector of numbers (multivariate polynom)
4756  // or one number (univariate polynom)
4757  // tdg = deg(f)
4758 
4759  int n= IDELEMS( p );
4760  int m= IDELEMS( w );
4761  int tdg= (int)(long)arg3->Data();
4762 
4763  res->data= (void*)NULL;
4764 
4765  // check the input
4766  if ( tdg < 1 )
4767  {
4768  WerrorS("Last input parameter must be > 0!");
4769  return TRUE;
4770  }
4771  if ( n != rVar(currRing) )
4772  {
4773  Werror("Size of first input ideal must be equal to %d!",rVar(currRing));
4774  return TRUE;
4775  }
4776  if ( m != (int)pow((double)tdg+1,(double)n) )
4777  {
4778  Werror("Size of second input ideal must be equal to %d!",
4779  (int)pow((double)tdg+1,(double)n));
4780  return TRUE;
4781  }
4782  if ( !(rField_is_Q(currRing) /* ||
4783  rField_is_R() || rField_is_long_R() ||
4784  rField_is_long_C()*/ ) )
4785  {
4786  WerrorS("Ground field not implemented!");
4787  return TRUE;
4788  }
4789 
4790  number tmp;
4791  number *pevpoint= (number *)omAlloc( n * sizeof( number ) );
4792  for ( i= 0; i < n; i++ )
4793  {
4794  pevpoint[i]=nInit(0);
4795  if ( (p->m)[i] )
4796  {
4797  tmp = pGetCoeff( (p->m)[i] );
4798  if ( nIsZero(tmp) || nIsOne(tmp) || nIsMOne(tmp) )
4799  {
4800  omFreeSize( (ADDRESS)pevpoint, n * sizeof( number ) );
4801  WerrorS("Elements of first input ideal must not be equal to -1, 0, 1!");
4802  return TRUE;
4803  }
4804  } else tmp= NULL;
4805  if ( !nIsZero(tmp) )
4806  {
4807  if ( !pIsConstant((p->m)[i]))
4808  {
4809  omFreeSize( (ADDRESS)pevpoint, n * sizeof( number ) );
4810  WerrorS("Elements of first input ideal must be numbers!");
4811  return TRUE;
4812  }
4813  pevpoint[i]= nCopy( tmp );
4814  }
4815  }
4816 
4817  number *wresults= (number *)omAlloc( m * sizeof( number ) );
4818  for ( i= 0; i < m; i++ )
4819  {
4820  wresults[i]= nInit(0);
4821  if ( (w->m)[i] && !nIsZero(pGetCoeff((w->m)[i])) )
4822  {
4823  if ( !pIsConstant((w->m)[i]))
4824  {
4825  omFreeSize( (ADDRESS)pevpoint, n * sizeof( number ) );
4826  omFreeSize( (ADDRESS)wresults, m * sizeof( number ) );
4827  WerrorS("Elements of second input ideal must be numbers!");
4828  return TRUE;
4829  }
4830  wresults[i]= nCopy(pGetCoeff((w->m)[i]));
4831  }
4832  }
4833 
4834  vandermonde vm( m, n, tdg, pevpoint, FALSE );
4835  number *ncpoly= vm.interpolateDense( wresults );
4836  // do not free ncpoly[]!!
4837  poly rpoly= vm.numvec2poly( ncpoly );
4838 
4839  omFreeSize( (ADDRESS)pevpoint, n * sizeof( number ) );
4840  omFreeSize( (ADDRESS)wresults, m * sizeof( number ) );
4841 
4842  res->data= (void*)rpoly;
4843  return FALSE;
4844 }
FALSE
#define FALSE
Definition: auxiliary.h:94
matrix
ip_smatrix * matrix
Definition: matpol.h:31
sleftv::Data
void * Data()
Definition: subexpr.cc:1134
rField_is_long_R
static BOOLEAN rField_is_long_R(const ring r)
Definition: ring.h:534
rootContainer::onepoly
@ onepoly
Definition: mpr_numeric.h:68
pIsConstant
#define pIsConstant(p)
like above, except that Comp might be != 0
Definition: polys.h:225
ip_smatrix
Definition: matpol.h:15
simplex::m
int m
Definition: mpr_numeric.h:198
uResultant::denseResMat
@ denseResMat
Definition: mpr_base.h:65
j
int j
Definition: facHensel.cc:105
gmp_output_digits
size_t gmp_output_digits
Definition: mpr_complex.cc:43
resMatrixBase::initState
virtual IStateType initState() const
Definition: mpr_base.h:41
errorreported
short errorreported
Definition: feFopen.cc:23
mprOk
@ mprOk
Definition: mpr_base.h:98
NUMBER_CMD
@ NUMBER_CMD
Definition: grammar.cc:287
LIST_CMD
@ LIST_CMD
Definition: tok.h:118
uResultant::resMatType
resMatType
Definition: mpr_base.h:65
pGetExp
#define pGetExp(p, i)
Exponent.
Definition: polys.h:41
ADDRESS
void * ADDRESS
Definition: auxiliary.h:133
MODUL_CMD
@ MODUL_CMD
Definition: grammar.cc:286
STRING_CMD
@ STRING_CMD
Definition: tok.h:183
resMatrixBase::getSubDet
virtual number getSubDet()
Definition: mpr_base.h:37
rootContainer::solver
bool solver(const int polishmode=PM_NONE)
Definition: mpr_numeric.cc:441
uResultant::interpolateDenseSP
rootContainer ** interpolateDenseSP(BOOLEAN matchUp=false, const number subDetVal=NULL)
Definition: mpr_base.cc:2923
loNewtonPolytope
ideal loNewtonPolytope(const ideal id)
Definition: mpr_base.cc:3192
id_QHomWeight
intvec * id_QHomWeight(ideal id, const ring r)
Definition: simpleideals.cc:1535
vandermonde
vandermonde system solver for interpolating polynomials from their values
Definition: mpr_numeric.h:29
nIsMOne
#define nIsMOne(n)
Definition: numbers.h:27
Variable::next
Variable next() const
Definition: factory.h:137
sleftv
Class used for (list of) interpreter objects.
Definition: subexpr.h:83
w
const CanonicalForm & w
Definition: facAbsFact.cc:55
simplex::posvToIV
intvec * posvToIV()
Definition: mpr_numeric.cc:1077
mprIdealCheck
mprState mprIdealCheck(const ideal theIdeal, const char *name, uResultant::resMatType mtype, BOOLEAN rmatrix=false)
simplex::m1
int m1
Definition: mpr_numeric.h:200
MATRIX_CMD
@ MATRIX_CMD
Definition: grammar.cc:285
pTotaldegree
static long pTotaldegree(poly p)
Definition: polys.h:268
currRing
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13
rVar
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:583
TRUE
#define TRUE
Definition: auxiliary.h:98
i
int i
Definition: cfEzgcd.cc:125
res
CanonicalForm res
Definition: facAbsFact.cc:64
nIsOne
#define nIsOne(n)
Definition: numbers.h:26
INT_CMD
@ INT_CMD
Definition: tok.h:96
setGMPFloatDigits
void setGMPFloatDigits(size_t digits, size_t rest)
Set size of mantissa digits - the number of output digits (basis 10) the size of mantissa consists of...
Definition: mpr_complex.cc:61
PrintS
void PrintS(const char *s)
Definition: reporter.cc:284
omFreeSize
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
BOOLEAN
int BOOLEAN
Definition: auxiliary.h:85
simplex::m2
int m2
Definition: mpr_numeric.h:200
simplex::icase
int icase
Definition: mpr_numeric.h:201
rootContainer::getRoot
gmp_complex * getRoot(const int i)
Definition: mpr_numeric.h:88
nPrint
#define nPrint(a)
only for debug, over any initalized currRing
Definition: numbers.h:47
IDEAL_CMD
@ IDEAL_CMD
Definition: grammar.cc:283
intvec
Definition: intvec.h:21
sleftv::data
void * data
Definition: subexpr.h:88
pIter
#define pIter(p)
Definition: monomials.h:44
omAlloc
#define omAlloc(size)
Definition: omAllocDecl.h:210
uResultant::accessResMat
resMatrixBase * accessResMat()
Definition: mpr_base.h:78
rootArranger
Definition: mpr_numeric.h:150
rField_is_R
static BOOLEAN rField_is_R(const ring r)
Definition: ring.h:510
slists::m
sleftv * m
Definition: lists.h:45
rootContainer::fillContainer
void fillContainer(number *_coeffs, number *_ievpoint, const int _var, const int _tdg, const rootType _rt, const int _anz)
Definition: mpr_numeric.cc:304
complexToStr
char * complexToStr(gmp_complex &c, const unsigned int oprec, const coeffs src)
Definition: mpr_complex.cc:705
simplex
Linear Programming / Linear Optimization using Simplex - Algorithm.
Definition: mpr_numeric.h:195
slists
Definition: lists.h:23
uResultant
Base class for solving 0-dim poly systems using u-resultant.
Definition: mpr_base.h:63
INTVEC_CMD
@ INTVEC_CMD
Definition: tok.h:101
determineMType
uResultant::resMatType determineMType(int imtype)
nIsZero
#define nIsZero(n)
Definition: numbers.h:20
rootContainer::getAnzRoots
int getAnzRoots()
Definition: mpr_numeric.h:97
simplex::m3
int m3
Definition: mpr_numeric.h:200
simplex::zrovToIV
intvec * zrovToIV()
Definition: mpr_numeric.cc:1088
resMatrixBase::ready
@ ready
Definition: mpr_base.h:26
Print
#define Print
Definition: emacs.cc:80
Werror
void Werror(const char *fmt,...)
Definition: reporter.cc:189
idInit
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:37
rootArranger::success
bool success()
Definition: mpr_numeric.h:162
pow
Rational pow(const Rational &a, int e)
Definition: GMPrat.cc:414
WerrorS
void WerrorS(const char *s)
Definition: feFopen.cc:24
rootArranger::arrange
void arrange()
Definition: mpr_numeric.cc:887
m
int m
Definition: cfEzgcd.cc:121
MATCOLS
#define MATCOLS(i)
Definition: matpol.h:29
sleftv::rtyp
int rtyp
Definition: subexpr.h:91
NULL
#define NULL
Definition: omList.c:10
resMatrixBase::getMatrix
virtual ideal getMatrix()
Definition: mpr_base.h:31
lists
slists * lists
Definition: mpr_numeric.h:146
nDelete
#define nDelete(n)
Definition: numbers.h:17
simplex::compute
void compute()
Definition: mpr_numeric.cc:1099
rootArranger::solve_all
void solve_all()
Definition: mpr_numeric.cc:862
listOfRoots
lists listOfRoots(rootArranger *self, const unsigned int oprec)
Definition: ipshell.cc:5003
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
slists::Init
INLINE_THIS void Init(int l=0)
simplex::mapFromMatrix
BOOLEAN mapFromMatrix(matrix m)
Definition: mpr_numeric.cc:1015
p
int p
Definition: cfModGcd.cc:4019
sleftv::Name
const char * Name()
Definition: subexpr.h:120
nInit
#define nInit(i)
Definition: numbers.h:25
count
int status int void size_t count
Definition: si_signals.h:59
rootContainer::getAnzElems
int getAnzElems()
Definition: mpr_numeric.h:95
IDELEMS
#define IDELEMS(i)
Definition: simpleideals.h:26
rootContainer
complex root finder for univariate polynomials based on laguers algorithm
Definition: mpr_numeric.h:66
pGetCoeff
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
Definition: monomials.h:51
PrintLn
void PrintLn()
Definition: reporter.cc:310
simplex::n
int n
Definition: mpr_numeric.h:199
rField_is_long_C
static BOOLEAN rField_is_long_C(const ring r)
Definition: ring.h:537
MATROWS
#define MATROWS(i)
Definition: matpol.h:28
nCopy
#define nCopy(n)
Definition: numbers.h:16
simplex::mapToMatrix
matrix mapToMatrix(matrix m)
Definition: mpr_numeric.cc:1044
uResultant::specializeInU
rootContainer ** specializeInU(BOOLEAN matchUp=false, const number subDetVal=NULL)
Definition: mpr_base.cc:3061
rField_is_Q
static BOOLEAN rField_is_Q(const ring r)
Definition: ring.h:501
pWrite
void pWrite(poly p)
Definition: polys.h:294
slists::Clean
void Clean(ring r=currRing)
Definition: lists.h:25