public interface Path
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
boolean |
containsVertex(int someVertex) |
void |
extend(int v) |
void |
extend(int throughEdge,
int v) |
int |
getDestination()
The last vertex in the path
|
int |
getEdgeHeadingToVertexAt(int i) |
int |
getLength()
Computes the length of this path.
|
int |
getNumberOfVertices() |
int |
getSource()
The first vertex in the path
|
int |
getVertexAt(int i) |
it.unimi.dsi.fastutil.ints.IntSet |
getVertexSet()
Deprecated.
|
boolean |
hasLoop() |
int |
indexOfVertex(int successor) |
boolean |
isApplicable(Grph g)
Checks whether this path is applicable to the given graph.
|
boolean |
isCycle()
Checks whether this path is a cycle or not.
|
boolean |
isElementary() |
boolean |
isHamiltonian(Grph g)
Checks whether this path is hamiltonian on the given graph.
|
boolean |
isShortestPath(Grph g,
NumericalProperty weights)
Checks whether this path is a shortest path in the given graph.
|
boolean |
permitsSameTrip(Path anotherPath)
Checks whether the given path has the same source and destination has
this path.
|
void |
reverse() |
void |
setColor(Grph g,
int color)
Assigns the given color to all vertices in this path, when applied to the
given graph.
|
void |
setSource(int v) |
int[] |
toVertexArray()
Computes the sequence of vertices as an array of ints.
|
it.unimi.dsi.fastutil.ints.IntSet |
toVertexSet() |
java.lang.String |
whyNotApplicable(Grph g) |
int getSource()
void setSource(int v)
int getDestination()
int getNumberOfVertices()
int getVertexAt(int i)
int indexOfVertex(int successor)
boolean containsVertex(int someVertex)
int getEdgeHeadingToVertexAt(int i)
void extend(int v)
void extend(int throughEdge, int v)
int getLength()
boolean isElementary()
boolean permitsSameTrip(Path anotherPath)
anotherPath
- boolean isApplicable(Grph g)
g
- boolean isShortestPath(Grph g, NumericalProperty weights)
g
- void setColor(Grph g, int color)
g
- color
- boolean isCycle()
boolean isHamiltonian(Grph g)
g
- the graphboolean hasLoop()
java.lang.Object clone()
void reverse()
int[] toVertexArray()
@Deprecated it.unimi.dsi.fastutil.ints.IntSet getVertexSet()
it.unimi.dsi.fastutil.ints.IntSet toVertexSet()
java.lang.String whyNotApplicable(Grph g)