Loading...
Searching...
No Matches
mpr_base.h
Go to the documentation of this file.
#ifndef MPR_BASE_H
#define MPR_BASE_H
/****************************************
* Computer Algebra System SINGULAR *
****************************************/
/*
* ABSTRACT - multipolynomial resultants - resultant matrices
* ( sparse, dense, u-resultant solver )
*/
#include "kernel/numeric/mpr_numeric.h"
#define SNONE -1
#define SFREE -2
//%s
//-> class resMatrixBase
/**
* Base class for sparse and dense u-Resultant computation
*/
class resMatrixBase
{
public:
/* state of the resultant */
enum IStateType { none, ready, notInit, fatalError, sparseError };
resMatrixBase() : istate(notInit), totDeg(0) {}
virtual ~resMatrixBase() {}
virtual ideal getMatrix() { return NULL; }
virtual ideal getSubMatrix() { return NULL; }
virtual poly getUDet( const number* /*evpoint*/ ) { return NULL; }
virtual number getDetAt( const number* /*evpoint*/ ) { return NULL; }
virtual number getSubDet() { return NULL; }
virtual long getDetDeg() { return totDeg; }
virtual IStateType initState() const { return istate; }
protected:
IStateType istate;
ideal gls;
int linPolyS;
ring sourceRing;
int totDeg;
private:
/* disables the copy constructor */
resMatrixBase( const resMatrixBase & );
};
//<-
//-> class uResultant
/**
* Base class for solving 0-dim poly systems using u-resultant
*/
class uResultant
{
public:
enum resMatType { none, sparseResMat, denseResMat };
uResultant( const ideal _gls, const resMatType _rmt= sparseResMat, BOOLEAN extIdeal= true );
~uResultant();
poly interpolateDense( const number subDetVal= NULL );
/* Interpolates n+1 determinat polys for coeff specializations. */
rootContainer ** interpolateDenseSP( BOOLEAN matchUp= false, const number subDetVal= NULL );
/* Uses Bareiss */
rootContainer ** specializeInU( BOOLEAN matchUp= false, const number subDetVal= NULL );
resMatrixBase * accessResMat() { return resMat; }
private:
/* deactivated copy constructor */
uResultant( const uResultant & );
ideal extendIdeal( const ideal gls, poly linPoly, const resMatType rmt );
poly linearPoly( const resMatType rmt );
int nextPrime( const int p );
ideal gls;
int n;
resMatType rmt; // sparse or dense resultant matrix ?
resMatrixBase *resMat; // pointer to base resultant matrix class
};
//<-
uResultant::resMatType determineMType( int imtype );
enum mprState
{
mprOk,
mprWrongRType,
mprHasOne,
mprInfNumOfVars,
mprNotReduced,
mprNotZeroDim,
mprNotHomog,
mprUnSupField
};
mprState mprIdealCheck( const ideal theIdeal,
const char * name,
uResultant::resMatType mtype,
BOOLEAN rmatrix= false );
ideal loNewtonPolytope( const ideal id );
EXTERN_VAR size_t gmp_output_digits;
//%e
#endif /*MPR_BASE_H*/
// local Variables: ***
// folded-file: t ***
// compile-command-2: "make install" ***
// compile-command: "make installg" ***
// End: ***
BOOLEAN
int BOOLEAN
Definition auxiliary.h:88
p
int p
Definition cfModGcd.cc:4086
resMatrixBase
Base class for sparse and dense u-Resultant computation.
Definition mpr_base.h:23
resMatrixBase::resMatrixBase
resMatrixBase()
Definition mpr_base.h:28
resMatrixBase::gls
ideal gls
Definition mpr_base.h:46
resMatrixBase::getSubDet
virtual number getSubDet()
Definition mpr_base.h:37
resMatrixBase::getSubMatrix
virtual ideal getSubMatrix()
Definition mpr_base.h:32
resMatrixBase::getUDet
virtual poly getUDet(const number *)
Definition mpr_base.h:34
resMatrixBase::sourceRing
ring sourceRing
Definition mpr_base.h:48
resMatrixBase::totDeg
int totDeg
Definition mpr_base.h:50
resMatrixBase::getMatrix
virtual ideal getMatrix()
Definition mpr_base.h:31
resMatrixBase::resMatrixBase
resMatrixBase(const resMatrixBase &)
resMatrixBase::getDetAt
virtual number getDetAt(const number *)
Definition mpr_base.h:36
resMatrixBase::linPolyS
int linPolyS
Definition mpr_base.h:47
resMatrixBase::getDetDeg
virtual long getDetDeg()
Definition mpr_base.h:39
resMatrixBase::IStateType
IStateType
Definition mpr_base.h:26
resMatrixBase::sparseError
@ sparseError
Definition mpr_base.h:26
resMatrixBase::none
@ none
Definition mpr_base.h:26
resMatrixBase::notInit
@ notInit
Definition mpr_base.h:26
resMatrixBase::ready
@ ready
Definition mpr_base.h:26
resMatrixBase::fatalError
@ fatalError
Definition mpr_base.h:26
resMatrixBase::initState
virtual IStateType initState() const
Definition mpr_base.h:41
resMatrixBase::istate
IStateType istate
Definition mpr_base.h:44
resMatrixBase::~resMatrixBase
virtual ~resMatrixBase()
Definition mpr_base.h:29
rootContainer
complex root finder for univariate polynomials based on laguers algorithm
Definition mpr_numeric.h:66
uResultant::linearPoly
poly linearPoly(const resMatType rmt)
Definition mpr_base.cc:2743
uResultant::rmt
resMatType rmt
Definition mpr_base.h:91
uResultant::specializeInU
rootContainer ** specializeInU(BOOLEAN matchUp=false, const number subDetVal=NULL)
Definition mpr_base.cc:3060
uResultant::uResultant
uResultant(const ideal _gls, const resMatType _rmt=sparseResMat, BOOLEAN extIdeal=true)
Definition mpr_base.cc:2685
uResultant::resMat
resMatrixBase * resMat
Definition mpr_base.h:92
uResultant::extendIdeal
ideal extendIdeal(const ideal gls, poly linPoly, const resMatType rmt)
Definition mpr_base.cc:2715
uResultant::interpolateDenseSP
rootContainer ** interpolateDenseSP(BOOLEAN matchUp=false, const number subDetVal=NULL)
Definition mpr_base.cc:2922
uResultant::uResultant
uResultant(const uResultant &)
uResultant::~uResultant
~uResultant()
Definition mpr_base.cc:2710
uResultant::n
int n
Definition mpr_base.h:89
uResultant::resMatType
resMatType
Definition mpr_base.h:65
uResultant::denseResMat
@ denseResMat
Definition mpr_base.h:65
uResultant::none
@ none
Definition mpr_base.h:65
uResultant::sparseResMat
@ sparseResMat
Definition mpr_base.h:65
uResultant::accessResMat
resMatrixBase * accessResMat()
Definition mpr_base.h:78
uResultant::gls
ideal gls
Definition mpr_base.h:88
uResultant::interpolateDense
poly interpolateDense(const number subDetVal=NULL)
Definition mpr_base.cc:2770
uResultant::nextPrime
int nextPrime(const int p)
Definition mpr_base.cc:3173
name
char name(const Variable &v)
Definition factory.h:189
EXTERN_VAR
#define EXTERN_VAR
Definition globaldefs.h:6
mprState
mprState
Definition mpr_base.h:97
mprNotHomog
@ mprNotHomog
Definition mpr_base.h:104
mprInfNumOfVars
@ mprInfNumOfVars
Definition mpr_base.h:101
mprHasOne
@ mprHasOne
Definition mpr_base.h:100
mprNotReduced
@ mprNotReduced
Definition mpr_base.h:102
mprWrongRType
@ mprWrongRType
Definition mpr_base.h:99
mprNotZeroDim
@ mprNotZeroDim
Definition mpr_base.h:103
mprOk
@ mprOk
Definition mpr_base.h:98
mprUnSupField
@ mprUnSupField
Definition mpr_base.h:105
gmp_output_digits
EXTERN_VAR size_t gmp_output_digits
Definition mpr_base.h:115
determineMType
uResultant::resMatType determineMType(int imtype)
mprIdealCheck
mprState mprIdealCheck(const ideal theIdeal, const char *name, uResultant::resMatType mtype, BOOLEAN rmatrix=false)
loNewtonPolytope
ideal loNewtonPolytope(const ideal id)
Definition mpr_base.cc:3191
mpr_numeric.h
NULL
#define NULL
Definition omList.c:12