1#ifndef SMOLLERGRAPH_QUERY_H_
2#define SMOLLERGRAPH_QUERY_H_
17std::vector<NodeId>
Walk(
const Graph& graph,
NodeId start,
18 std::string_view type,
int hops);
22std::vector<std::vector<NodeId>>
WalkHops(
const Graph& graph,
NodeId start,
23 std::string_view type,
int hops);
44 const std::vector<std::string>& types,
53 const std::vector<std::string>& types,
A graph kept in three files of records, one for nodes, one for relationships and one for their proper...
std::string PathText(const Graph &graph, const Path &path)
A path as Cypher writes it, with the nodes' names, and each relationship's arrow pointing the way it ...
std::vector< NodeId > Walk(const Graph &graph, NodeId start, std::string_view type, int hops)
Returns the nodes exactly hops relationships of type away from start, each once, in the order a bread...
PathSearch CheapestPath(const Graph &graph, NodeId from, NodeId to, const std::vector< std::string > &types, Direction direction, std::string_view key)
Returns a cheapest path from from to to, along relationships of any of types followed in direction: o...
Direction
A node and a property take 64 bytes, and a relationship 24, so a page holds 170 relationships,...
PathSearch ShortestPath(const Graph &graph, NodeId from, NodeId to, const std::vector< std::string > &types, Direction direction)
Returns a shortest path from from to to, along relationships of any of types followed in direction: o...
std::vector< std::vector< NodeId > > WalkHops(const Graph &graph, NodeId start, std::string_view type, int hops)
Returns the nodes each hop of that walk reaches: the start on its own, then the nodes one hop away,...
What a search for a path found: the path, if there is one, and how many nodes the search reached,...
std::optional< Path > path
A path through the graph: its nodes, from its start to its end, and the relationships between them,...
std::vector< NodeId > nodes
std::vector< RelationshipId > relationships