mpr_base.h
Go to the documentation of this file.
1 #ifndef MPR_BASE_H
2 #define MPR_BASE_H
3 /****************************************
4 * Computer Algebra System SINGULAR *
5 ****************************************/
6 
7 /*
8 * ABSTRACT - multipolynomial resultants - resultant matrices
9 * ( sparse, dense, u-resultant solver )
10 */
11 
13 
14 #define SNONE -1
15 #define SFREE -2
16 
17 //%s
18 //-> class resMatrixBase
19 /**
20  * Base class for sparse and dense u-Resultant computation
21  */
23 {
24 public:
25  /* state of the resultant */
27 
29  virtual ~resMatrixBase() {}
30 
31  virtual ideal getMatrix() { return NULL; }
32  virtual ideal getSubMatrix() { return NULL; }
33 
34  virtual poly getUDet( const number* /*evpoint*/ ) { return NULL; }
35 
36  virtual number getDetAt( const number* /*evpoint*/ ) { return NULL; }
37  virtual number getSubDet() { return NULL; }
38 
39  virtual long getDetDeg() { return totDeg; }
40 
41  virtual IStateType initState() const { return istate; }
42 
43 protected:
45 
46  ideal gls;
47  int linPolyS;
48  ring sourceRing;
49 
50  int totDeg;
51 
52 private:
53  /* disables the copy constructor */
54  resMatrixBase( const resMatrixBase & );
55 };
56 //<-
57 
58 //-> class uResultant
59 /**
60  * Base class for solving 0-dim poly systems using u-resultant
61  */
63 {
64 public:
65  enum resMatType { none, sparseResMat, denseResMat };
66 
67  uResultant( const ideal _gls, const resMatType _rmt= sparseResMat, BOOLEAN extIdeal= true );
68  ~uResultant();
69 
70  poly interpolateDense( const number subDetVal= NULL );
71 
72  /* Interpolates n+1 determinat polys for coeff specializations. */
73  rootContainer ** interpolateDenseSP( BOOLEAN matchUp= false, const number subDetVal= NULL );
74 
75  /* Uses Bareiss */
76  rootContainer ** specializeInU( BOOLEAN matchUp= false, const number subDetVal= NULL );
77 
78  resMatrixBase * accessResMat() { return resMat; }
79 
80 private:
81  /* deactivated copy constructor */
82  uResultant( const uResultant & );
83 
84  ideal extendIdeal( const ideal gls, poly linPoly, const resMatType rmt );
85  poly linearPoly( const resMatType rmt );
86  int nextPrime( const int p );
87 
88  ideal gls;
89  int n;
90 
91  resMatType rmt; // sparse or dense resultant matrix ?
92  resMatrixBase *resMat; // pointer to base resultant matrix class
93 };
94 //<-
97 {
106 };
107 
108 mprState mprIdealCheck( const ideal theIdeal,
109  const char * name,
111  BOOLEAN rmatrix= false );
112 
113 ideal loNewtonPolytope( const ideal id );
114 
115 extern size_t gmp_output_digits;
116 //%e
117 #endif /*MPR_BASE_H*/
118 
119 // local Variables: ***
120 // folded-file: t ***
121 // compile-command-2: "make install" ***
122 // compile-command: "make installg" ***
123 // End: ***
complex root finder for univariate polynomials based on laguers algorithm
Definition: mpr_numeric.h:65
Base class for solving 0-dim poly systems using u-resultant.
Definition: mpr_base.h:62
virtual ~resMatrixBase()
Definition: mpr_base.h:29
return P p
Definition: myNF.cc:203
resMatrixBase * accessResMat()
Definition: mpr_base.h:78
uResultant::resMatType determineMType(int imtype)
virtual poly getUDet(const number *)
Definition: mpr_base.h:34
resMatrixBase * resMat
Definition: mpr_base.h:92
Base class for sparse and dense u-Resultant computation.
Definition: mpr_base.h:22
Definition: mpr_base.h:98
virtual number getDetAt(const number *)
Definition: mpr_base.h:36
resMatType rmt
Definition: mpr_base.h:91
virtual ideal getMatrix()
Definition: mpr_base.h:31
char name(const Variable &v)
Definition: factory.h:178
virtual ideal getSubMatrix()
Definition: mpr_base.h:32
mprState mprIdealCheck(const ideal theIdeal, const char *name, uResultant::resMatType mtype, BOOLEAN rmatrix=false)
ring sourceRing
Definition: mpr_base.h:48
#define NULL
Definition: omList.c:10
int linPolyS
Definition: mpr_base.h:47
IStateType istate
Definition: mpr_base.h:44
virtual long getDetDeg()
Definition: mpr_base.h:39
mprState
Definition: mpr_base.h:96
size_t gmp_output_digits
Definition: mpr_complex.cc:44
polyrec * poly
Definition: hilb.h:10
virtual IStateType initState() const
Definition: mpr_base.h:41
int BOOLEAN
Definition: auxiliary.h:88
ideal gls
Definition: mpr_base.h:46
virtual number getSubDet()
Definition: mpr_base.h:37
ideal loNewtonPolytope(const ideal id)
Definition: mpr_base.cc:3190
ideal gls
Definition: mpr_base.h:88