Frobby 0.10.0
Loading...
Searching...
No Matches
StatisticsStrategy Class Reference

#include <StatisticsStrategy.h>

Inheritance diagram for StatisticsStrategy:
Collaboration diagram for StatisticsStrategy:

Public Member Functions

 StatisticsStrategy (SliceStrategy *strategy, FILE *out)
virtual void run (const Ideal &ideal)
virtual bool processSlice (TaskEngine &tasks, unique_ptr< Slice > slice)
virtual void setUseIndependence (bool use)
virtual void setUseSimplification (bool use)
virtual bool getUseSimplification () const
virtual void freeSlice (unique_ptr< Slice > slice)
Public Member Functions inherited from 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

Detailed Description

A wrapper for a SliceStrategy that collects statistics on what is going on, while delegating everything to the strategy being wrapped.

Constructor & Destructor Documentation

◆ StatisticsStrategy()

StatisticsStrategy::StatisticsStrategy ( SliceStrategy * strategy,
FILE * out )

Statistics are written to out, and every call is delegated to strategy.

Member Function Documentation

◆ freeSlice()

void StatisticsStrategy::freeSlice ( unique_ptr< Slice > slice)
virtual

It is allowed to delete returned slices directly, but it is better to use freeSlice. freeSlice can only be called on slices obtained from a method of the same strategy. This allows caching of slices to avoid frequent allocation and deallocation.

Implements SliceStrategy.

◆ getUseSimplification()

bool StatisticsStrategy::getUseSimplification ( ) const
virtual

Implements SliceStrategy.

◆ processSlice()

bool StatisticsStrategy::processSlice ( TaskEngine & tasks,
unique_ptr< Slice > slice )
virtual

Process the parameter slice. Returns true if this is a base case and false otherwise.

Implements SliceStrategy.

◆ run()

void StatisticsStrategy::run ( const Ideal & ideal)
virtual

Run the Slice algorithm.

Implements SliceStrategy.

◆ setUseIndependence()

void StatisticsStrategy::setUseIndependence ( bool use)
virtual

This method should only be called before calling run().

Implements SliceStrategy.

◆ setUseSimplification()

void StatisticsStrategy::setUseSimplification ( bool use)
virtual

This method should only be called before calling run().

Implements SliceStrategy.


The documentation for this class was generated from the following files: