Macaulay2 Engine
Loading...
Searching...
No Matches

◆ IM2_GB_set_hilbert_function()

Computation * IM2_GB_set_hilbert_function ( Computation * C,
const RingElement * h )

Definition at line 161 of file groebner.cpp.

163{
164 try
165 {
168 if (G->get_ring()->get_degree_ring() != h->get_ring())
169 {
170 ERROR("expected Hilbert function hint to be in correct degree ring");
171 return nullptr;
172 }
173 if (G != nullptr) return G->set_hilbert_function(h);
174 ERROR("computation type unknown or not implemented");
175 return nullptr;
176 } catch (const exc::engine_error& e)
177 {
178 ERROR(e.what());
179 return nullptr;
180 }
181}
virtual GBComputation * cast_to_GBComputation()
Definition comp.hpp:111
base class for Groebner basis computations.
Definition comp-gb.hpp:69
const Ring * get_ring() const
Definition relem.hpp:81
const int ERROR
Definition m2-mem.cpp:55
tbb::flow::graph G
void clear_emit_size()
Definition text-io.cpp:26

References Computation::cast_to_GBComputation(), clear_emit_size(), ERROR, G, and RingElement::get_ring().