PivotStrategy.h
Go to the documentation of this file.
/* Frobby: Software for monomial ideal computations.
Copyright (C) 2011 Bjarke Hammersholt Roune (www.broune.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
*/
#ifndef PIVOT_EULER_STRATEGY_GUARD
#define PIVOT_EULER_STRATEGY_GUARD
#include <vector>
#include <ostream>
#include <string>
class EulerState;
class PivotEulerAlg;
class PivotStrategy {
public:
virtual ~PivotStrategy() {}
virtual EulerState* doPivot(EulerState& state, const size_t* divCounts) = 0;
virtual void getName(ostream& out) const = 0;
virtual void computationCompleted(const PivotEulerAlg& alg) = 0;
virtual bool shouldTranspose(const EulerState& state) const = 0;
protected:
PivotStrategy() {}
private:
PivotStrategy(const PivotStrategy&); // not available
void operator=(const PivotStrategy&); // not available
};
unique_ptr<PivotStrategy> newDefaultPivotStrategy();
unique_ptr<PivotStrategy> newStdPivotStrategy(const string& name);
unique_ptr<PivotStrategy> newGenPivotStrategy(const string& name);
unique_ptr<PivotStrategy> newHybridPivotStrategy
(unique_ptr<PivotStrategy> stdStrat, unique_ptr<PivotStrategy> genStrat);
unique_ptr<PivotStrategy> newDebugPivotStrategy(unique_ptr<PivotStrategy> strat,
FILE* out);
unique_ptr<PivotStrategy> newStatisticsPivotStrategy
(unique_ptr<PivotStrategy> strat, FILE* out);
#endif
newHybridPivotStrategy
unique_ptr< PivotStrategy > newHybridPivotStrategy(unique_ptr< PivotStrategy > stdStrat, unique_ptr< PivotStrategy > genStrat)
Definition PivotStrategy.cpp:944
newDefaultPivotStrategy
unique_ptr< PivotStrategy > newDefaultPivotStrategy()
Definition PivotStrategy.cpp:959
newDebugPivotStrategy
unique_ptr< PivotStrategy > newDebugPivotStrategy(unique_ptr< PivotStrategy > strat, FILE *out)
Definition PivotStrategy.cpp:949
newStdPivotStrategy
unique_ptr< PivotStrategy > newStdPivotStrategy(const string &name)
Definition PivotStrategy.cpp:905
newGenPivotStrategy
unique_ptr< PivotStrategy > newGenPivotStrategy(const string &name)
Definition PivotStrategy.cpp:916
newStatisticsPivotStrategy
unique_ptr< PivotStrategy > newStatisticsPivotStrategy(unique_ptr< PivotStrategy > strat, FILE *out)
Definition PivotStrategy.cpp:955
EulerState
Definition EulerState.h:25
PivotEulerAlg
Definition PivotEulerAlg.h:30
PivotStrategy::operator=
void operator=(const PivotStrategy &)
PivotStrategy::doPivot
virtual EulerState * doPivot(EulerState &state, const size_t *divCounts)=0
Split state.
PivotStrategy::~PivotStrategy
virtual ~PivotStrategy()
Definition PivotStrategy.h:30
PivotStrategy::shouldTranspose
virtual bool shouldTranspose(const EulerState &state) const =0
Returns true if transposing state is adviced.
PivotStrategy::PivotStrategy
PivotStrategy()
Definition PivotStrategy.h:47
PivotStrategy::computationCompleted
virtual void computationCompleted(const PivotEulerAlg &alg)=0
Call this function once when computation is complete.
PivotStrategy::PivotStrategy
PivotStrategy(const PivotStrategy &)
PivotStrategy::getName
virtual void getName(ostream &out) const =0
Prints the name of the strategy to out.