MsmStrategy.h
Go to the documentation of this file.
/* Frobby: Software for monomial ideal computations.
Copyright (C) 2007 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 MSM_STRATEGY_GUARD
#define MSM_STRATEGY_GUARD
#include "SliceStrategyCommon.h"
#include <string>
#include "TermConsumer.h"
#include <vector>
#include "SplitStrategy.h"
#include "IndependenceSplitter.h"
class MsmSlice;
class Term;
class TermTranslator;
class Projection;
class Ideal;
class TermGrader;
class IndependenceSplitter;
class SliceEvent;
class TermConsumer;
class MsmStrategy : public SliceStrategyCommon {
public:
MsmStrategy(TermConsumer* consumer, const SplitStrategy* splitStrategy);
MsmStrategy(TermConsumer* consumer, const SplitStrategy* splitStrategy,
const Ideal& initialSubtract);
virtual void run(const Ideal& ideal);
virtual bool processSlice(TaskEngine& tasks, unique_ptr<Slice> slice);
protected:
virtual void getPivot(Term& pivot, Slice& slice);
virtual void getPivot(Term& pivot, Slice& slice, const TermGrader& grader);
private:
unique_ptr<MsmSlice> newMsmSlice();
virtual unique_ptr<Slice> allocateSlice();
virtual bool debugIsValidSlice(Slice* slice);
void labelSplit(unique_ptr<Slice> slice);
void independenceSplit(unique_ptr<Slice> slice);
size_t getLabelSplitVariable(const Slice& slice);
IndependenceSplitter _indep;
TermConsumer* _consumer;
unique_ptr<Ideal> _initialSubtract;
};
#endif
IndependenceSplitter.h
SliceStrategyCommon.h
SplitStrategy.h
TermConsumer.h
Ideal
Represents a monomial ideal with int exponents.
Definition Ideal.h:27
IndependenceSplitter
Definition IndependenceSplitter.h:29
MsmSlice
Invariant: either the slice is a trivial base case, or removeDoubleLcm returns false.
Definition MsmSlice.h:33
MsmStrategy::allocateSlice
virtual unique_ptr< Slice > allocateSlice()
Directly allocate a slice of the correct type using new.
Definition MsmStrategy.cpp:93
MsmStrategy::debugIsValidSlice
virtual bool debugIsValidSlice(Slice *slice)
Check that this slice is valid for use with this strategy.
Definition MsmStrategy.cpp:97
MsmStrategy::processSlice
virtual bool processSlice(TaskEngine &tasks, unique_ptr< Slice > slice)
Process the parameter slice.
Definition MsmStrategy.cpp:67
MsmStrategy::_indep
IndependenceSplitter _indep
Definition MsmStrategy.h:62
MsmStrategy::independenceSplit
void independenceSplit(unique_ptr< Slice > slice)
Definition MsmStrategy.cpp:258
MsmStrategy::newMsmSlice
unique_ptr< MsmSlice > newMsmSlice()
Definition MsmStrategy.cpp:87
MsmStrategy::_consumer
TermConsumer * _consumer
Definition MsmStrategy.h:63
MsmStrategy::_initialSubtract
unique_ptr< Ideal > _initialSubtract
Definition MsmStrategy.h:65
MsmStrategy::getPivot
virtual void getPivot(Term &pivot, Slice &slice)
Used by pivotSplit to obtain a pivot.
Definition MsmStrategy.cpp:285
MsmStrategy::labelSplit
void labelSplit(unique_ptr< Slice > slice)
Definition MsmStrategy.cpp:103
MsmStrategy::run
virtual void run(const Ideal &ideal)
Run the Slice algorithm.
Definition MsmStrategy.cpp:44
MsmStrategy::MsmStrategy
MsmStrategy(TermConsumer *consumer, const SplitStrategy *splitStrategy)
Definition MsmStrategy.cpp:28
MsmStrategy::getLabelSplitVariable
size_t getLabelSplitVariable(const Slice &slice)
Projection
Definition Projection.h:29
SliceStrategyCommon::SliceStrategyCommon
SliceStrategyCommon(const SplitStrategy *splitStrategy)
Definition SliceStrategyCommon.cpp:24
Slice
This class represents a slice, which is the central data structure of the Slice Algorithm.
Definition Slice.h:77
SplitStrategy
A SplitStrategy is an implementation of a split selection strategy for the Slice Algorithm.
Definition SplitStrategy.h:30
TaskEngine
TaskEngine handles a list of tasks that are to be carried out.
Definition TaskEngine.h:40
TermConsumer
This class is used to transfer terms one at a time from one part of the program to another,...
Definition TermConsumer.h:36
TermGrader
A TermGrader assigns a value, the degree, to each monomial.
Definition TermGrader.h:27
TermTranslator
TermTranslator handles translation between terms whose exponents are infinite precision integers and ...
Definition TermTranslator.h:41
Term
Term represents a product of variables which does not include a coefficient.
Definition Term.h:49