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:

## 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.
virtual void | getPivot (Term &pivot, Slice &slice, const TermGrader &grader) const =0
| Sets pivot to the pivot of a pivot split on slice.
virtual size_t | getLabelSplitVariable (const Slice &slice) const =0
| Returns the variable to perform a label split on.
virtual bool | isPivotSplit () const =0
| If returns true, only call getPivot.
virtual bool | isLabelSplit () const =0
| If returns true, only call getLabelSplitVariable.
virtual const char * | getName () const =0
| Returns the name of the strategy.

## Static Public Member Functions

static unique_ptr< SplitStrategy > | createStrategy (const string &prefix)
| Returns the strategy whose name has the given prefix.

## Protected Member Functions

| SplitStrategy ()
| SplitStrategy (const SplitStrategy &)
SplitStrategy & | operator= (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()

unique_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 MaxLabelSplit, MinLabelSplit, SplitStrategyCommon, and VarLabelSplit.

## getName()

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

pure virtual

Returns the name of the strategy.

Implemented in DegreeSplit, DeprecatedFrobeniusSplit, GcdSplit, IndependencePivotSplit, MaximumSplit, MaxLabelSplit, MedianSplit, MinGenSplit, MinimumSplit, MinLabelSplit, and VarLabelSplit.

## 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, GcdSplit, IndependencePivotSplit, MaximumSplit, MedianSplit, MinGenSplit, 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:

- src/SplitStrategy.h
- src/SplitStrategy.cpp