| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_WEIGHT_ATTRIBUTE
Default weight attribute
|
| Constructor and Description |
|---|
LongestPath() |
| Modifier and Type | Method and Description |
|---|---|
void |
compute()
Run the algorithm.
|
java.lang.String |
defaultResult() |
org.graphstream.graph.Path |
getLongestPath()
gets longest path
|
java.util.List<org.graphstream.graph.Node> |
getLongestPathList()
gets sorted list of the longest path
|
java.lang.Double |
getLongestPathValue()
get value of longest path
if unweighted value = hops
|
java.lang.String |
getWeightAttribute() |
void |
init(org.graphstream.graph.Graph theGraph)
Initialization of the algorithm.
|
void |
setWeightAttribute(java.lang.String weightAttribute) |
public static final java.lang.String DEFAULT_WEIGHT_ATTRIBUTE
public void init(org.graphstream.graph.Graph theGraph)
AlgorithmAlgorithm.compute() method to initialize or reset the algorithm according
to the new given graph.public void compute()
AlgorithmAlgorithm.init(Graph) method has to be called
before computing.compute in interface AlgorithmAlgorithm.init(Graph)public java.util.List<org.graphstream.graph.Node> getLongestPathList()
public org.graphstream.graph.Path getLongestPath()
public java.lang.String defaultResult()
public java.lang.Double getLongestPathValue()
public java.lang.String getWeightAttribute()
public void setWeightAttribute(java.lang.String weightAttribute)