public abstract class AbstractPath extends java.lang.Object implements Path
Constructor and Description |
---|
AbstractPath() |
Modifier and Type | Method and Description |
---|---|
abstract AbstractPath |
clone() |
boolean |
equals(java.lang.Object obj) |
boolean |
equals(Path p) |
void |
extend(int v) |
int |
getLength()
Computes the length of this path.
|
it.unimi.dsi.fastutil.ints.IntSet |
getVertexSet()
Computes the vertices in this path as a set.
|
int |
hashCode() |
boolean |
hasLoop() |
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 |
setColor(Grph g,
int color)
Assigns the given color to all vertices in this path, when applied to the
given graph.
|
java.lang.String |
toString() |
it.unimi.dsi.fastutil.ints.IntSet |
toVertexSet() |
java.lang.String |
whyNotApplicable(Grph g) |
finalize, getClass, notify, notifyAll, wait, wait, wait
containsVertex, extend, getDestination, getEdgeHeadingToVertexAt, getNumberOfVertices, getSource, getVertexAt, indexOfVertex, reverse, setSource, toVertexArray
public abstract AbstractPath clone()
public it.unimi.dsi.fastutil.ints.IntSet getVertexSet()
getVertexSet
in interface Path
public it.unimi.dsi.fastutil.ints.IntSet toVertexSet()
toVertexSet
in interface Path
public boolean isElementary()
isElementary
in interface Path
public boolean permitsSameTrip(Path anotherPath)
permitsSameTrip
in interface Path
anotherPath
- public boolean isShortestPath(Grph g, NumericalProperty weights)
isShortestPath
in interface Path
g
- public void setColor(Grph g, int color)
public boolean isCycle()
public boolean isHamiltonian(Grph g)
isHamiltonian
in interface Path
g
- the graphpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean equals(Path p)
public int getLength()
Path
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String whyNotApplicable(Grph g)
whyNotApplicable
in interface Path
public boolean isApplicable(Grph g)
isApplicable
in interface Path
g
-