public abstract class GraphAlgoFactory extends Object
Constructor and Description |
---|
GraphAlgoFactory() |
Modifier and Type | Method and Description |
---|---|
static PathFinder<org.neo4j.graphdb.Path> |
allPaths(org.neo4j.graphdb.PathExpander expander,
int maxDepth)
Returns an algorithm which can find all available paths between two
nodes.
|
static PathFinder<org.neo4j.graphdb.Path> |
allPaths(org.neo4j.graphdb.RelationshipExpander expander,
int maxDepth)
Returns an algorithm which can find all available paths between two
nodes.
|
static PathFinder<org.neo4j.graphdb.Path> |
allSimplePaths(org.neo4j.graphdb.PathExpander expander,
int maxDepth)
Returns an algorithm which can find all simple paths between two
nodes.
|
static PathFinder<org.neo4j.graphdb.Path> |
allSimplePaths(org.neo4j.graphdb.RelationshipExpander expander,
int maxDepth)
Returns an algorithm which can find all simple paths between two
nodes.
|
static PathFinder<WeightedPath> |
aStar(org.neo4j.graphdb.PathExpander expander,
CostEvaluator<Double> lengthEvaluator,
EstimateEvaluator<Double> estimateEvaluator)
Returns an
PathFinder which uses the A* algorithm to find the
cheapest path between two nodes. |
static PathFinder<WeightedPath> |
aStar(org.neo4j.graphdb.RelationshipExpander expander,
CostEvaluator<Double> lengthEvaluator,
EstimateEvaluator<Double> estimateEvaluator)
Returns a
PathFinder which uses the A* algorithm to find the
cheapest path between two nodes. |
static PathFinder<WeightedPath> |
dijkstra(org.neo4j.graphdb.PathExpander expander,
CostEvaluator<Double> costEvaluator)
Returns a
PathFinder which uses the Dijkstra algorithm to find
the cheapest path between two nodes. |
static PathFinder<WeightedPath> |
dijkstra(org.neo4j.graphdb.PathExpander expander,
org.neo4j.graphdb.traversal.InitialBranchState stateFactory,
CostEvaluator<Double> costEvaluator)
|
static PathFinder<WeightedPath> |
dijkstra(org.neo4j.graphdb.PathExpander expander,
org.neo4j.graphdb.traversal.InitialBranchState stateFactory,
String relationshipPropertyRepresentingCost)
|
static PathFinder<WeightedPath> |
dijkstra(org.neo4j.graphdb.PathExpander expander,
org.neo4j.graphdb.traversal.InitialStateFactory stateFactory,
CostEvaluator<Double> costEvaluator)
|
static PathFinder<WeightedPath> |
dijkstra(org.neo4j.graphdb.PathExpander expander,
org.neo4j.graphdb.traversal.InitialStateFactory stateFactory,
String relationshipPropertyRepresentingCost)
|
static PathFinder<WeightedPath> |
dijkstra(org.neo4j.graphdb.PathExpander expander,
String relationshipPropertyRepresentingCost)
|
static PathFinder<WeightedPath> |
dijkstra(org.neo4j.graphdb.RelationshipExpander expander,
CostEvaluator<Double> costEvaluator)
Returns a
PathFinder which uses the Dijkstra algorithm to find
the cheapest path between two nodes. |
static PathFinder<WeightedPath> |
dijkstra(org.neo4j.graphdb.RelationshipExpander expander,
String relationshipPropertyRepresentingCost)
|
static PathFinder<org.neo4j.graphdb.Path> |
pathsWithLength(org.neo4j.graphdb.PathExpander expander,
int length)
Returns an algorithm which can find simple all paths of a certain length
between two nodes.
|
static PathFinder<org.neo4j.graphdb.Path> |
pathsWithLength(org.neo4j.graphdb.RelationshipExpander expander,
int length)
Returns an algorithm which can find simple all paths of a certain length
between two nodes.
|
static PathFinder<org.neo4j.graphdb.Path> |
shortestPath(org.neo4j.graphdb.PathExpander expander,
int maxDepth)
Returns an algorithm which can find all shortest paths (that is paths
with as short
Path.length() as possible) between two nodes. |
static PathFinder<org.neo4j.graphdb.Path> |
shortestPath(org.neo4j.graphdb.PathExpander expander,
int maxDepth,
int maxHitCount)
Returns an algorithm which can find all shortest paths (that is paths
with as short
Path.length() as possible) between two nodes. |
static PathFinder<org.neo4j.graphdb.Path> |
shortestPath(org.neo4j.graphdb.RelationshipExpander expander,
int maxDepth)
Returns an algorithm which can find all shortest paths (that is paths
with as short
Path.length() as possible) between two nodes. |
static PathFinder<org.neo4j.graphdb.Path> |
shortestPath(org.neo4j.graphdb.RelationshipExpander expander,
int maxDepth,
int maxHitCount)
Returns an algorithm which can find all shortest paths (that is paths
with as short
Path.length() as possible) between two nodes. |
public static PathFinder<org.neo4j.graphdb.Path> allPaths(org.neo4j.graphdb.RelationshipExpander expander, int maxDepth)
expander
- the RelationshipExpander
to use for expanding
Relationship
s for each Node
.maxDepth
- the max Path.length()
returned paths are
allowed to have.public static PathFinder<org.neo4j.graphdb.Path> allPaths(org.neo4j.graphdb.PathExpander expander, int maxDepth)
expander
- the PathExpander
to use for expanding
Relationship
s for each Path
.maxDepth
- the max Path.length()
returned paths are
allowed to have.public static PathFinder<org.neo4j.graphdb.Path> allSimplePaths(org.neo4j.graphdb.RelationshipExpander expander, int maxDepth)
expander
- the RelationshipExpander
to use for expanding
Relationship
s for each Node
.maxDepth
- the max Path.length()
returned paths are
allowed to have.public static PathFinder<org.neo4j.graphdb.Path> allSimplePaths(org.neo4j.graphdb.PathExpander expander, int maxDepth)
expander
- the PathExpander
to use for expanding
Relationship
s for each Path
.maxDepth
- the max Path.length()
returned paths are
allowed to have.public static PathFinder<org.neo4j.graphdb.Path> shortestPath(org.neo4j.graphdb.RelationshipExpander expander, int maxDepth)
Path.length()
as possible) between two nodes. These
returned paths cannot contain loops (i.e. a node cannot occur more than
once in any returned path).expander
- the RelationshipExpander
to use for expanding
Relationship
s for each Node
.maxDepth
- the max Path.length()
returned paths are allowed
to have.public static PathFinder<org.neo4j.graphdb.Path> shortestPath(org.neo4j.graphdb.PathExpander expander, int maxDepth)
Path.length()
as possible) between two nodes. These
returned paths cannot contain loops (i.e. a node cannot occur more than
once in any returned path).expander
- the PathExpander
to use for expanding
Relationship
s for each Path
.maxDepth
- the max Path.length()
returned paths are allowed
to have.public static PathFinder<org.neo4j.graphdb.Path> shortestPath(org.neo4j.graphdb.RelationshipExpander expander, int maxDepth, int maxHitCount)
Path.length()
as possible) between two nodes. These
returned paths cannot contain loops (i.e. a node cannot occur more than
once in any returned path).expander
- the RelationshipExpander
to use for expanding
Relationship
s for each Node
.maxDepth
- the max Path.length()
returned paths are allowed
to have.maxHitCount
- the maximum number of Path
s to return.
If this number of found paths are encountered the traversal will stop.public static PathFinder<org.neo4j.graphdb.Path> shortestPath(org.neo4j.graphdb.PathExpander expander, int maxDepth, int maxHitCount)
Path.length()
as possible) between two nodes. These
returned paths cannot contain loops (i.e. a node cannot occur more than
once in any returned path).expander
- the PathExpander
to use for expanding
Relationship
s for each Path
.maxDepth
- the max Path.length()
returned paths are allowed
to have.maxHitCount
- the maximum number of Path
s to return.
If this number of found paths are encountered the traversal will stop.public static PathFinder<org.neo4j.graphdb.Path> pathsWithLength(org.neo4j.graphdb.RelationshipExpander expander, int length)
expander
- the RelationshipExpander
to use for expanding
Relationship
s for each Node
.length
- the Path.length()
returned paths will have, if any
paths were found.public static PathFinder<org.neo4j.graphdb.Path> pathsWithLength(org.neo4j.graphdb.PathExpander expander, int length)
expander
- the PathExpander
to use for expanding
Relationship
s for each Node
.length
- the Path.length()
returned paths will have, if any
paths were found.public static PathFinder<WeightedPath> aStar(org.neo4j.graphdb.RelationshipExpander expander, CostEvaluator<Double> lengthEvaluator, EstimateEvaluator<Double> estimateEvaluator)
PathFinder
which uses the A* algorithm to find the
cheapest path between two nodes. The definition of "cheap" is the lowest
possible cost to get from the start node to the end node, where the cost
is returned from lengthEvaluator
and estimateEvaluator
.
These returned paths cannot contain loops (i.e. a node cannot occur more
than once in any returned path).
See http://en.wikipedia.org/wiki/A*_search_algorithm for more
information.expander
- the RelationshipExpander
to use for expanding
Relationship
s for each Node
.lengthEvaluator
- evaluator that can return the cost represented
by each relationship the algorithm traverses.estimateEvaluator
- evaluator that returns an (optimistic)
estimation of the cost to get from the current node (in the traversal)
to the end node.public static PathFinder<WeightedPath> aStar(org.neo4j.graphdb.PathExpander expander, CostEvaluator<Double> lengthEvaluator, EstimateEvaluator<Double> estimateEvaluator)
PathFinder
which uses the A* algorithm to find the
cheapest path between two nodes. The definition of "cheap" is the lowest
possible cost to get from the start node to the end node, where the cost
is returned from lengthEvaluator
and estimateEvaluator
.
These returned paths cannot contain loops (i.e. a node cannot occur more
than once in any returned path).
See http://en.wikipedia.org/wiki/A*_search_algorithm for more
information.expander
- the PathExpander
to use for expanding
Relationship
s for each Path
.lengthEvaluator
- evaluator that can return the cost represented
by each relationship the algorithm traverses.estimateEvaluator
- evaluator that returns an (optimistic)
estimation of the cost to get from the current node (in the traversal)
to the end node.public static PathFinder<WeightedPath> dijkstra(org.neo4j.graphdb.RelationshipExpander expander, CostEvaluator<Double> costEvaluator)
PathFinder
which uses the Dijkstra algorithm to find
the cheapest path between two nodes. The definition of "cheap" is the
lowest possible cost to get from the start node to the end node, where
the cost is returned from costEvaluator
. These returned paths
cannot contain loops (i.e. a node cannot occur more than once in any
returned path).
See http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm for more
information.expander
- the RelationshipExpander
to use for expanding
Relationship
s for each Node
.costEvaluator
- evaluator that can return the cost represented
by each relationship the algorithm traverses.public static PathFinder<WeightedPath> dijkstra(org.neo4j.graphdb.PathExpander expander, CostEvaluator<Double> costEvaluator)
PathFinder
which uses the Dijkstra algorithm to find
the cheapest path between two nodes. The definition of "cheap" is the
lowest possible cost to get from the start node to the end node, where
the cost is returned from costEvaluator
. These returned paths
cannot contain loops (i.e. a node cannot occur more than once in any
returned path).
See http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm for more
information.expander
- the PathExpander
to use for expanding
Relationship
s for each Path
.costEvaluator
- evaluator that can return the cost represented
by each relationship the algorithm traverses.public static PathFinder<WeightedPath> dijkstra(org.neo4j.graphdb.RelationshipExpander expander, String relationshipPropertyRepresentingCost)
dijkstra(RelationshipExpander, CostEvaluator)
.
Uses a cost evaluator which uses the supplied property key to
represent the cost (values of type double).expander
- the RelationshipExpander
to use for expanding
Relationship
s for each Node
.relationshipPropertyRepresentingCost
- the property to represent cost
on each relationship the algorithm traverses.public static PathFinder<WeightedPath> dijkstra(org.neo4j.graphdb.PathExpander expander, String relationshipPropertyRepresentingCost)
dijkstra(RelationshipExpander, CostEvaluator)
.
Uses a cost evaluator which uses the supplied property key to
represent the cost (values of type double).expander
- the PathExpander
to use for expanding
Relationship
s for each Path
.relationshipPropertyRepresentingCost
- the property to represent cost
on each relationship the algorithm traverses.public static PathFinder<WeightedPath> dijkstra(org.neo4j.graphdb.PathExpander expander, org.neo4j.graphdb.traversal.InitialStateFactory stateFactory, CostEvaluator<Double> costEvaluator)
dijkstra(RelationshipExpander, CostEvaluator)
.
Uses a cost evaluator which uses the supplied property key to
represent the cost (values of type double).expander
- the PathExpander
to use for expanding
Relationship
s for each Path
.stateFactory
- initial state for the traversal branches.costEvaluator
- the cost evaluator for each relationship the algorithm traverses.public static PathFinder<WeightedPath> dijkstra(org.neo4j.graphdb.PathExpander expander, org.neo4j.graphdb.traversal.InitialBranchState stateFactory, CostEvaluator<Double> costEvaluator)
dijkstra(RelationshipExpander, CostEvaluator)
.
Uses a cost evaluator which uses the supplied property key to
represent the cost (values of type double).expander
- the PathExpander
to use for expanding
Relationship
s for each Path
.stateFactory
- initial state for the traversal branches.costEvaluator
- the cost evaluator for each relationship the algorithm traverses.public static PathFinder<WeightedPath> dijkstra(org.neo4j.graphdb.PathExpander expander, org.neo4j.graphdb.traversal.InitialStateFactory stateFactory, String relationshipPropertyRepresentingCost)
dijkstra(RelationshipExpander, CostEvaluator)
.
Uses a cost evaluator which uses the supplied property key to
represent the cost (values of type double).expander
- the PathExpander
to use for expanding
Relationship
s for each Path
.stateFactory
- initial state for the traversal branches.relationshipPropertyRepresentingCost
- the property to represent cost
on each relationship the algorithm traverses.public static PathFinder<WeightedPath> dijkstra(org.neo4j.graphdb.PathExpander expander, org.neo4j.graphdb.traversal.InitialBranchState stateFactory, String relationshipPropertyRepresentingCost)
dijkstra(RelationshipExpander, CostEvaluator)
.
Uses a cost evaluator which uses the supplied property key to
represent the cost (values of type double).expander
- the PathExpander
to use for expanding
Relationship
s for each Path
.stateFactory
- initial state for the traversal branches.relationshipPropertyRepresentingCost
- the property to represent cost
on each relationship the algorithm traverses.Copyright © 2002–2015 The Neo4j Graph Database Project. All rights reserved.