public class Edge extends Object implements Believable
Modifier and Type | Field and Description |
---|---|
static int |
UNSURVEYED_WEIGHT |
Constructor and Description |
---|
Edge(eis.iilang.Parameter param1,
eis.iilang.Parameter param2)
Creates a new edge from
param1 to param2 with unknown
weight (0). |
Edge(String param1,
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 . |
Modifier and Type | Method and Description |
---|---|
Edge |
clone() |
boolean |
equals(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.
|
String |
toString() |
public static final int UNSURVEYED_WEIGHT
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 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()
Copyright © 2013. All Rights Reserved.