net.sourceforge.cilib.games.game.predatorprey.init
Class MinMaxDistanceInitializationStrategy

java.lang.Object
  extended by net.sourceforge.cilib.games.game.predatorprey.init.PredPreyPositionInitializationStrategy
      extended by net.sourceforge.cilib.games.game.predatorprey.init.MinMaxDistanceInitializationStrategy
All Implemented Interfaces:
Serializable, Cloneable

public class MinMaxDistanceInitializationStrategy
extends PredPreyPositionInitializationStrategy

Author:
leo This is a PredPreyPositionInitializationStrategy that initializes the agents with a minimum and maximum distance constraint.
See Also:
Serialized Form

Constructor Summary
MinMaxDistanceInitializationStrategy()
           
MinMaxDistanceInitializationStrategy(MinMaxDistanceInitializationStrategy other)
          Copy Constructor
 
Method Summary
 MinMaxDistanceInitializationStrategy getClone()
          Create a cloned copy of the current object and return it.
 int getMaxDistance()
           
 int getMinDistance()
           
 void initializePP(PredatorPreyGame game)
          Initialize the positions of the predator and prey agents
 void setMaxDistance(int maxDistance)
           
 void setMinDistance(int minDistance)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MinMaxDistanceInitializationStrategy

public MinMaxDistanceInitializationStrategy()

MinMaxDistanceInitializationStrategy

public MinMaxDistanceInitializationStrategy(MinMaxDistanceInitializationStrategy other)
Copy Constructor

Parameters:
other -
Method Detail

getClone

public MinMaxDistanceInitializationStrategy 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
Specified by:
getClone in class PredPreyPositionInitializationStrategy
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

initializePP

public void initializePP(PredatorPreyGame game)
Initialize the positions of the predator and prey agents

Specified by:
initializePP in class PredPreyPositionInitializationStrategy
Parameters:
game - The game object to initialise

getMaxDistance

public int getMaxDistance()

setMaxDistance

public void setMaxDistance(int maxDistance)

getMinDistance

public int getMinDistance()

setMinDistance

public void setMinDistance(int minDistance)


Copyright © 2009 CIRG. All Rights Reserved.