|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmas.agentsHempelsSofa.data.graph.Edge
public class Edge
An implementation of an undirected edge for our Graph. An edge knows
Field Summary | |
---|---|
static int |
UNSURVEYED_WEIGHT
|
Constructor Summary | |
---|---|
Edge(eis.iilang.Parameter param1,
eis.iilang.Parameter param2)
Creates a new edge from param1 to param2 with unknown
weight (0). |
|
Edge(java.lang.String param1,
java.lang.String param2)
|
|
Edge(Vertex vertex1,
Vertex vertex2)
Creates a new unsurveyed edge from vertex1 to vertex2
with unknown weight (0). |
|
Edge(Vertex vertex1,
Vertex vertex2,
int weight)
Creates a new edge from vertex1 to vertex2 with a
specified weight . |
Method Summary | |
---|---|
Edge |
clone()
|
boolean |
equals(java.lang.Object obj)
|
Vertex[] |
getVertices()
|
int |
getWeight()
|
boolean |
isSurveyed()
|
void |
setUnsurveyed()
|
void |
setVertices(Vertex[] vertices)
|
void |
setWeight(int weight)
|
apltk.interpreter.data.LogicBelief |
toBelief()
generates a belief for this edge. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int UNSURVEYED_WEIGHT
Constructor Detail |
---|
public Edge(Vertex vertex1, Vertex vertex2, int weight)
vertex1
to vertex2
with a
specified weight
. surveyed
says weather the real weight
is known.
vertex1
- The first vertex of the edge.vertex2
- The second vertex of the edge.weight
- The weight of the edge.public Edge(Vertex vertex1, Vertex vertex2)
vertex1
to vertex2
with unknown weight
(0).
vertex1
- The first vertex of the edge.vertex2
- The second vertex of the edge.public Edge(eis.iilang.Parameter param1, eis.iilang.Parameter param2)
param1
to param2
with unknown
weight
(0).
param1
- The identifier for the first vertex.param2
- The identifier for the second vertex.public Edge(java.lang.String param1, java.lang.String param2)
Method Detail |
---|
public final boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public final Edge clone()
clone
in class java.lang.Object
public final java.lang.String toString()
toString
in class java.lang.Object
public apltk.interpreter.data.LogicBelief toBelief()
toBelief
in interface Believable
predicate
- edge,parameter1
- vertex1,parameter2
- vertex2,parameter3
- weight,parameter4
- surveyedpublic void setVertices(Vertex[] vertices)
vertices
- the vertices to setpublic Vertex[] getVertices()
public void setWeight(int weight)
weight
- the weight of the edge.public int getWeight()
public boolean isSurveyed()
true
, if the real weight is known,false
, otherwise.public void setUnsurveyed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |