net.sourceforge.cilib.games.random
Class FixedListSeedingStrategy

java.lang.Object
  extended by net.sourceforge.cilib.games.random.GameSeedingStrategy
      extended by net.sourceforge.cilib.games.random.ListSeedingStrategy
          extended by net.sourceforge.cilib.games.random.RandomListSeedingStrategy
              extended by 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

Field Summary
 
Fields inherited from class net.sourceforge.cilib.games.random.ListSeedingStrategy
index, seeds
 
Fields inherited from class net.sourceforge.cilib.games.random.GameSeedingStrategy
currentSeed, generator
 
Constructor Summary
FixedListSeedingStrategy()
           
FixedListSeedingStrategy(FixedListSeedingStrategy other)
           
 
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 net.sourceforge.cilib.games.random.RandomListSeedingStrategy
randomizeSeeds, seedGenerator, setIterationModulus
 
Methods inherited from class net.sourceforge.cilib.games.random.ListSeedingStrategy
setSeed
 
Methods inherited from class net.sourceforge.cilib.games.random.GameSeedingStrategy
getCurrentSeed, getGenerator, setGenerator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedListSeedingStrategy

public FixedListSeedingStrategy()

FixedListSeedingStrategy

public FixedListSeedingStrategy(FixedListSeedingStrategy other)
Parameters:
other -
Method Detail

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.