Macaulay2 Engine
Loading...
Searching...
No Matches
hilb-fcn.hpp
Go to the documentation of this file.
1/* Copyright 2010-2021, Michael E. Stillman */
2
3#ifndef _hilb_fcn_h_
4#define _hilb_fcn_h_
5
31
32#include "newdelete.hpp" // for VECTOR
33#include "ringelem.hpp" // for vec
34
35class FreeModule;
36class Matrix;
38class PolynomialRing;
39class RingElement;
40
57{
58 public:
59 HilbertController(const FreeModule *F0, const RingElement *hf);
61
63 // This number is decremented each time addMonomial is called.
64
65 bool setDegree(int this_degree);
66 // recomputes Hilbert function, if necessary.
67 // returns false if computation was interrupted
68 // After this call, nRemainingExpected() returns the number of elements
69 // expected in this degree
70
71 bool addMonomial(int *a, int comp);
72 // add in a new monomial
73 // returns true if no more GB elements expected in this degree
74
75 private:
78
79 private:
81 const FreeModule *F;
83
84 bool hilb_new_elems; // True if any new elements since HF was last computed
85 int hilb_n_in_degree; // The number of new elements that we expect to find
86 // in the current degree.
87
88 const RingElement
89 *hf_orig; // The Hilbert function that we are given at the beginning
91 *hf_diff; // The difference between hf_orig and the computed hilb fcn
92
93 VECTOR(vec) elems;
94};
95
96#endif
97
98// Local Variables:
99// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
100// indent-tabs-mode: nil
101// End:
Engine-side free module R^n over a Ring.
Definition freemod.hpp:66
const PolynomialRing * R
Definition hilb-fcn.hpp:80
const RingElement * hf_orig
Definition hilb-fcn.hpp:89
bool addMonomial(int *a, int comp)
Definition hilb-fcn.cpp:55
RingElement * hf_diff
Definition hilb-fcn.hpp:91
HilbertController(const FreeModule *F0, const RingElement *hf)
Definition hilb-fcn.cpp:20
const FreeModule * F
Definition hilb-fcn.hpp:81
int nRemainingExpected()
Definition hilb-fcn.hpp:62
bool recomputeHilbertFunction()
Definition hilb-fcn.cpp:68
MatrixConstructor * leadterms
Definition hilb-fcn.hpp:82
bool setDegree(int this_degree)
Definition hilb-fcn.cpp:42
VECTOR(vec) elems
Matrix * make_lead_term_matrix()
Definition hilb-fcn.cpp:82
Mutable builder used to assemble an immutable Matrix one column (or one term) at a time.
Abstract base for the engine's polynomial-ring hierarchy.
Definition polyring.hpp:96
Front-end-visible "ring element" value: an engine ring_elem paired with the Ring* that gives it meani...
Definition relem.hpp:67
#define Matrix
Definition factory.cpp:14
our_new_delete — per-class opt-in routing of new / delete through bdwgc.
ring_elem — the universal value type carried by every Ring* in the engine.