Package adams.core.discovery.genetic
Class AbstractGeneticFloatDiscoveryHandlerResolution
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.core.discovery.AbstractDiscoveryHandler
-
- adams.core.discovery.genetic.AbstractGeneticDiscoveryHandler
-
- adams.core.discovery.genetic.AbstractGeneticFloatDiscoveryHandler
-
- adams.core.discovery.genetic.AbstractGeneticFloatDiscoveryHandlerResolution
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<AbstractDiscoveryHandler>
,SizeOfHandler
,Serializable
- Direct Known Subclasses:
GenericFloatResolution
public abstract class AbstractGeneticFloatDiscoveryHandlerResolution extends AbstractGeneticFloatDiscoveryHandler
Ancestor for genetic discovery handlers that handle float properties with a specified number of splits.- Author:
- Dale (dale at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_Splits
the number of splits.-
Fields inherited from class adams.core.discovery.genetic.AbstractGeneticFloatDiscoveryHandler
m_List, m_Maximum, m_Minimum, m_Type
-
Fields inherited from class adams.core.discovery.AbstractDiscoveryHandler
m_Containers, m_InvertMatching, m_RegExp
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractGeneticFloatDiscoveryHandlerResolution()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected int
calcNumBits()
Calculates the number of bits to use.void
defineOptions()
Adds options to the internal list of options.protected String
doPack(PropertyPath.PropertyContainer cont)
Returns the packed bits for the genetic algorithm.protected void
doUnpack(PropertyPath.PropertyContainer cont, String bits)
Unpacks and applies the bits from the genetic algorithm.protected abstract int
getDefaultSplits()
Returns the default splits.int
getNumBits()
Returns the number of required bits.int
getSplits()
Returns the minimum.protected abstract float
getValue(PropertyPath.PropertyContainer cont)
Returns the float value from the property container.void
setSplits(int value)
Sets the splits.protected abstract void
setValue(PropertyPath.PropertyContainer cont, float value)
Sets the float value in the property container.String
splitsTipText()
Returns the tip text for this property.-
Methods inherited from class adams.core.discovery.genetic.AbstractGeneticFloatDiscoveryHandler
getDefaultList, getDefaultMaximum, getDefaultMinimum, getDefaultType, getList, getMaximum, getMinimum, getType, listTipText, maximumTipText, minimumTipText, setList, setMaximum, setMinimum, setType, typeTipText
-
Methods inherited from class adams.core.discovery.genetic.AbstractGeneticDiscoveryHandler
pack, performInitialization, requiresInitialization, unpack
-
Methods inherited from class adams.core.discovery.AbstractDiscoveryHandler
addContainer, getContainers, getInvertMatching, getRegExp, handles, handles, invertMatchingTipText, regExpTipText, reset, setInvertMatching, setRegExp, shallowCopy, shallowCopy, toString
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractGeneticFloatDiscoveryHandler
-
getDefaultSplits
protected abstract int getDefaultSplits()
Returns the default splits.- Returns:
- the default
-
setSplits
public void setSplits(int value)
Sets the splits.- Parameters:
value
- the splits
-
getSplits
public int getSplits()
Returns the minimum.- Returns:
- the minimum
-
splitsTipText
public String splitsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getNumBits
public int getNumBits()
Returns the number of required bits.- Specified by:
getNumBits
in classAbstractGeneticDiscoveryHandler
- Returns:
- the number of bits
-
calcNumBits
protected int calcNumBits()
Calculates the number of bits to use.- Returns:
- the number of bits
-
getValue
protected abstract float getValue(PropertyPath.PropertyContainer cont)
Returns the float value from the property container.- Parameters:
cont
- the container- Returns:
- the value
-
doPack
protected String doPack(PropertyPath.PropertyContainer cont)
Returns the packed bits for the genetic algorithm.- Specified by:
doPack
in classAbstractGeneticDiscoveryHandler
- Parameters:
cont
- the container to obtain the value from to turn into a string- Returns:
- the bits
-
setValue
protected abstract void setValue(PropertyPath.PropertyContainer cont, float value)
Sets the float value in the property container.- Parameters:
cont
- the containervalue
- the value to set
-
doUnpack
protected void doUnpack(PropertyPath.PropertyContainer cont, String bits)
Unpacks and applies the bits from the genetic algorithm.- Specified by:
doUnpack
in classAbstractGeneticDiscoveryHandler
- Parameters:
cont
- the container to set the value for created from the stringbits
- the bits to use
-
-