Class BooleanCommand

  • All Implemented Interfaces:
    Serializable, Cloneable, Comparable, org.jgap.gp.IMutateable, org.jgap.util.ICloneable

    public class BooleanCommand
    extends org.jgap.gp.CommandGene
    implements org.jgap.util.ICloneable, org.jgap.gp.IMutateable
    Deprecated.
    use NestedBoolean.
    Class implements Boolean Operators. Children are either NesetedBooleans or Measures. Therefore, it's not required anymore and can be replaced with NestedBoolean.
    Version:
    Jul 21, 2016
    Author:
    Klaus Lyko, Mohamed Sherif (sherif@informatik.uni-leipzig.de)
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.jgap.gp.CommandGene

        org.jgap.gp.CommandGene.COMMAND_TYPE
    • Field Summary

      • Fields inherited from class org.jgap.gp.CommandGene

        BooleanClass, CharacterClass, DELTA, DoubleClass, FloatClass, IntegerClass, LongClass, nodeIndex, VoidClass
      • Fields inherited from interface org.jgap.util.ICloneable

        CVS_REVISION
      • Fields inherited from interface org.jgap.gp.IMutateable

        CVS_REVISION
    • Constructor Summary

      Constructors 
      Constructor Description
      BooleanCommand​(org.jgap.gp.impl.GPConfiguration a_conf, Class<?> a_returnType, String command)
      Deprecated.
      Default Constructor.
      BooleanCommand​(org.jgap.gp.impl.GPConfiguration a_conf, String command)
      Deprecated.
      Basic Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      org.jgap.gp.CommandGene applyMutation​(int a_index, double a_percentage)
      Deprecated.
       
      Object clone()
      Deprecated.
      Clones the object.
      Object execute_object​(org.jgap.gp.impl.ProgramChromosome a_chrom, int a_n, Object[] args)
      Deprecated.
      Executes BooleanCommand as and Object returning String of resulting expression.
      void execute_void​(org.jgap.gp.impl.ProgramChromosome a_chrom, int a_n, Object[] args)
      Deprecated.
       
      Class<?> getChildType​(org.jgap.gp.IGPProgram a_ind, int a_chromNum)
      Deprecated.
       
      String toString()
      Deprecated.
       
      • Methods inherited from class org.jgap.gp.CommandGene

        check, check, cleanup, compareTo, dynamizeArity, ensureUniqueness, ensureUniqueness, ensureUniqueness2, equals, execute, execute_boolean, execute_double, execute_float, execute_int, execute_long, getAllele, getApplicationData, getArity, getArityMax, getArityMin, getCommandType, getEnergy, getGPConfiguration, getInternalValue, getName, getPersistentRepresentation, getPersistentRepresentationExt, getReturnType, getSubChildType, getSubChildTypes, getSubReturnType, hashCode, init, isAffectGlobalState, isCompareApplicationData, isFloatType, isIntegerType, isValid, isValid, setAllele, setApplicationData, setArity, setArityMax, setArityMin, setCompareApplicationData, setEnergy, setNoValidation, setReturnType, setToRandomValue, setValueFromPersistentRepresentation, setValueFromString, size
    • Constructor Detail

      • BooleanCommand

        public BooleanCommand​(org.jgap.gp.impl.GPConfiguration a_conf,
                              String command)
                       throws org.jgap.InvalidConfigurationException
        Deprecated.
        Basic Constructor.
        Parameters:
        a_conf - a_conf A JGAP GPconfiguration instance.
        command - the actual boolean command (AND, OR, XOR)
        Throws:
        org.jgap.InvalidConfigurationException - when an invalid value has been passed to a Configuration object
      • BooleanCommand

        public BooleanCommand​(org.jgap.gp.impl.GPConfiguration a_conf,
                              Class<?> a_returnType,
                              String command)
                       throws org.jgap.InvalidConfigurationException
        Deprecated.
        Default Constructor. A Boolean Metric is a boolean expression combining two similarity measures as of now.
        Parameters:
        a_conf - A JGAP GPconfiguration instance.
        a_returnType - Define the return type of this node.
        Throws:
        org.jgap.InvalidConfigurationException - when an invalid value has been passed to a Configuration object TODO For a future version also allow other boolean measures to be children of this node.
    • Method Detail

      • getChildType

        public Class<?> getChildType​(org.jgap.gp.IGPProgram a_ind,
                                     int a_chromNum)
        Deprecated.
        Overrides:
        getChildType in class org.jgap.gp.CommandGene
      • toString

        public String toString()
        Deprecated.
        Specified by:
        toString in class org.jgap.gp.CommandGene
      • execute_object

        public Object execute_object​(org.jgap.gp.impl.ProgramChromosome a_chrom,
                                     int a_n,
                                     Object[] args)
        Deprecated.
        Executes BooleanCommand as and Object returning String of resulting expression.
        Overrides:
        execute_object in class org.jgap.gp.CommandGene
      • execute_void

        public void execute_void​(org.jgap.gp.impl.ProgramChromosome a_chrom,
                                 int a_n,
                                 Object[] args)
        Deprecated.
        Overrides:
        execute_void in class org.jgap.gp.CommandGene
      • clone

        public Object clone()
        Deprecated.
        Clones the object.
        Specified by:
        clone in interface org.jgap.util.ICloneable
        Overrides:
        clone in class Object
        Returns:
        cloned instance of this object
      • applyMutation

        public org.jgap.gp.CommandGene applyMutation​(int a_index,
                                                     double a_percentage)
                                              throws org.jgap.InvalidConfigurationException
        Deprecated.
        Specified by:
        applyMutation in interface org.jgap.gp.IMutateable
        Throws:
        org.jgap.InvalidConfigurationException