Frobby 0.10.0
Loading...
Searching...
No Matches
SplitStrategy Class Referenceabstract

#include <SplitStrategy.h>

Inheritance diagram for SplitStrategy:

Public Member Functions

virtual void getPivot (Term &pivot, Slice &slice) const =0
virtual void getPivot (Term &pivot, Slice &slice, const TermGrader &grader) const =0
virtual size_t getLabelSplitVariable (const Slice &slice) const =0
virtual bool isPivotSplit () const =0
virtual bool isLabelSplit () const =0
virtual const char * getName () const =0

Static Public Member Functions

static unique_ptr< SplitStrategy > createStrategy (const string &prefix)

Protected Member Functions

 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.

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.

◆ 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

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


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