pub struct RegularPathQuery<'a> {
pub path: RegularPathExpr,
pub graph: &'a str,
pub start_vertex: Option<VertexId>,
pub score: f64,
}Expand description
RPQ_R (Definition 5.1.2): evaluate a regular path expression over
a graph. The expression is simplified, compiled to an NFA via
Thompson’s construction, then converted to a DFA and simulated by a
BFS over (vertex, dfa-state) configurations.
The result lists every endpoint vertex reachable from a start
vertex along a path matching the expression. Each endpoint becomes
one entry in the returned GraphPostingList.
Fields§
§path: RegularPathExpr§graph: &'a str§start_vertex: Option<VertexId>Some(start) restricts evaluation to a single source. None
runs the query from every vertex in the graph.
score: f64Implementations§
Source§impl<'a> RegularPathQuery<'a>
impl<'a> RegularPathQuery<'a>
pub fn new(path: RegularPathExpr, graph: &'a str) -> Self
pub fn from_vertex(self, start: VertexId) -> Self
pub fn execute<G: GraphStore>( &self, store: &G, ) -> GraphStoreResult<GraphPostingList>
Auto Trait Implementations§
impl<'a> Freeze for RegularPathQuery<'a>
impl<'a> RefUnwindSafe for RegularPathQuery<'a>
impl<'a> Send for RegularPathQuery<'a>
impl<'a> Sync for RegularPathQuery<'a>
impl<'a> Unpin for RegularPathQuery<'a>
impl<'a> UnsafeUnpin for RegularPathQuery<'a>
impl<'a> UnwindSafe for RegularPathQuery<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more