source: git/Singular/mpr_base.h @ a5f15a

spielwiese
Last change on this file since a5f15a was a5f15a, checked in by Moritz Wenk <wenk@…>, 25 years ago
* wenk: added numerical algorithms: vandermonde, laguerre, uressolve, mpresmat (mpr_base.cc mpr_base.h mpr_inout.cc mpr_inout.h mpr_numeric.cc mpr_numeric.h) git-svn-id: file:///usr/local/Singular/svn/trunk@3177 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 2.5 KB
Line 
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 */
23class resMatrixBase {
24public:
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
43protected:
44  IStateType istate;
45
46  ideal gls;
47  int linPolyS;
48  ring sourceRing;
49
50  int totDeg;
51 
52private:
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 */
62class uResultant {
63public:
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
79private:
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
Note: See TracBrowser for help on using the repository browser.