T
- public class Edge<T> extends Object
Constructor and Description |
---|
Edge(Vertex<T> from,
Vertex<T> to)
Create a zero cost edge between from and to
|
Edge(Vertex<T> from,
Vertex<T> to,
int cost)
Create an edge between from and to with the given cost.
|
Modifier and Type | Method and Description |
---|---|
void |
clearMark()
Clear the edge mark flag
|
int |
getCost()
Get the cost of the edge
|
Vertex<T> |
getFrom()
Get the starting vertex
|
Vertex<T> |
getTo()
Get the ending vertex
|
boolean |
isMarked()
Get the edge mark flag
|
void |
mark()
Set the mark flag of the edge
|
String |
toString()
String rep of edge
|
public Edge(Vertex<T> from, Vertex<T> to)
from
- the starting vertexto
- the ending vertexCopyright © 2018 JBoss by Red Hat. All rights reserved.