StatisticsStrategy Class Reference

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

`#include <StatisticsStrategy.h>`

Inheritance diagram for StatisticsStrategy:

## Public Member Functions

| StatisticsStrategy (SliceStrategy *strategy, FILE *out)
| Statistics are written to out, and every call is delegated to strategy.
virtual | ~StatisticsStrategy ()
virtual void | run (const Ideal &ideal)
| Run the Slice algorithm.
virtual bool | processSlice (TaskEngine &tasks, unique_ptr< Slice > slice)
| Process the parameter slice.
virtual void | setUseIndependence (bool use)
| This method should only be called before calling run().
virtual void | setUseSimplification (bool use)
| This method should only be called before calling run().
virtual bool | getUseSimplification () const
virtual void | freeSlice (unique_ptr< Slice > slice)
| It is allowed to delete returned slices directly, but it is better to use freeSlice.
Public Member Functions inherited from PivotStrategy
virtual | ~PivotStrategy ()
virtual EulerState * | doPivot (EulerState &state, const size_t *divCounts)=0
| Split state.
virtual void | getName (ostream &out) const =0
| Prints the name of the strategy to out.
virtual void | computationCompleted (const PivotEulerAlg &alg)=0
| Call this function once when computation is complete.
virtual bool | shouldTranspose (const EulerState &state) const =0
| Returns true if transposing state is adviced.
Public Member Functions inherited from SliceStrategy
virtual | ~SliceStrategy ()

## Private Attributes

SliceStrategy * | _strategy
FILE * | _out
StatTracker | _internalTracker
StatTracker | _leafTracker

## Additional Inherited Members

Protected Member Functions inherited from PivotStrategy
| PivotStrategy ()

## Detailed Description

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

Definition at line 27 of file StatisticsStrategy.h.

## Constructor & Destructor Documentation

## StatisticsStrategy()

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

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

Definition at line 24 of file StatisticsStrategy.cpp.

## ~StatisticsStrategy()

StatisticsStrategy::~StatisticsStrategy | ( |  | ) |

virtual

Definition at line 32 of file StatisticsStrategy.cpp.

## 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.

Definition at line 70 of file StatisticsStrategy.cpp.

## getUseSimplification()

bool StatisticsStrategy::getUseSimplification | ( |  | ) | const

virtual

Implements SliceStrategy.

Definition at line 66 of file StatisticsStrategy.cpp.

## 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.

Definition at line 43 of file StatisticsStrategy.cpp.

## run()

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

virtual

Run the Slice algorithm.

Implements SliceStrategy.

Definition at line 35 of file StatisticsStrategy.cpp.

## setUseIndependence()

void StatisticsStrategy::setUseIndependence | ( | bool | use | ) |

virtual

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

Implements SliceStrategy.

Definition at line 58 of file StatisticsStrategy.cpp.

## setUseSimplification()

void StatisticsStrategy::setUseSimplification | ( | bool | use | ) |

virtual

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

Implements SliceStrategy.

Definition at line 62 of file StatisticsStrategy.cpp.

## Member Data Documentation

## _internalTracker

StatTracker StatisticsStrategy::_internalTracker

private

Definition at line 90 of file StatisticsStrategy.h.

## _leafTracker

StatTracker StatisticsStrategy::_leafTracker

private

Definition at line 91 of file StatisticsStrategy.h.

## _out

FILE* StatisticsStrategy::_out

private

Definition at line 46 of file StatisticsStrategy.h.

## _strategy

SliceStrategy* StatisticsStrategy::_strategy

private

Definition at line 45 of file StatisticsStrategy.h.

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

- src/StatisticsStrategy.h
- src/StatisticsStrategy.cpp