Documentation of 'ec.app.multiplexer.MultiplexerData' Java class
MultiplexerData
ec.app.multiplexer

Class MultiplexerData

  • All Implemented Interfaces:
    Prototype, Setup, java.io.Serializable, java.lang.Cloneable


    public class MultiplexerData
    extends GPData
    This is ugly and complicated because it needs to hold a variety of different-length bitstrings, including temporary ones held while computing subtrees.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      long[] dat_11
      An array of 32 longs for Multiplexer-11 data
      byte dat_3
      A byte for Multiplexer-3 data
      long dat_6
      A long for Multiplexer-6 data
      static int MULTI_11_BITLENGTH
      The length of an atomic data element in Multiplexer-11 (a long)
      static int MULTI_11_NUM_BITSTRINGS
      The number of atomic elements in Multiplexer-11 comprising one string (32)
      static int MULTI_3_BITLENGTH
      The length of an atomic data element in Multiplexer-3 (a byte)
      static int MULTI_6_BITLENGTH
      The length of an atomic data element in Multiplexer-6 (a long)
      byte status
      A byte indicating the number of Dn in this problem
      static byte STATUS_11
      The number of Dn in Multiplexer-11
      static byte STATUS_3
      The number of Dn in Multiplexer-3
      static byte STATUS_6
      The number of Dn in Multiplexer-6
      java.util.Stack tmp
      A stack of available long arrays for popDat11/pushDat11
    • Constructor Summary

      Constructors 
      Constructor and Description
      MultiplexerData() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object clone()
      Creates a new individual cloned from a prototype, and suitable to begin use in its own evolutionary context.
      void copyTo(GPData gpd)
      Modifies gpd so that gpd is equivalent to us.
      long[] popDat11()
      Pops a dat_11 off of the stack; if the stack is empty, creates a new dat_11 and returns that.
      void pushDat11(long[] l)
      Pushes a dat_11 onto the stack
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • tmp

        public java.util.Stack tmp
        A stack of available long arrays for popDat11/pushDat11
      • STATUS_3

        public static final byte STATUS_3
        The number of Dn in Multiplexer-3
        See Also:
        Constant Field Values
      • STATUS_6

        public static final byte STATUS_6
        The number of Dn in Multiplexer-6
        See Also:
        Constant Field Values
      • STATUS_11

        public static final byte STATUS_11
        The number of Dn in Multiplexer-11
        See Also:
        Constant Field Values
      • MULTI_3_BITLENGTH

        public static final int MULTI_3_BITLENGTH
        The length of an atomic data element in Multiplexer-3 (a byte)
        See Also:
        Constant Field Values
      • MULTI_6_BITLENGTH

        public static final int MULTI_6_BITLENGTH
        The length of an atomic data element in Multiplexer-6 (a long)
        See Also:
        Constant Field Values
      • MULTI_11_BITLENGTH

        public static final int MULTI_11_BITLENGTH
        The length of an atomic data element in Multiplexer-11 (a long)
        See Also:
        Constant Field Values
      • MULTI_11_NUM_BITSTRINGS

        public static final int MULTI_11_NUM_BITSTRINGS
        The number of atomic elements in Multiplexer-11 comprising one string (32)
        See Also:
        Constant Field Values
      • dat_11

        public long[] dat_11
        An array of 32 longs for Multiplexer-11 data
      • dat_6

        public long dat_6
        A long for Multiplexer-6 data
      • dat_3

        public byte dat_3
        A byte for Multiplexer-3 data
      • status

        public byte status
        A byte indicating the number of Dn in this problem
    • Constructor Detail

      • MultiplexerData

        public MultiplexerData()
    • Method Detail

      • popDat11

        public long[] popDat11()
        Pops a dat_11 off of the stack; if the stack is empty, creates a new dat_11 and returns that.
      • pushDat11

        public void pushDat11(long[] l)
        Pushes a dat_11 onto the stack
      • clone

        public java.lang.Object clone()
        Description copied from interface: Prototype
        Creates a new individual cloned from a prototype, and suitable to begin use in its own evolutionary context.

        Typically this should be a full "deep" clone. However, you may share certain elements with other objects rather than clone hem, depending on the situation:

        • If you hold objects which are shared with other instances, don't clone them.
        • If you hold objects which must be unique, clone them.
        • If you hold objects which were given to you as a gesture of kindness, and aren't owned by you, you probably shouldn't clone them.
        • DON'T attempt to clone: Singletons, Cliques, or Groups.
        • Arrays are not cloned automatically; you may need to clone an array if you're not sharing it with other instances. Arrays have the nice feature of being copyable by calling clone() on them.

        Implementations.

        • If no ancestor of yours implements clone(), and you have no need to do clone deeply, and you are abstract, then you should not declare clone().
        • If no ancestor of yours implements clone(), and you have no need to do clone deeply, and you are not abstract, then you should implement it as follows:

           public Object clone() 
               {
               try
                   { 
                   return super.clone();
                   }
               catch ((CloneNotSupportedException e)
                   { throw new InternalError(); } // never happens
               }
                  
        • If no ancestor of yours implements clone(), but you need to deep-clone some things, then you should implement it as follows:

           public Object clone() 
               {
               try
                   { 
                   MyObject myobj = (MyObject) (super.clone());
          
                   // put your deep-cloning code here...
                   }
               catch ((CloneNotSupportedException e)
                   { throw new InternalError(); } // never happens
               return myobj;
               } 
                  
        • If an ancestor has implemented clone(), and you also need to deep clone some things, then you should implement it as follows:

           public Object clone() 
               { 
               MyObject myobj = (MyObject) (super.clone());
          
               // put your deep-cloning code here...
          
               return myobj;
               } 
                  
        Specified by:
        clone in interface Prototype
        Overrides:
        clone in class GPData
      • copyTo

        public void copyTo(GPData gpd)
        Description copied from class: GPData
        Modifies gpd so that gpd is equivalent to us. You may safely assume that gpd is of the same class as we are. Do not share pointers with the other object, except to read-only data: instead, copy any read-write data as necessary.
        Overrides:
        copyTo in class GPData

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.