source: git/Singular/fglm.h @ df83c0

spielwiese
Last change on this file since df83c0 was df83c0, checked in by Tim Wichmann <wichmann@…>, 24 years ago
* added fglmquot git-svn-id: file:///usr/local/Singular/svn/trunk@3905 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 3.5 KB
Line 
1// emacs edit mode for this file is -*- C++ -*-
2// $Id: fglm.h,v 1.12 1999-11-24 12:29:37 wichmann Exp $
3
4/****************************************
5*  Computer Algebra System SINGULAR     *
6****************************************/
7/*
8* ABSTRACT - The FGLM-Algorithm
9*   The main header file for the fglm algorithm
10*   (See fglm.cc for details)
11*/
12
13#ifndef FGLM_H
14#define FGLM_H
15
16#include "polys.h"
17#include "fglmvec.h"
18
19#define PROT(msg)
20#define STICKYPROT(msg) if (BTEST1(OPT_PROT)) Print(msg)
21#define PROT2(msg,arg)
22#define STICKYPROT2(msg,arg) if (BTEST1(OPT_PROT)) Print(msg,arg)
23#define fglmASSERT(ignore1,ignore2)
24
25// internal Version: 1.10.1.4
26// Some data types needed by the fglm algorithm. claptmpl.cc has to know them.
27class fglmSelem
28{
29public:
30    int * divisors;
31    poly monom;
32    int numVars;
33    fglmSelem( poly p, int var );
34
35    void cleanup();
36    BOOLEAN isBasisOrEdge() const { return ( (divisors[0] == numVars) ? TRUE : FALSE ); }
37    void newDivisor( int var ) { divisors[ ++divisors[0] ]= var; }
38};
39
40class fglmDelem
41{
42public:
43    poly monom;
44    fglmVector v;
45    int insertions;
46    int var;
47    fglmDelem( poly & m, fglmVector mv, int v );
48
49    void cleanup();
50    BOOLEAN isBasisOrEdge() const { return ( (insertions == 0) ? TRUE : FALSE ); }
51    void newDivisor() { insertions--; }
52};
53
54// fglmzero(...):
55// The fglm algorithm for 0-dimensional ideals. ( fglmzero is defined in fglmzero.cc )
56// Calculates the reduced groebner basis of sourceIdeal in destRing.
57// The sourceIdeal has to be a reduced, 0-dimensional groebner basis in sourceRing.
58// Warning: There is no check, if the ideal is really 0-dimensional and minimal.
59// If it is minimal but not reduced, then it returns FALSE, otherwise TRUE.
60// Warning: There is no check, if the rings are compatible for fglm (see
61// fglm.cc for functions to check this)
62// if switchBack==TRUE, then the procedure sets the ring as currentRing which was
63// current when it was called ( When called there may be currRing != sourceRing ).
64// if switchBack==FALSE, then currRing==destRing at the end.
65// if deleteIdeal==TRUE then sourceIdeal is deleted (in any case, even if the
66// procedure fails)
67// if deleteIdeal==FALSE, then nothing happens to sourceIdeal
68BOOLEAN
69fglmzero( idhdl sourceRingHdl, ideal & sourceIdeal, idhdl destRingHdl, ideal & destideal, BOOLEAN switchBack = TRUE, BOOLEAN deleteIdeal = FALSE );
70
71BOOLEAN
72fglmquot( ideal sourceIdeal, poly quot, ideal & destIdeal );
73
74// fglmproc(...):
75// The procedure which has to be called from the interpreter for fglm.
76// first is the sourceRing, second is the given ideal in sourceRing.
77// Returns the groebnerbasis of the sourceIdeal in the currentRing.
78// Checks, if the ideal is really a reduced groebner basis of a
79// 0-dimensional Ideal. Returns TRUE if an error occoured.
80BOOLEAN
81fglmProc( leftv result, leftv first, leftv second );
82
83// fglmquotproc(...):
84// The procedure which has to be called from the interpreter for fglmquot.
85// first is the ideal I, second is the polynomial q. The polynomial must
86// be reduced with respect to I.
87// Returns the groebnerbasis of I:q in the currentRing.
88// Checks, if the ideal is really a reduced groebner basis of a
89// 0-dimensional Ideal and if q is really reduced.
90//  Returns TRUE if an error occoured.
91BOOLEAN
92fglmQuotProc( leftv result, leftv first, leftv second );
93
94// FindUnivariatePolys (test)
95BOOLEAN
96FindUnivariateWrapper( ideal source, ideal & dest );
97
98// wrapper for FindUnivariatePolys (test)
99BOOLEAN
100findUniProc( leftv result, leftv first);
101
102// homogeneous FGLM
103ideal
104fglmhomProc(leftv first, leftv second);
105#endif
Note: See TracBrowser for help on using the repository browser.