net.sourceforge.cilib.games.random
Class RandomListSeedingStrategy

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
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
FixedListSeedingStrategy

public class RandomListSeedingStrategy
extends ListSeedingStrategy

Author:
leo This is a seeding strategy that does the following. At a specified interval a specified number of seeds are generated. These seeds are stored in a list. Every time the seedGenerator method is called a new seed from this list is used. Therefore this class generates a fixed number of seeds and alternates between them. And this list of seeds can be re-generated at fixed intervals
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
RandomListSeedingStrategy()
           
RandomListSeedingStrategy(RandomListSeedingStrategy other)
           
 
Method Summary
 GameSeedingStrategy getClone()
          Create a cloned copy of the current object and return it.
 void randomizeSeeds(int size)
          Generate a list of seeds with the specified length
 void seedGenerator()
          Get a seed value and seed the generator.
 void setIterationModulus(int iterationModulus)
          set the iteration at which the seeds will be regenerated.
protected  void updateSeed()
          Check if the seed list needs to be randomised.
 
Methods inherited from class net.sourceforge.cilib.games.random.ListSeedingStrategy
setSeed, updateIndex
 
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

RandomListSeedingStrategy

public RandomListSeedingStrategy()

RandomListSeedingStrategy

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

getClone

public GameSeedingStrategy 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 ListSeedingStrategy
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

updateSeed

protected void updateSeed()
Check if the seed list needs to be randomised. If so, generate a new list of seeds


seedGenerator

public void seedGenerator()
Get a seed value and seed the generator.

Overrides:
seedGenerator in class ListSeedingStrategy

randomizeSeeds

public void randomizeSeeds(int size)
Generate a list of seeds with the specified length

Parameters:
size -

setIterationModulus

public void setIterationModulus(int iterationModulus)
set the iteration at which the seeds will be regenerated.

Parameters:
iterationModulus -


Copyright © 2009 CIRG. All Rights Reserved.