net.sourceforge.cilib.games.random
Class FixedListSeedingStrategy
java.lang.Object
net.sourceforge.cilib.games.random.GameSeedingStrategy
net.sourceforge.cilib.games.random.ListSeedingStrategy
net.sourceforge.cilib.games.random.RandomListSeedingStrategy
net.sourceforge.cilib.games.random.FixedListSeedingStrategy
- All Implemented Interfaces:
- Serializable, Cloneable
public class FixedListSeedingStrategy
- extends RandomListSeedingStrategy
This class is similar to the ListSeedingStrategy but differs in the following way.
A list of specified seeds are stored. The same number of seeds in the list are used multiple times, and at a fixed interval
the next set of seeds in the list are used. This class is used to set a fixed number of seeds and to alternate
between them at fixed intervals.
- Author:
- leo
- See Also:
- Serialized Form
Method Summary |
FixedListSeedingStrategy |
getClone()
Create a cloned copy of the current object and return it. |
void |
setUseCount(int useCount)
This method sets the number of seeds to repeatedly use in the list for the specified interval |
protected void |
updateIndex()
Update the index that is used to get a seed from the list. |
protected void |
updateSeed()
The seeds are never changed |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FixedListSeedingStrategy
public FixedListSeedingStrategy()
FixedListSeedingStrategy
public FixedListSeedingStrategy(FixedListSeedingStrategy other)
- Parameters:
other
-
getClone
public FixedListSeedingStrategy getClone()
- Create a cloned copy of the current object and return it. In general
the created copy will be a deep copy of the provided instance. As
a result this operation an be quite expensive if used incorrectly.
- Specified by:
getClone
in interface Cloneable
- Overrides:
getClone
in class RandomListSeedingStrategy
- Returns:
- An exact clone of the current object instance.
- See Also:
Object.clone()
updateSeed
protected void updateSeed()
- The seeds are never changed
- Overrides:
updateSeed
in class RandomListSeedingStrategy
updateIndex
protected void updateIndex()
- Update the index that is used to get a seed from the list. This index changes at
a specified interval.
- Overrides:
updateIndex
in class ListSeedingStrategy
setUseCount
public void setUseCount(int useCount)
- This method sets the number of seeds to repeatedly use in the list for the specified interval
- Parameters:
useCount
- The number of seeds to repeatedly use in the list
Copyright © 2009 CIRG. All Rights Reserved.