source: git/Singular/fglm.h @ 8cfee1c

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