Frobby  0.9.5
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
SplitStrategy Class Referenceabstract

A SplitStrategy is an implementation of a split selection strategy for the Slice Algorithm. More...

#include <SplitStrategy.h>

Inheritance diagram for SplitStrategy:
SplitStrategyCommon LabelSplit PivotSplit MaxLabelSplit MinLabelSplit VarLabelSplit DegreeSplit GcdSplit MaximumSplit MedianSplit MinGenSplit MinimumSplit

Public Member Functions

virtual ~SplitStrategy ()
 
virtual void getPivot (Term &pivot, Slice &slice) const =0
 Sets pivot to the pivot of a pivot split on slice. More...
 
virtual void getPivot (Term &pivot, Slice &slice, const TermGrader &grader) const =0
 Sets pivot to the pivot of a pivot split on slice. More...
 
virtual size_t getLabelSplitVariable (const Slice &slice) const =0
 Returns the variable to perform a label split on. More...
 
virtual bool isPivotSplit () const =0
 If returns true, only call getPivot. More...
 
virtual bool isLabelSplit () const =0
 If returns true, only call getLabelSplitVariable. More...
 
virtual const char * getName () const =0
 Returns the name of the strategy. More...
 

Static Public Member Functions

static auto_ptr< SplitStrategycreateStrategy (const string &prefix)
 Returns the strategy whose name has the given prefix. More...
 

Protected Member Functions

 SplitStrategy ()
 
 SplitStrategy (const SplitStrategy &)
 
SplitStrategyoperator= (const SplitStrategy &)
 
bool operator== (const SplitStrategy &)
 

Detailed Description

A SplitStrategy is an implementation of a split selection strategy for the Slice Algorithm.

Specifically, it makes a decision about what kind of splits to perform, and how to make any choices involved in performing such a split.

Definition at line 30 of file SplitStrategy.h.

Constructor & Destructor Documentation

◆ ~SplitStrategy()

SplitStrategy::~SplitStrategy ( )
virtual

Definition at line 31 of file SplitStrategy.cpp.

◆ SplitStrategy() [1/2]

SplitStrategy::SplitStrategy ( )
protected

Definition at line 28 of file SplitStrategy.cpp.

◆ SplitStrategy() [2/2]

SplitStrategy::SplitStrategy ( const SplitStrategy )
protected

Member Function Documentation

◆ createStrategy()

auto_ptr< SplitStrategy > SplitStrategy::createStrategy ( const string &  prefix)
static

Returns the strategy whose name has the given prefix.

This is the only way to create a SplitStrategy.

Definition at line 497 of file SplitStrategy.cpp.

◆ getLabelSplitVariable()

virtual size_t SplitStrategy::getLabelSplitVariable ( const Slice slice) const
pure virtual

Returns the variable to perform a label split on.

This method must only be called if isLabelSplit() returns true.

Implemented in MinLabelSplit, VarLabelSplit, MaxLabelSplit, and SplitStrategyCommon.

◆ getName()

virtual const char* SplitStrategy::getName ( ) const
pure virtual

◆ getPivot() [1/2]

virtual void SplitStrategy::getPivot ( Term pivot,
Slice slice 
) const
pure virtual

Sets pivot to the pivot of a pivot split on slice.

The slice is not changed mathematically, but e.g. the generators may be permuted.

This method must only be called if isPivotSplit() returns true.

Implemented in DegreeSplit, MinGenSplit, GcdSplit, IndependencePivotSplit, MaximumSplit, MedianSplit, MinimumSplit, and SplitStrategyCommon.

◆ getPivot() [2/2]

virtual void SplitStrategy::getPivot ( Term pivot,
Slice slice,
const TermGrader grader 
) const
pure virtual

Sets pivot to the pivot of a pivot split on slice.

Some pivot selection strategies make use of a grading. The slice is not changed mathematically, but e.g. the generators may be permuted.

This method must only be called if isPivotSplit() returns true.

Implemented in DegreeSplit, and SplitStrategyCommon.

◆ isLabelSplit()

virtual bool SplitStrategy::isLabelSplit ( ) const
pure virtual

If returns true, only call getLabelSplitVariable.

Implemented in LabelSplit, and SplitStrategyCommon.

◆ isPivotSplit()

virtual bool SplitStrategy::isPivotSplit ( ) const
pure virtual

If returns true, only call getPivot.

Implemented in PivotSplit, and SplitStrategyCommon.

◆ operator=()

SplitStrategy& SplitStrategy::operator= ( const SplitStrategy )
protected

◆ operator==()

bool SplitStrategy::operator== ( const SplitStrategy )
protected

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