|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ants.freeant.GnutantPheromone
Gnutant Pheromone is "the routing table" of the Gnutant species. Ants may only add knowledge about new keywords, and the nest where documents relating to that keyword may be found. The underlying data structure will take care of limiting the resource (memory) usage, by implementing an LRU policy. Ants may also obtain a list of nests that contain more information about a given keyword or closely matching keywords.
Field Summary | |
static String |
NAME
Identifier used in the configuration files |
static String |
PAR_CAPACITY
String name of the parameter used to determine |
Constructor Summary | |
GnutantPheromone(Factory factory,
String name)
Creates a new GnutantPheromone instance. |
Method Summary | |
void |
addKeyhash(HashedKeyword keyhash,
NestId nestid)
|
void |
init(AntView view,
float explorationProbability,
int trailAttempts,
double trailDev,
int explorationAttempts)
|
boolean |
moveToNextRandomNest(AntView view)
The ant performs a random step, either because the ant wants to explore, or because the ants failed to move to the selected nests. |
boolean |
moveToNextTrailNest(AntView view,
HashedKeyword keyhash)
|
String |
toString()
Returns a string representation of the GnutantPheromone . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String NAME
public static final String PAR_CAPACITY
Constructor Detail |
public GnutantPheromone(Factory factory, String name)
GnutantPheromone
instance.
factory
- the factory to be used to read configuration arguments
and to create other configurable objectsname
- the name that is associated to this instance in the
configuration fileMethod Detail |
public void init(AntView view, float explorationProbability, int trailAttempts, double trailDev, int explorationAttempts)
public void addKeyhash(HashedKeyword keyhash, NestId nestid)
public boolean moveToNextTrailNest(AntView view, HashedKeyword keyhash)
public boolean moveToNextRandomNest(AntView view)
public String toString()
GnutantPheromone
.
toString
in class Object
String
representation of the GnutantPheromone
object. A multiline string will be returned.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |