Frobby  0.9.5
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SplitStrategyCommon Class Reference

This common base class provides code that is useful for writing pivot split strategies. More...

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

Public Member Functions

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

Protected Member Functions

Exponent getMedianPositiveExponentOf (Slice &slice, size_t var) const
 
size_t getBestVar (const Slice &slice) const
 
- Protected Member Functions inherited from SplitStrategy
 SplitStrategy ()
 
 SplitStrategy (const SplitStrategy &)
 
SplitStrategyoperator= (const SplitStrategy &)
 
bool operator== (const SplitStrategy &)
 

Protected Attributes

Term coVariableForGetBestVar
 

Additional Inherited Members

- Static Public Member Functions inherited from SplitStrategy
static auto_ptr< SplitStrategycreateStrategy (const string &prefix)
 Returns the strategy whose name has the given prefix. More...
 

Detailed Description

This common base class provides code that is useful for writing pivot split strategies.

Definition at line 37 of file SplitStrategy.cpp.

Member Function Documentation

◆ getBestVar()

size_t SplitStrategyCommon::getBestVar ( const Slice slice) const
inlineprotected

Definition at line 78 of file SplitStrategy.cpp.

◆ getLabelSplitVariable()

virtual size_t SplitStrategyCommon::getLabelSplitVariable ( const Slice slice) const
inlinevirtual

Returns the variable to perform a label split on.

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

Implements SplitStrategy.

Reimplemented in MinLabelSplit, VarLabelSplit, and MaxLabelSplit.

Definition at line 48 of file SplitStrategy.cpp.

◆ getMedianPositiveExponentOf()

Exponent SplitStrategyCommon::getMedianPositiveExponentOf ( Slice slice,
size_t  var 
) const
inlineprotected

Definition at line 63 of file SplitStrategy.cpp.

◆ getPivot() [1/2]

virtual void SplitStrategyCommon::getPivot ( Term pivot,
Slice slice 
) const
inlinevirtual

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.

Implements SplitStrategy.

Reimplemented in DegreeSplit, MinGenSplit, GcdSplit, IndependencePivotSplit, MaximumSplit, MedianSplit, and MinimumSplit.

Definition at line 39 of file SplitStrategy.cpp.

◆ getPivot() [2/2]

virtual void SplitStrategyCommon::getPivot ( Term pivot,
Slice slice,
const TermGrader grader 
) const
inlinevirtual

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.

Implements SplitStrategy.

Reimplemented in DegreeSplit.

Definition at line 44 of file SplitStrategy.cpp.

◆ isLabelSplit()

virtual bool SplitStrategyCommon::isLabelSplit ( ) const
inlinevirtual

If returns true, only call getLabelSplitVariable.

Implements SplitStrategy.

Reimplemented in LabelSplit.

Definition at line 58 of file SplitStrategy.cpp.

◆ isPivotSplit()

virtual bool SplitStrategyCommon::isPivotSplit ( ) const
inlinevirtual

If returns true, only call getPivot.

Implements SplitStrategy.

Reimplemented in PivotSplit.

Definition at line 54 of file SplitStrategy.cpp.

Member Data Documentation

◆ coVariableForGetBestVar

Term SplitStrategyCommon::coVariableForGetBestVar
mutableprotected

Definition at line 77 of file SplitStrategy.cpp.


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