HilbertStrategy.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 HILBERT_STRATEGY_GUARD
#define HILBERT_STRATEGY_GUARD
#include <vector>
#include "IndependenceSplitter.h"
#include "SliceStrategyCommon.h"
#include "ElementDeleter.h"
#include "HilbertIndependenceConsumer.h"
class HilbertSlice;
class Ideal;
class CoefTermConsumer;
class SliceEvent;
class Slice;
class SplitStrategy;
class HilbertStrategy : public SliceStrategyCommon {
public:
HilbertStrategy(CoefTermConsumer* consumer,
const SplitStrategy* splitStrategy);
virtual void run(const Ideal& ideal);
virtual bool processSlice(TaskEngine& tasks, unique_ptr<Slice> slice);
void freeConsumer(unique_ptr<HilbertIndependenceConsumer> consumer);
private:
unique_ptr<HilbertIndependenceConsumer> newConsumer();
unique_ptr<HilbertSlice> newHilbertSlice();
virtual unique_ptr<Slice> allocateSlice();
virtual bool debugIsValidSlice(Slice* slice);
virtual void getPivot(Term& term, Slice& slice);
IndependenceSplitter _indepSplitter;
void independenceSplit(unique_ptr<Slice> slice);
vector<HilbertIndependenceConsumer*> _consumerCache;
ElementDeleter<vector<HilbertIndependenceConsumer*> > _consumerCacheDeleter;
CoefTermConsumer* _consumer;
bool _useIndependence;
};
#endif
ElementDeleter.h
HilbertIndependenceConsumer.h
IndependenceSplitter.h
SliceStrategyCommon.h
CoefTermConsumer
Definition CoefTermConsumer.h:24
ElementDeleter
Definition ElementDeleter.h:50
HilbertSlice
Definition HilbertSlice.h:27
HilbertStrategy::processSlice
virtual bool processSlice(TaskEngine &tasks, unique_ptr< Slice > slice)
Process the parameter slice.
Definition HilbertStrategy.cpp:67
HilbertStrategy::newConsumer
unique_ptr< HilbertIndependenceConsumer > newConsumer()
Definition HilbertStrategy.cpp:147
HilbertStrategy::getPivot
virtual void getPivot(Term &term, Slice &slice)
Used by pivotSplit to obtain a pivot.
Definition HilbertStrategy.cpp:102
HilbertStrategy::_consumerCacheDeleter
ElementDeleter< vector< HilbertIndependenceConsumer * > > _consumerCacheDeleter
Definition HilbertStrategy.h:57
HilbertStrategy::HilbertStrategy
HilbertStrategy(CoefTermConsumer *consumer, const SplitStrategy *splitStrategy)
Definition HilbertStrategy.cpp:29
HilbertStrategy::debugIsValidSlice
virtual bool debugIsValidSlice(Slice *slice)
Check that this slice is valid for use with this strategy.
Definition HilbertStrategy.cpp:96
HilbertStrategy::_indepSplitter
IndependenceSplitter _indepSplitter
Definition HilbertStrategy.h:53
HilbertStrategy::_consumerCache
vector< HilbertIndependenceConsumer * > _consumerCache
Definition HilbertStrategy.h:56
HilbertStrategy::_consumer
CoefTermConsumer * _consumer
Definition HilbertStrategy.h:59
HilbertStrategy::run
virtual void run(const Ideal &ideal)
Run the Slice algorithm.
Definition HilbertStrategy.cpp:37
HilbertStrategy::freeConsumer
void freeConsumer(unique_ptr< HilbertIndependenceConsumer > consumer)
Definition HilbertStrategy.cpp:108
HilbertStrategy::allocateSlice
virtual unique_ptr< Slice > allocateSlice()
Directly allocate a slice of the correct type using new.
Definition HilbertStrategy.cpp:92
HilbertStrategy::_useIndependence
bool _useIndependence
Definition HilbertStrategy.h:60
HilbertStrategy::newHilbertSlice
unique_ptr< HilbertSlice > newHilbertSlice()
Definition HilbertStrategy.cpp:86
HilbertStrategy::independenceSplit
void independenceSplit(unique_ptr< Slice > slice)
Definition HilbertStrategy.cpp:119
Ideal
Represents a monomial ideal with int exponents.
Definition Ideal.h:27
IndependenceSplitter
Definition IndependenceSplitter.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
Term
Term represents a product of variables which does not include a coefficient.
Definition Term.h:49