Macaulay2 Engine
Loading...
Searching...
No Matches
comp-gb-declared.hpp
Go to the documentation of this file.
1// Copyright 2004 Michael E. Stillman.
2
3#ifndef _comp_gb_declared_hpp_
4#define _comp_gb_declared_hpp_
5
43
44#include "comp-gb.hpp"
45#include "reducedgb.hpp"
46
53// This contains a GBComputation, which can be changed.
54// For example, we can start with a computation, and then
55// after it is done, we can jettison it, and consider only
56// the GB object itself.
57{
60 const Matrix *syz;
61
62 protected:
63 virtual bool stop_conditions_ok() { return true; }
64 // If the stop conditions in _Stop are inappropriate,
65 // return false, and use ERROR(...) to provide an error message.
66
67 public:
68 GBDeclared(const Matrix *m0,
69 const Matrix *gb,
70 const Matrix *change,
71 const Matrix *syz0);
72
73 GBDeclared(const Matrix *leadterms,
74 const Matrix *m0,
75 const Matrix *gb,
76 const Matrix *change,
77 const Matrix *syz0);
78
79 static GBComputation *create(const Matrix *m,
80 const Matrix *gb,
81 const Matrix *change,
82 const Matrix *syz);
83 // Possibly returns NULL, if an error message is reported
84
85 static GBComputation *create(const Matrix *leadterms,
86 const Matrix *m,
87 const Matrix *gb,
88 const Matrix *change,
89 const Matrix *syz);
90 // Possibly returns NULL, if an error message is reported
91
92 virtual ~GBDeclared() {}
93 virtual void remove_gb() {}
94 virtual GBComputation *cast_to_GBComputation() { return this; }
95 virtual void start_computation() {}
96 virtual int complete_thru_degree() const { return G->complete_thru_degree(); }
97 // The computation is complete up through this degree.
98
99 // Recall that the status of the computation is maintained by the Computation
100 // class,
101
102 virtual const Ring *get_ring() const { return G->get_ring(); }
104 // Results of the computation //
106 virtual const Matrix /* or null */ *get_gb() { return G->get_gb(); }
107 virtual const Matrix /* or null */ *get_mingens() { return trimmed_gens; }
108 virtual const Matrix /* or null */ *get_change() { return G->get_change(); }
109 virtual const Matrix /* or null */ *get_syzygies() { return syz; }
110 virtual const Matrix /* or null */ *get_initial(int nparts)
111 {
112 return G->get_initial(nparts);
113 }
114
115 virtual const Matrix /* or null */ *get_parallel_lead_terms(M2_arrayint w)
116 {
117 return G->get_parallel_lead_terms(w);
118 }
119
121 // Normal forms and lifting ////
123
124 virtual const Matrix /* or null */ *matrix_remainder(const Matrix *m)
125 {
126 return G->matrix_remainder(m);
127 }
128
129 virtual M2_bool matrix_lift(const Matrix *m,
130 const Matrix /* or null */ **result_remainder,
131 const Matrix /* or null */ **result_quotient)
132 {
133 return G->matrix_lift(m, result_remainder, result_quotient);
134 }
135
136 virtual int contains(const Matrix *m) { return G->contains(m); }
138 // Statistics and spair information //
140
141 virtual void text_out(buffer &o) const { o << "declared GB"; }
142 // This displays statistical information, and depends on the
143 // M2_gbTrace value.
144};
145
146#endif
147
148// Local Variables:
149// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
150// indent-tabs-mode: nil
151// End:
base class for Groebner basis computations.
Definition comp-gb.hpp:69
virtual int complete_thru_degree() const
virtual M2_bool matrix_lift(const Matrix *m, const Matrix **result_remainder, const Matrix **result_quotient)
const Matrix * trimmed_gens
virtual int contains(const Matrix *m)
virtual const Matrix * get_syzygies()
ReducedGB * G
virtual const Matrix * get_change()
virtual void text_out(buffer &o) const
virtual const Matrix * get_mingens()
virtual const Matrix * get_initial(int nparts)
virtual const Matrix * get_parallel_lead_terms(M2_arrayint w)
virtual void remove_gb()
virtual ~GBDeclared()
virtual const Matrix * matrix_remainder(const Matrix *m)
virtual GBComputation * cast_to_GBComputation()
const Matrix * syz
virtual bool stop_conditions_ok()
virtual void start_computation()
static GBComputation * create(const Matrix *m, const Matrix *gb, const Matrix *change, const Matrix *syz)
GBDeclared(const Matrix *m0, const Matrix *gb, const Matrix *change, const Matrix *syz0)
virtual const Matrix * get_gb()
virtual const Ring * get_ring() const
Base class for reduced Groebner basis computation.
Definition reducedgb.hpp:62
xxx xxx xxx
Definition ring.hpp:102
GBComputation — abstract base of every Groebner-basis algorithm in the engine.
#define Matrix
Definition factory.cpp:14
void gb(IntermediateBasis &F, int n)
char M2_bool
Definition m2-types.h:82
ReducedGB — abstract base for the canonicalising reduction pass that follows GB computation.