Class AbstractGeneticDiscoveryHandler

    • Constructor Detail

      • AbstractGeneticDiscoveryHandler

        public AbstractGeneticDiscoveryHandler()
    • 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 string
        bits - 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 string
        bits - 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 algorithm
        cont - the property container to update