17 #ifndef SLICE_STRATEGY_COMMON 18 #define SLICE_STRATEGY_COMMON 39 virtual void freeSlice(auto_ptr<Slice> slice);
67 virtual void pivotSplit(auto_ptr<Slice> slice);
virtual bool debugIsValidSlice(Slice *slice)=0
Check that this slice is valid for use with this strategy.
bool getUseSimplification() const
Returns true if slices should be simplified.
bool getUseIndependence() const
Returns true if independence splits should be performed when possible.
auto_ptr< Slice > newSlice()
Returns a slice from the cache that freeSlice adds to, or allocate a new one using allocateSlice...
virtual void setUseIndependence(bool use)
This method should only be called before calling run().
A SplitStrategy is an implementation of a split selection strategy for the Slice Algorithm.
This class represents a slice, which is the central data structure of the Slice Algorithm.
vector< Slice * > _sliceCache
This is the cache maintained through newSlice and freeSlice.
const SplitStrategy * _split
TaskEngine _tasks
This keeps track of pending tasks to process.
virtual auto_ptr< Slice > allocateSlice()=0
Directly allocate a slice of the correct type using new.
virtual void setUseSimplification(bool use)
This method should only be called before calling run().
virtual void freeSlice(auto_ptr< Slice > slice)
It is allowed to delete returned slices directly, but it is better to use freeSlice.
SliceStrategyCommon(const SplitStrategy *splitStrategy)
virtual void pivotSplit(auto_ptr< Slice > slice)
Takes over ownership of slice.
TaskEngine handles a list of tasks that are to be carried out.
virtual ~SliceStrategyCommon()
This class adds code to the SliceStrategy base class that is useful for derived classes.
This class describes the interface of a strategy object for the Slice Algorithm.
virtual void getPivot(Term &pivot, Slice &slice)=0
Used by pivotSplit to obtain a pivot.
virtual bool simplify(Slice &slice)
Simplifies slice and returns true if it changed.
Term represents a product of variables which does not include a coefficient.