Package adams.core.discovery.genetic
Class AbstractGeneticDiscoveryHandler
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.core.discovery.AbstractDiscoveryHandler
-
- adams.core.discovery.genetic.AbstractGeneticDiscoveryHandler
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<AbstractDiscoveryHandler>
,SizeOfHandler
,Serializable
- Direct Known Subclasses:
AbstractGeneticDoubleDiscoveryHandler
,AbstractGeneticDoubleMatrixDiscoveryHandler
,AbstractGeneticFloatDiscoveryHandler
,AbstractGeneticIntegerArrayDiscoveryHandler
,AbstractGeneticIntegerDiscoveryHandler
,AbstractGeneticStringDiscoveryHandler
public abstract class AbstractGeneticDiscoveryHandler extends AbstractDiscoveryHandler
Ancestor for genetic algorithm related discovery handlers.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
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 AbstractGeneticDiscoveryHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract String
doPack(PropertyPath.PropertyContainer cont)
Returns the packed bits for the genetic algorithm.protected abstract void
doUnpack(PropertyPath.PropertyContainer cont, String bits)
Unpacks and applies the bits from the genetic algorithm.abstract int
getNumBits()
Returns the number of required bits.String
pack(PropertyPath.PropertyContainer cont)
Returns the packed bits for the genetic algorithm.void
performInitialization(AbstractGeneticAlgorithm owner, PropertyPath.PropertyContainer cont)
Gets called for performing the initialization.boolean
requiresInitialization()
Returns whether the handler requires an initialization.void
unpack(PropertyPath.PropertyContainer cont, String bits)
Unpacks and applies the bits from the genetic algorithm.-
Methods inherited from class adams.core.discovery.AbstractDiscoveryHandler
addContainer, defineOptions, 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
-
getNumBits
public abstract int getNumBits()
Returns the number of required bits.- Returns:
- the number of bits
-
doPack
protected abstract String doPack(PropertyPath.PropertyContainer cont)
Returns the packed bits for the genetic algorithm.- Parameters:
cont
- the container to obtain the value from to turn into a string- Returns:
- the bits
-
pack
public String pack(PropertyPath.PropertyContainer cont)
Returns the packed bits for the genetic algorithm.- Parameters:
cont
- the container to obtain the value from to turn into a string- Returns:
- the bits
-
doUnpack
protected abstract void doUnpack(PropertyPath.PropertyContainer cont, String bits)
Unpacks and applies the bits from the genetic algorithm.- Parameters:
cont
- the container to set the value for created from the stringbits
- the bits to use
-
unpack
public void unpack(PropertyPath.PropertyContainer cont, String bits)
Unpacks and applies the bits from the genetic algorithm.- Parameters:
cont
- the container to set the value for created from the stringbits
- the bits to use
-
requiresInitialization
public boolean requiresInitialization()
Returns whether the handler requires an initialization.
Default implementation returns false.- Returns:
- true if necessary
-
performInitialization
public void performInitialization(AbstractGeneticAlgorithm owner, PropertyPath.PropertyContainer cont)
Gets called for performing the initialization.
Default implementation does nothing.- Parameters:
owner
- the owning algorithmcont
- the property container to update
-
-