17 #ifndef STATISTICS_STRATEGY
18 #define STATISTICS_STRATEGY
34 virtual void run(
const Ideal& ideal);
42 virtual void freeSlice(auto_ptr<Slice> slice);
Represents a monomial ideal with int exponents.
This class describes the interface of a strategy object for the Slice Algorithm.
virtual void setUseSimplification(bool use)=0
This method should only be called before calling run().
virtual void freeSlice(auto_ptr< Slice > slice)=0
It is allowed to delete returned slices directly, but it is better to use freeSlice.
virtual void setUseIndependence(bool use)=0
This method should only be called before calling run().
virtual bool processSlice(TaskEngine &tasks, auto_ptr< Slice > slice)=0
Process the parameter slice.
virtual bool getUseSimplification() const =0
virtual void run(const Ideal &ideal)=0
Run the Slice algorithm.
This class represents a slice, which is the central data structure of the Slice Algorithm.
StatisticsStrategy(SliceStrategy *strategy, FILE *out)
Statistics are written to out, and every call is delegated to strategy.
StatTracker _internalTracker
SliceStrategy * _strategy
TaskEngine handles a list of tasks that are to be carried out.
Tracks statistics on slices.
void printReport(FILE *out) const
Print a report on statistics of the recorded slices to the file out.
StatTracker(const string &title)
The title parameter indicates what is to be printed when calling printReport().
double getAvgVarCount() const
size_t _prelimSubGenCount
const mpz_class & getNodeCount() const
double getAvgSubGenCount() const
void commitRecord()
Commit the most recent argument to preliminaryTrack permanently to the record.
map< size_t, mpz_class > _nodesByGenCount
_nodesByGenCount[l] records how many slices have been recorded whose ideal has approximately 2^l gene...
double getAvgIdealGenCount() const
size_t _prelimIdealGenCount
void preliminaryRecord(const Slice &slice)
Record information about slice, but store it only until this method is next called on this object.