|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.myra.framework.Graph.Element
net.sf.myra.framework.Vertex<V>
public class Vertex<V extends Info>
This class represents a vertex of the problem construction graph.
Constructor Summary | |
---|---|
Vertex(java.lang.String label)
Default constructor. |
Method Summary | |
---|---|
Vertex<V> |
clone()
Creates and returns a copy of this weighted component instance. |
int |
compareTo(Vertex<?> o)
|
boolean |
equals(java.lang.Object v)
|
boolean |
equals(Vertex<?> v)
Compares the specified vertex with this vertex for equality. |
V |
getInfo()
Returns the vertex info object. |
java.lang.String |
getLabel()
Returns the vertex label. |
int |
hashCode()
|
void |
setInfo(V v)
Sets the vertex info. |
void |
setLabel(java.lang.String label)
Sets the vertex label. |
java.lang.String |
toString()
|
Methods inherited from class net.sf.myra.framework.Graph.Element |
---|
getHeuristicValue, getHeuristicValue, getPheromone, getPheromone, levels, setHeuristicValue, setHeuristicValue, setPheromone, setPheromone |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Vertex(java.lang.String label)
label
- the vertex label.Method Detail |
---|
public java.lang.String getLabel()
public void setLabel(java.lang.String label)
label
- the label to set.public boolean equals(java.lang.Object v)
equals
in class java.lang.Object
public boolean equals(Vertex<?> v)
true
if the two instances have the same label.
v
- the vertex to be compared for equality with this vertex.
true
if the specified vertex is equal to this
vertex; false
otherwise.public V getInfo()
public void setInfo(V v)
v
- the info object.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class Graph.Element
public int compareTo(Vertex<?> o)
compareTo
in interface java.lang.Comparable<Vertex<?>>
public Vertex<V> clone()
Graph.Element
clone
in class Graph.Element
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |