Macaulay2 Engine
Loading...
Searching...
No Matches
reducedgb-marked.hpp
Go to the documentation of this file.
1// Copyright 2005, Michael E. Stillman
2
3#ifndef _marked_gb_
4#define _marked_gb_
5
6#include "reducedgb.hpp"
7
8// Marked GB's: for now, they must be defined over a polynomial ring
9// with no quotient elements, and the base must be field.
10// AND the monomial order needs to be a term order.
11//
12// Sorting is NOT done
13
19class MarkedGB : public ReducedGB
20{
21 friend ReducedGB *ReducedGB::create(const PolynomialRing *originalR0,
22 const FreeModule *F0,
23 const FreeModule *Fsyz0,
24 const GBWeight *wt0);
25
26 protected:
28 gbvector **leadterms; // these point into the corresponding terms for 'polys'
29
30 MarkedGB(const PolynomialRing *originalR0,
31 const FreeModule *F0,
32 const FreeModule *Fsyz0);
33
34 void auto_reduce();
35
36 public:
37 static MarkedGB *create(const PolynomialRing *originalR0,
38 const FreeModule *F0,
39 const FreeModule *Fsyz0);
40
41 virtual ~MarkedGB();
42
43 virtual void remove_gb() {}
44 const FreeModule *get_ambient_FreeModule() const { return F; }
45 const GBRing *get_gb_ring() const { return R; }
46 virtual void set_gb(VECTOR(POLY) & polys0);
47
48 virtual void add_marked_elems(const VECTOR(gbvector *) & leadterms,
49 const VECTOR(POLY) & polys0,
50 bool auto_reduced);
51
52 void marked_remainder(POLY &f,
53 bool use_denom,
54 ring_elem &denom,
55 gbvector *marked_lead_term);
56 // Do not reduce the marked_lead_term. The coefficient of this term might be
57 // modified.
58 // But it will still point to the same gbvector node.
59
60 virtual void remainder(POLY &f, bool use_denom, ring_elem &denom);
61
62 virtual void remainder(gbvector *&f, bool use_denom, ring_elem &denom);
63
64 void geo_remainder(gbvector *&f, bool use_denom, ring_elem &denom);
65
66 virtual const Matrix /* or null */ *get_initial(int nparts);
67
68 virtual const Matrix /* or null */ *get_parallel_lead_terms(M2_arrayint w);
69};
70
71#endif
72
73// Local Variables:
74// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
75// indent-tabs-mode: nil
76// End:
Engine-side free module R^n over a Ring.
Definition freemod.hpp:66
Polynomial-ring view tuned for the inner loop of classical Buchberger Groebner-basis computations.
Definition gbring.hpp:120
Heuristic-weight evaluator for gbvectors, used during Groebner basis computation to drive the S-pair ...
Definition gbweight.hpp:67
virtual void add_marked_elems(const VECTOR(gbvector *) &leadterms, const VECTOR(POLY) &polys0, bool auto_reduced)
virtual void set_gb(VECTOR(POLY) &polys0)
virtual void remainder(POLY &f, bool use_denom, ring_elem &denom)
virtual ~MarkedGB()
const FreeModule * get_ambient_FreeModule() const
virtual const Matrix * get_parallel_lead_terms(M2_arrayint w)
MarkedGB(const PolynomialRing *originalR0, const FreeModule *F0, const FreeModule *Fsyz0)
MonomialTable * T
friend ReducedGB * ReducedGB::create(const PolynomialRing *originalR0, const FreeModule *F0, const FreeModule *Fsyz0, const GBWeight *wt0)
void geo_remainder(gbvector *&f, bool use_denom, ring_elem &denom)
virtual const Matrix * get_initial(int nparts)
const GBRing * get_gb_ring() const
gbvector ** leadterms
virtual void remove_gb()
void marked_remainder(POLY &f, bool use_denom, ring_elem &denom, gbvector *marked_lead_term)
Indexed table of monomials with fast "find a divisor" lookup, keyed by a free integer val per entry.
Definition montable.hpp:81
Abstract base for the engine's polynomial-ring hierarchy.
Definition polyring.hpp:96
static ReducedGB * create(const PolynomialRing *originalR0, const FreeModule *F0, const FreeModule *Fsyz0, const GBWeight *wt0=nullptr)
Definition reducedgb.cpp:11
GBRing * R
Definition reducedgb.hpp:64
const FreeModule * F
Definition reducedgb.hpp:66
ReducedGB(GBRing *R0, const PolynomialRing *originalR0, const FreeModule *F0, const FreeModule *Fsyz0)
Definition reducedgb.cpp:35
#define Matrix
Definition factory.cpp:14
#define VECTOR(T)
Definition newdelete.hpp:78
#define POLY(q)
Definition poly.cpp:23
ReducedGB — abstract base for the canonicalising reduction pass that follows GB computation.