Package adams.core.discovery.genetic
Class AbstractGeneticIntegerArrayDiscoveryHandler
- 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.AbstractGeneticIntegerArrayDiscoveryHandler
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,ShallowCopySupporter<AbstractDiscoveryHandler>,SizeOfHandler,Serializable
public abstract class AbstractGeneticIntegerArrayDiscoveryHandler extends AbstractGeneticDiscoveryHandler
Ancestor for genetic discovery handlers that handle integer array properties.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected intm_Maximumthe maximum.protected intm_Minimumthe minimum.protected intm_Sizesize of the array-
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 AbstractGeneticIntegerArrayDiscoveryHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected intcalcNumBits()Calculates the number of bits that are required.voiddefineOptions()Adds options to the internal list of options.protected StringdoPack(PropertyPath.PropertyContainer cont)Returns the packed bits for the genetic algorithm.protected voiddoUnpack(PropertyPath.PropertyContainer cont, String bits)Unpacks and applies the bits from the genetic algorithm.protected abstract intgetDefaultMaximum()Returns the default maximum.protected abstract intgetDefaultMinimum()Returns the default minimum.protected abstract intgetDefaultSize()Returns the default size.intgetMaximum()Returns the maximum.intgetMinimum()Returns the minimum.intgetNumBits()Returns the number of required bits.intgetSize()Returns the size.protected abstract int[]getValue(PropertyPath.PropertyContainer cont)Returns the integer value from the property container.StringmaximumTipText()Returns the tip text for this property.StringminimumTipText()Returns the tip text for this property.voidsetMaximum(int value)Sets the maximum.voidsetMinimum(int value)Sets the minimum.voidsetSize(int value)Sets the size of array.protected abstract voidsetValue(PropertyPath.PropertyContainer cont, int[] value)Sets the integer value in the property container.StringsizeTipText()Returns the tip text for this property.-
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:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractDiscoveryHandler
-
getDefaultSize
protected abstract int getDefaultSize()
Returns the default size.- Returns:
- the default
-
getDefaultMinimum
protected abstract int getDefaultMinimum()
Returns the default minimum.- Returns:
- the default
-
setSize
public void setSize(int value)
Sets the size of array.- Parameters:
value- the size
-
getSize
public int getSize()
Returns the size.- Returns:
- the size
-
sizeTipText
public String sizeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setMinimum
public void setMinimum(int value)
Sets the minimum.- Parameters:
value- the minimum
-
getMinimum
public int getMinimum()
Returns the minimum.- Returns:
- the minimum
-
minimumTipText
public String minimumTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultMaximum
protected abstract int getDefaultMaximum()
Returns the default maximum.- Returns:
- the default
-
setMaximum
public void setMaximum(int value)
Sets the maximum.- Parameters:
value- the maximum
-
getMaximum
public int getMaximum()
Returns the maximum.- Returns:
- the maximum
-
maximumTipText
public String maximumTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getValue
protected abstract int[] getValue(PropertyPath.PropertyContainer cont)
Returns the integer 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:
doPackin 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, int[] value)
Sets the integer 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:
doUnpackin classAbstractGeneticDiscoveryHandler- Parameters:
cont- the container to set the value for created from the stringbits- the bits to use
-
calcNumBits
protected int calcNumBits()
Calculates the number of bits that are required.- Returns:
- the number of bits
-
getNumBits
public int getNumBits()
Returns the number of required bits.- Specified by:
getNumBitsin classAbstractGeneticDiscoveryHandler- Returns:
- the number of bits
-
-