Documentation of 'ec.spatial.Spatial1DSubpopulation' Java class
Spatial1DSubpopulation
ec.spatial

Class Spatial1DSubpopulation

    • Field Detail

      • P_TOROIDAL

        public static final java.lang.String P_TOROIDAL
        This parameter stipulates whether the world is toroidal or not. If missing, its default value is true.
        See Also:
        Constant Field Values
      • toroidal

        public boolean toroidal
    • Constructor Detail

      • Spatial1DSubpopulation

        public Spatial1DSubpopulation()
    • Method Detail

      • setIndex

        public void setIndex(int threadnum,
                             int index)
        Description copied from interface: Space
        Input: a threadnumber (either for evaluation or for breeding), and an index in a subpopulation (the index in the subpopulation is, of course, associated with a location in the space) Functionality: stores the index and the threadnumber for further accesses to the getIndexRandomNeighbor method. All such accesses from the specific thread will use the exact same index, until this function is called again to change the index.
        Specified by:
        setIndex in interface Space
      • getIndex

        public int getIndex(int threadnum)
        Description copied from interface: Space
        Functionality: retrieve the index for a specific threanum. Returns -1 if any error is encountered.
        Specified by:
        getIndex in interface Space
      • getIndexRandomNeighbor

        public int getIndexRandomNeighbor(EvolutionState state,
                                          int threadnum,
                                          int distance)
        Returns a the index of a random neighbor.
        Specified by:
        getIndexRandomNeighbor in interface Space

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.