|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.myra.framework.Trail
public abstract class Trail
This class represents an ant tour in the problem construction graph.
Constructor Summary | |
---|---|
Trail()
Default constructor. |
Method Summary | |
---|---|
abstract void |
add(Vertex<?> vertex)
Adds a node to the trail. |
Trail |
clone()
Creates and returns a copy of this trail instance. |
Cost |
getCost()
Returns the trail cost. |
int |
getIteration()
Returns the iteration number that created this trail. |
abstract Vertex<?> |
getLast()
Returns the last added (visited) vertex. |
int |
getSize()
Returns the trail size (number of vertices). |
abstract java.util.Collection<Vertex<?>> |
getVertices()
Returns the vertices of this trail. |
abstract boolean |
isEmpty()
Checks if this trail is empty. |
abstract void |
remove(Vertex<?> vertex)
Removes the specified vertex. |
void |
setCost(Cost cost)
Sets the trail cost. |
void |
setIteration(int iteration)
Sets the iteration that created this trail. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Trail()
Method Detail |
---|
public abstract void add(Vertex<?> vertex)
vertex
- the vertex to be added.public abstract void remove(Vertex<?> vertex)
vertex
- the vertex to remove.public abstract boolean isEmpty()
true
if this trail hasn't vertices associated;
false
otherwise.public Cost getCost()
public void setCost(Cost cost)
cost
- the cost to set.public int getIteration()
public void setIteration(int iteration)
iteration
- the iteration number to set.public abstract java.util.Collection<Vertex<?>> getVertices()
public abstract Vertex<?> getLast()
public int getSize()
public Trail clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |