Go to the documentation of this file.
17 #ifndef OPTIMIZE_STRATEGY_GUARD
18 #define OPTIMIZE_STRATEGY_GUARD
73 bool reportAllSolutions,
131 (
const Term& oldDivisor,
const Term& oldDominator,
132 const Term& newDivisor,
const Term& newDominator)
const;
212 const Term& dominator,
213 const mpz_class& upperBound);
266 (
const Term& divisor,
267 const Term& dominator,
268 const mpz_class& upperBound,
325 (
const Term& divisor,
326 const Term& dominator,
327 const mpz_class& upperBound,
const TermGrader & _grader
We use _grader to assign values to solutions.
BoundSetting _boundSetting
Indicates how to use the bound.
bool getOuterSimplify(const Term &divisor, const Term &dominator, const mpz_class &upperBound, Term &pivot)
Find an inner slice that is non-improving, allowing us to replace the current slice with the outer sl...
OptimizeStrategy optimizes a function on the maximal standard monomials of a monomial ideal using bra...
virtual void doneConsuming()
Must be called once after each time beginConsuming has been called.
mpz_class _maxValue
The best value of any solution found so far.
mpz_class _maxValueToBeat
Is equal to _maxValue minus _reportAllSolutions, except when no solution has been found so far,...
Term _simplify_tmpDominator
Temporary variable used in simplify.
mpz_class _tmpC
Temporary variable used in getInnerSimplify and getOuterSimplify.
A SplitStrategy is an implementation of a split selection strategy for the Slice Algorithm.
FRIEND_TEST(OptimizeStrategy, ChangedInWayRelevantToBound)
BoundSetting
The values of BoundSetting indicate how to use the bound.
bool _reportAllSolutions
Indicates whether to compute all optimal solutions, as opposed to computing just one (when there are ...
size_t getVarCount() const
The number of varibles this object was initialized with.
bool getDominator(Slice &slice, Term &dominator)
Sets dominator to be a term dominating every element of the content of slice.
Term _simplify_tmpOldDominator
Temporary variable used in simplify.
This class represents a slice, which is the central data structure of the Slice Algorithm.
Term _simplify_tmpOldDivisor
Temporary variable used in simplify.
This class is used to transfer terms one at a time from one part of the program to another,...
@ DoNotUseBound
Make no use of the bound.
Term represents a product of variables which does not include a coefficient.
virtual void setUseIndependence(bool use)
Independence splits are not supported, so calling this method does nothing.
bool changedInWayRelevantToBound(const Term &oldDivisor, const Term &oldDominator, const Term &newDivisor, const Term &newDominator) const
Returns true if iterating bound-based simplification might do something.
virtual void getPivot(Term &pivot, Slice &slice)
Used by pivotSplit to obtain a pivot.
const Ideal & getMaximalSolutions()
Returns one of or all of the msm's with optimal value found so far, depending on the value of reportA...
@ UseBoundToEliminateAndSimplify
Eliminate non-improving slices and simplify slices by trying to generate non-improving slices that ar...
mpz_class _consume_tmpDegree
Temporary variable used in consume.
Term _boundSimplify_tmpPivot
Temporary variable used in simplify.
virtual void consume(const Term &term)
Consume a term.
@ UseBoundToEliminate
Eliminate non-improving slices, achieving a branch-and-bound algorithm in place of the usual backtrac...
Represents a monomial ideal with int exponents.
virtual void beginConsuming()
Tell the consumer to begin consuming an ideal.
bool boundSimplify(Slice &slice, const Term &dominator, const mpz_class &upperBound)
This method simplifies a slice based on generating non-improving outer and inner slices.
const mpz_class & getMaximalValue()
The optimal value associated to all entries from getMaximalSolutions().
Ideal _maxSolutions
Stores the optimal solutions found so far, according to the best value found so far.
A TermGrader assigns a value, the degree, to each monomial.
bool getInnerSimplify(const Term &divisor, const Term &dominator, const mpz_class &upperBound, Term &pivot)
Find an outer slice that is non-improving, allowing us to replace the current slice with the inner sl...
virtual bool simplify(Slice &slice)
This method calls MsmStrategy::simplify to perform the usual simplification of slice,...
OptimizeStrategy(TermGrader &grader, const SplitStrategy *splitStrategy, bool reportAllSolutions, BoundSetting boundSetting)
Construct an OptimizeStrategy.
mpz_class _simplify_tmpUpperBound
Temporary variable used in simplify.