1 | #ifndef MPR_BASE_H |
---|
2 | #define MPR_BASE_H |
---|
3 | /**************************************** |
---|
4 | * Computer Algebra System SINGULAR * |
---|
5 | ****************************************/ |
---|
6 | /* $Id: mpr_base.h,v 1.1 1999-06-28 12:48:12 wenk Exp $ */ |
---|
7 | |
---|
8 | /* |
---|
9 | * ABSTRACT - multipolynomial resultants - resultant matrices |
---|
10 | * ( sparse, dense, u-resultant solver ) |
---|
11 | */ |
---|
12 | |
---|
13 | #include "mpr_numeric.h" |
---|
14 | |
---|
15 | #define SNONE -1 |
---|
16 | #define SFREE -2 |
---|
17 | |
---|
18 | //%s |
---|
19 | //-> class resMatrixBase |
---|
20 | /** |
---|
21 | * Base class for sparse and dense u-Resultant computation |
---|
22 | */ |
---|
23 | class resMatrixBase { |
---|
24 | public: |
---|
25 | /* state of the resultant */ |
---|
26 | enum IStateType { none, ready, notInit, fatalError, sparseError }; |
---|
27 | |
---|
28 | resMatrixBase() : istate(notInit), totDeg(0) {} |
---|
29 | virtual ~resMatrixBase() {} |
---|
30 | |
---|
31 | virtual const ideal getMatrix() { return NULL; } |
---|
32 | virtual const ideal getSubMatrix() { return NULL; } |
---|
33 | |
---|
34 | virtual const poly getUDet( const number* evpoint ) { return NULL; } |
---|
35 | |
---|
36 | virtual const number getDetAt( const number* evpoint ) { return NULL; } |
---|
37 | virtual const number getSubDet() { return NULL; } |
---|
38 | |
---|
39 | virtual const long getDetDeg() const { return totDeg; } |
---|
40 | |
---|
41 | virtual const IStateType initState() const { return istate; } |
---|
42 | |
---|
43 | protected: |
---|
44 | IStateType istate; |
---|
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 | */ |
---|
62 | class uResultant { |
---|
63 | public: |
---|
64 | enum resMatType { none, sparseResMat, denseResMat }; |
---|
65 | |
---|
66 | uResultant( const ideal _gls, const resMatType _rmt= sparseResMat, BOOLEAN extIdeal= true ); |
---|
67 | ~uResultant(); |
---|
68 | |
---|
69 | poly interpolateDense( const number subDetVal= NULL ); |
---|
70 | |
---|
71 | /* Interpolates n+1 determinat polys for coeff specializations. */ |
---|
72 | rootContainer ** interpolateDenseSP( BOOLEAN matchUp= false, const number subDetVal= NULL ); |
---|
73 | |
---|
74 | /* Uses Bareiss */ |
---|
75 | rootContainer ** specializeInU( BOOLEAN matchUp= false, const number subDetVal= NULL ); |
---|
76 | |
---|
77 | resMatrixBase * accessResMat() { return resMat; } |
---|
78 | |
---|
79 | private: |
---|
80 | /* deactivated copy constructor */ |
---|
81 | uResultant( const uResultant & ); |
---|
82 | |
---|
83 | ideal extendIdeal( const ideal gls, poly linPoly, const resMatType rmt ); |
---|
84 | poly linearPoly( const resMatType rmt ); |
---|
85 | int nextPrime( const int p ); |
---|
86 | |
---|
87 | ideal gls; |
---|
88 | int n; |
---|
89 | |
---|
90 | resMatType rmt; // sparse or dense resultant matrix ? |
---|
91 | resMatrixBase *resMat; // pointer to base resultant matrix class |
---|
92 | }; |
---|
93 | //<- |
---|
94 | //%e |
---|
95 | #endif MPR_BASE_H |
---|
96 | |
---|
97 | // local Variables: *** |
---|
98 | // folded-file: t *** |
---|
99 | // compile-command-2: "make install" *** |
---|
100 | // compile-command: "make installg" *** |
---|
101 | // End: *** |
---|
102 | |
---|
103 | |
---|
104 | |
---|
105 | |
---|
106 | |
---|
107 | |
---|
108 | |
---|
109 | |
---|
110 | |
---|