freenetant
Class FreenetAnt
java.lang.Object
|
+--freenetant.FreenetAnt
- All Implemented Interfaces:
- Ant, java.io.Serializable
- public class FreenetAnt
- extends java.lang.Object
- implements Ant, java.io.Serializable
- Version:
- $Revision$
- Author:
- Andrea Piergallini, Luca Vagnozzi
- See Also:
- Serialized Form
Constructor Summary |
FreenetAnt(RequestId rid,
java.lang.String query,
int copyProb,
int fakeProb,
NestId requestor)
Instantiate a new FreeAnt by setting the query to be satisfied and the
hash value to be searched. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FreenetAnt
public FreenetAnt(RequestId rid,
java.lang.String query,
int copyProb,
int fakeProb,
NestId requestor)
- Instantiate a new FreeAnt by setting the query to be satisfied and the
hash value to be searched.
init
public void init(AntView view)
- Configuration parameters for this ant.
- Specified by:
init
in interface Ant
getSpecies
public java.lang.String getSpecies()
- Description copied from interface:
Ant
- Returns the identifier of the "species" of this ant.
Different ant species may have access to different
pheromone information in nests.
- Specified by:
getSpecies
in interface Ant
run
public void run(AntView view)
- This method encapsulate the computation performed by the
ant.
- Specified by:
run
in interface Ant
- Parameters:
view
- reference to the AntView object which
constitutes the controlled environment of the ant
goForward
public void goForward(AntView view)
- Algorithm used when moving forward.
doBacktracking
public void doBacktracking(AntView view)
goBackward
public void goBackward(AntView view)
- Algorithm used when the ant go backward.
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
readExternal
public void readExternal(java.io.ObjectInput in)