Package org.onlab.graph
Interface MutablePath<V extends Vertex,E extends Edge<V>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
appendEdge(E edge)
Appends a new edge at the end of the this path.void
insertEdge(E edge)
Inserts a new edge at the beginning of this path.void
removeEdge(E edge)
Removes the specified edge.void
setCost(Weight cost)
Sets the total path cost as a weight object.Path<V,E>
toImmutable()
Returns an immutable copy of this path.
-
-
-
Method Detail
-
insertEdge
void insertEdge(E edge)
Inserts a new edge at the beginning of this path. The edge must be adjacent to the prior start of the path.- Parameters:
edge
- edge to be inserted
-
appendEdge
void appendEdge(E edge)
Appends a new edge at the end of the this path. The edge must be adjacent to the prior end of the path.- Parameters:
edge
- edge to be inserted
-
removeEdge
void removeEdge(E edge)
Removes the specified edge. This edge must be either at the start or at the end of the path, or it must be a cyclic edge in order not to violate the contiguous path property.- Parameters:
edge
- edge to be removed
-
setCost
void setCost(Weight cost)
Sets the total path cost as a weight object.- Parameters:
cost
- new path cost
-
-