Macaulay2 Engine
Loading...
Searching...
No Matches
comp.hpp
Go to the documentation of this file.
1// Copyright 2004 Michael E. Stillman
2
3#ifndef _comp_hpp_
4#define _comp_hpp_
5
43
45#include "hash.hpp"
46
47class GBComputation;
49
50class buffer;
51
70{
71 private:
73
74 protected:
76
78
80
81 virtual bool stop_conditions_ok() = 0;
82 // If the stop conditions in stop_ are inappropriate,
83 // return false, and use ERROR(...) to provide an error message.
84
85 virtual ~Computation();
86
87 public:
88 Computation /* or null */ *set_stop_conditions(M2_bool always_stop,
89 M2_arrayint degree_limit,
90 int basis_element_limit,
91 int syzygy_limit,
92 int pair_limit,
93 int codim_limit,
94 int subring_limit,
95 M2_bool just_min_gens,
96 M2_arrayint length_limit);
97 // returns NULL if there is a general problem with one of the stop
98 // conditions.
99
101 virtual int complete_thru_degree() const = 0;
102 // This is computation specific information. However, for homogeneous
103 // GB's, the GB coincides with the actual GB in degrees <= the returned value.
104 // For resolutions of homogeneous modules, the resolution
105 // coincides with the actual one in (slanted) degrees <= the returned value.
106
107 virtual void start_computation() = 0;
108 // Do the computation as specified by the stop conditions.
109 // This routine should set the status of the computation.
110
111 virtual GBComputation *cast_to_GBComputation() { return nullptr; }
113 virtual void text_out(buffer &o) const;
114
115 virtual void show() const; // debug display of some computations
116};
117
118#endif
119
120// Local Variables:
121// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
122// indent-tabs-mode: nil
123// End:
enum ComputationStatusCode computation_status
Definition comp.hpp:72
Computation * set_stop_conditions(M2_bool always_stop, M2_arrayint degree_limit, int basis_element_limit, int syzygy_limit, int pair_limit, int codim_limit, int subring_limit, M2_bool just_min_gens, M2_arrayint length_limit)
Definition comp.cpp:11
enum ComputationStatusCode status() const
Definition comp.hpp:100
virtual void text_out(buffer &o) const
Definition comp.cpp:59
enum ComputationStatusCode set_status(enum ComputationStatusCode)
Definition comp.cpp:66
StopConditions stop_
Definition comp.hpp:75
virtual ResolutionComputation * cast_to_ResolutionComputation()
Definition comp.hpp:112
virtual GBComputation * cast_to_GBComputation()
Definition comp.hpp:111
virtual void start_computation()=0
virtual ~Computation()
Definition comp.cpp:57
virtual bool stop_conditions_ok()=0
Computation()
Definition comp.cpp:40
virtual int complete_thru_degree() const =0
virtual void show() const
Definition comp.cpp:61
base class for Groebner basis computations.
Definition comp-gb.hpp:69
Base class for free resolution computation classes.
Definition comp-res.hpp:52
ComputationStatusCode
Definition computation.h:53
ComputationStatusCode / StopConditions / StrategyValues / Algorithms / gbTraceValues — engine-to-inte...
EngineObject / MutableEngineObject — shared bases that supply the hash an M2 interpreter object expec...
char M2_bool
Definition m2-types.h:82
Bundle of optional early-termination knobs the front end can attach to a long-running Computation.
Definition computation.h:90