pub fn from_pattern_graph<Extra, V>(
graph: Rc<PatternGraph<Extra, V>>,
) -> GraphQuery<V>Expand description
Wraps a PatternGraph in a GraphQuery<V>.
All nine GraphQuery fields are implemented against the PatternGraph maps.
§Complexity
query_nodes/query_relationships: O(n) / O(r) to collect valuesquery_incident_rels: O(r) scan of all relationshipsquery_source/query_target: O(1) element accessquery_degree: O(r) scanquery_node_by_id/query_relationship_by_id: O(1) average HashMap lookupquery_containers: O(r + w + a) scan of relationships, walks, annotations
§Deferred
TODO: from_graph_lens — deferred until GraphLens type is available in pattern-rs.
Rc and Arc variants are intentionally separate (no macro): only one is compiled per build, trait bounds stay clear, and we avoid fragile abstraction over pointer types.