Jadex 0.96

jadex.examples.hunterprey.creature.hunters.ldahunter.potentialfield
Class JointField

java.lang.Object
  extended by java.util.AbstractMap
      extended by java.util.HashMap
          extended by jadex.examples.hunterprey.creature.hunters.ldahunter.potentialfield.JointField
All Implemented Interfaces:
Serializable, Cloneable, Map

public class JointField
extends HashMap

See Also:
Serialized Form

Field Summary
 double[][] desire
          desire
 FieldModel field
           
 double maxDesire
          maxDesire maximum value in desire
 double minDesire
          minDesire minimum value in desire > 0
 
Constructor Summary
JointField(int h, int w, int range, Evaluator ev)
           
 
Method Summary
 void add(Creature creature)
           
 void add(Food f)
           
 void add(Obstacle o)
           
 void add(WorldObject wo)
           
 void calcDesire()
           
 void eaten(Creature c)
           
 Location getBestLocation()
           
 boolean getNearerLocation(Location loc)
           
 void update(WorldObject[] w, Creature myself)
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

field

public final FieldModel field

desire

public final double[][] desire
desire


maxDesire

public double maxDesire
maxDesire maximum value in desire


minDesire

public double minDesire
minDesire minimum value in desire > 0

Constructor Detail

JointField

public JointField(int h,
                  int w,
                  int range,
                  Evaluator ev)
Parameters:
h -
w -
range -
ev -
Method Detail

add

public void add(Creature creature)
Parameters:
creature -

add

public void add(Food f)
Parameters:
f -

add

public void add(Obstacle o)
Parameters:
o -

add

public void add(WorldObject wo)
Parameters:
wo -

update

public void update(WorldObject[] w,
                   Creature myself)
Parameters:
w - world objects
myself -

eaten

public void eaten(Creature c)
Parameters:
c -

getBestLocation

public Location getBestLocation()
Returns:
the best location

getNearerLocation

public boolean getNearerLocation(Location loc)
Parameters:
loc -
Returns:
true if location changed

calcDesire

public void calcDesire()

Jadex 0.96

Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.