|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfern.analysis.AnalysisBase
fern.analysis.ShortestPath
public class ShortestPath
Computes shortest paths in the network by a bfs. Either the path from some
source species to only one species can be calculated (by using one of the
computePath
methods) or paths to all species (by computePaths
).
A NodeChecker
can optionally be given for each method.
Nested Class Summary | |
---|---|
class |
ShortestPath.Path
Encapsulates a path from one species to another. |
Constructor Summary | |
---|---|
ShortestPath(Network network)
Creates the class with the specified network. |
Method Summary | |
---|---|
ShortestPath.Path |
computePath(NodeChecker checker,
String toSpecies,
String... species)
Compute the shortest paths from some source species to one species by only using parts of the network specified by the NodeChecker checker . |
ShortestPath.Path |
computePath(String toSpecies,
String... species)
Compute the shortest paths from some source species to one species. |
ShortestPath.Path[] |
computePaths(NodeChecker checker,
String... species)
Compute all shortest paths from some source species by only using parts of the network specified by the NodeChecker checker . |
ShortestPath.Path[] |
computePaths(String... species)
Compute all shortest paths from some source species. |
Methods inherited from class fern.analysis.AnalysisBase |
---|
bfs, dfs, search |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShortestPath(Network network)
network
- the network where shortest paths shall be computedMethod Detail |
---|
public ShortestPath.Path[] computePaths(String... species)
species
- the names of the source species
ShortestPath.Path
public ShortestPath.Path[] computePaths(NodeChecker checker, String... species)
NodeChecker
checker
.
species
- the names of the source specieschecker
- a NodeChecker for the search
ShortestPath.Path
public ShortestPath.Path computePath(String toSpecies, String... species)
toSpecies
- the name of the species where the shortest path should be computed tospecies
- the names of the source species
ShortestPath.Path
public ShortestPath.Path computePath(NodeChecker checker, String toSpecies, String... species)
NodeChecker
checker
.
checker
- a NodeChecker for the searchtoSpecies
- the name of the species where the shortest path should be computed tospecies
- the names of the source species
ShortestPath.Path
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |