source: git/Singular/mpr_base.h @ 9a6c4a

spielwiese
Last change on this file since 9a6c4a was 9a6c4a, checked in by Moritz Wenk <wenk@…>, 25 years ago
* wenk: fixed bug in ngfRead git-svn-id: file:///usr/local/Singular/svn/trunk@3182 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.3 1999-06-29 09:03:44 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
24{
25public:
26  /* state of the resultant */
27  enum IStateType { none, ready, notInit, fatalError, sparseError };
28
29  resMatrixBase() : istate(notInit), totDeg(0) {}
30  virtual ~resMatrixBase() {}
31
32  virtual const ideal getMatrix() { return NULL; }
33  virtual const ideal getSubMatrix() { return NULL; }
34
35  virtual const poly getUDet( const number* evpoint ) { return NULL; }
36
37  virtual const number getDetAt( const number* evpoint ) { return NULL; }
38  virtual const number getSubDet() { return NULL; }
39
40  virtual const long getDetDeg() const { return totDeg; }
41
42  virtual const IStateType initState() const { return istate; }
43
44protected:
45  IStateType istate;
46
47  ideal gls;
48  int linPolyS;
49  ring sourceRing;
50
51  int totDeg;
52
53private:
54  /* disables the copy constructor */
55  resMatrixBase( const resMatrixBase & );
56};
57//<-
58
59//-> class uResultant
60/**
61 * Base class for solving 0-dim poly systems using u-resultant
62 */
63class uResultant
64{
65public:
66  enum resMatType { none, sparseResMat, denseResMat };
67
68  uResultant( const ideal _gls, const resMatType _rmt= sparseResMat, BOOLEAN extIdeal= true );
69  ~uResultant();
70
71  poly interpolateDense( const number subDetVal= NULL );
72
73  /* Interpolates n+1 determinat polys for coeff specializations. */
74  rootContainer ** interpolateDenseSP( BOOLEAN matchUp= false, const number subDetVal= NULL );
75
76  /* Uses Bareiss */
77  rootContainer ** specializeInU( BOOLEAN matchUp= false, const number subDetVal= NULL );
78
79  resMatrixBase * accessResMat() { return resMat; }
80
81private:
82  /* deactivated copy constructor */
83  uResultant( const uResultant & );
84
85  ideal extendIdeal( const ideal gls, poly linPoly, const resMatType rmt );
86  poly linearPoly( const resMatType rmt );
87  int nextPrime( const int p );
88
89  ideal gls;
90  int n;
91
92  resMatType rmt;        // sparse or dense resultant matrix ?
93  resMatrixBase *resMat; // pointer to base resultant matrix class
94};
95//<-
96//%e
97#endif MPR_BASE_H
98
99// local Variables: ***
100// folded-file: t ***
101// compile-command-2: "make install" ***
102// compile-command: "make installg" ***
103// End: ***
Note: See TracBrowser for help on using the repository browser.