|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.neo4j.graphalgo.impl.shortestpath.Util
public class Util
This is a holder for some utility functions regarding paths, such as constructing them from sets of predecessors or counting them. These functions are lifted out here because they can be used by algorithms for too different problems.
| Nested Class Summary | |
|---|---|
static class |
Util.PathCounter
This can be used for counting the number of paths from the start node (implicit from the predecessors) and some target nodes. |
| Constructor Summary | |
|---|---|
Util()
|
|
| Method Summary | |
|---|---|
static List<List<PropertyContainer>> |
constructAllPathsToNode(Node node,
Map<Node,List<Relationship>> predecessors,
boolean includeNode,
boolean backwards)
Constructs all paths to a given node, for a given set of predecessors |
protected static List<LinkedList<PropertyContainer>> |
constructAllPathsToNodeAsLinkedLists(Node node,
Map<Node,List<Relationship>> predecessors,
boolean includeNode,
boolean backwards)
Same as constructAllPathsToNode, but different return type |
protected static List<LinkedList<Node>> |
constructAllPathsToNodeAsNodeLinkedLists(Node node,
Map<Node,List<Relationship>> predecessors,
boolean includeNode,
boolean backwards)
Same as constructAllPathsToNodeAsNodes, but different return type |
static List<List<Node>> |
constructAllPathsToNodeAsNodes(Node node,
Map<Node,List<Relationship>> predecessors,
boolean includeNode,
boolean backwards)
Constructs all paths to a given node, for a given set of predecessors |
protected static List<LinkedList<Relationship>> |
constructAllPathsToNodeAsRelationshipLinkedLists(Node node,
Map<Node,List<Relationship>> predecessors,
boolean backwards)
Same as constructAllPathsToNodeAsRelationships, but different return type |
static List<List<Relationship>> |
constructAllPathsToNodeAsRelationships(Node node,
Map<Node,List<Relationship>> predecessors,
boolean backwards)
Constructs all paths to a given node, for a given set of predecessors. |
static List<PropertyContainer> |
constructSinglePathToNode(Node node,
Map<Node,List<Relationship>> predecessors,
boolean includeNode,
boolean backwards)
Constructs a path to a given node, for a given set of predecessors. |
static List<Node> |
constructSinglePathToNodeAsNodes(Node node,
Map<Node,List<Relationship>> predecessors,
boolean includeNode,
boolean backwards)
Constructs a path to a given node, for a given set of predecessors |
static List<Relationship> |
constructSinglePathToNodeAsRelationships(Node node,
Map<Node,List<Relationship>> predecessors,
boolean backwards)
Constructs a path to a given node, for a given set of predecessors |
static Map<Node,List<Relationship>> |
reversedPredecessors(Map<Node,List<Relationship>> predecessors)
This can be used to generate the inverse of a structure with predecessors, i.e. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Util()
| Method Detail |
|---|
public static List<Node> constructSinglePathToNodeAsNodes(Node node,
Map<Node,List<Relationship>> predecessors,
boolean includeNode,
boolean backwards)
node - The start nodepredecessors - The predecessors setincludeNode - Boolean which determines if the start node should be included
in the pathsbackwards - Boolean, if true the order of the nodes in the paths will be
reversed
public static List<Relationship> constructSinglePathToNodeAsRelationships(Node node,
Map<Node,List<Relationship>> predecessors,
boolean backwards)
node - The start nodepredecessors - The predecessors setbackwards - Boolean, if true the order of the nodes in the paths will be
reversed
public static List<PropertyContainer> constructSinglePathToNode(Node node,
Map<Node,List<Relationship>> predecessors,
boolean includeNode,
boolean backwards)
node - The start nodepredecessors - The predecessors setincludeNode - Boolean which determines if the start node should be included
in the pathsbackwards - Boolean, if true the order of the nodes in the paths will be
reversed
public static List<List<Node>> constructAllPathsToNodeAsNodes(Node node,
Map<Node,List<Relationship>> predecessors,
boolean includeNode,
boolean backwards)
node - The start nodepredecessors - The predecessors setincludeNode - Boolean which determines if the start node should be included
in the pathsbackwards - Boolean, if true the order of the nodes in the paths will be
reversed
protected static List<LinkedList<Node>> constructAllPathsToNodeAsNodeLinkedLists(Node node,
Map<Node,List<Relationship>> predecessors,
boolean includeNode,
boolean backwards)
public static List<List<PropertyContainer>> constructAllPathsToNode(Node node,
Map<Node,List<Relationship>> predecessors,
boolean includeNode,
boolean backwards)
node - The start nodepredecessors - The predecessors setincludeNode - Boolean which determines if the start node should be included
in the pathsbackwards - Boolean, if true the order of the nodes in the paths will be
reversed
protected static List<LinkedList<PropertyContainer>> constructAllPathsToNodeAsLinkedLists(Node node,
Map<Node,List<Relationship>> predecessors,
boolean includeNode,
boolean backwards)
public static List<List<Relationship>> constructAllPathsToNodeAsRelationships(Node node,
Map<Node,List<Relationship>> predecessors,
boolean backwards)
node - The start nodepredecessors - The predecessors setbackwards - Boolean, if true the order of the nodes in the paths will be
reversed
protected static List<LinkedList<Relationship>> constructAllPathsToNodeAsRelationshipLinkedLists(Node node,
Map<Node,List<Relationship>> predecessors,
boolean backwards)
public static Map<Node,List<Relationship>> reversedPredecessors(Map<Node,List<Relationship>> predecessors)
predecessors -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||