pub struct PathIndex { /* private fields */ }Expand description
Exact accepted endpoint relation for one summary snapshot.
The forward CSR is the canonical denotation. Reverse fibers and the three
domain views are derived from it. The constructional PathSummary is
retained so independently built indexes can still be merged exactly.
Implementations§
Source§impl PathIndex
impl PathIndex
Sourcepub fn constraint<'a, S: InlineEncoding, E: InlineEncoding>(
&'a self,
start: impl Into<Term<S>>,
end: impl Into<Term<E>>,
) -> PathConstraint<'a>
pub fn constraint<'a, S: InlineEncoding, E: InlineEncoding>( &'a self, start: impl Into<Term<S>>, end: impl Into<Term<E>>, ) -> PathConstraint<'a>
Creates an ordinary query constraint over this path relation.
Source§impl PathIndex
impl PathIndex
Sourcepub fn from_edges(
automaton: Automaton,
edges: impl IntoIterator<Item = GraphEdge>,
) -> Result<Self, PathError>
pub fn from_edges( automaton: Automaton, edges: impl IntoIterator<Item = GraphEdge>, ) -> Result<Self, PathError>
Builds an index directly from graph edges.
Sourcepub fn from_tribles<'a>(
automaton: Automaton,
tribles: impl IntoIterator<Item = &'a Trible>,
) -> Result<Self, PathError>
pub fn from_tribles<'a>( automaton: Automaton, tribles: impl IntoIterator<Item = &'a Trible>, ) -> Result<Self, PathError>
Builds an index directly from tribles.
Sourcepub fn from_summary(summary: PathSummary) -> Result<Self, PathError>
pub fn from_summary(summary: PathSummary) -> Result<Self, PathError>
Materializes one exact endpoint relation from a constructional summary.
Sourcepub fn summary(&self) -> &PathSummary
pub fn summary(&self) -> &PathSummary
Exact constructional summary retained by this index.
Sourcepub fn vertex_count(&self) -> usize
pub fn vertex_count(&self) -> usize
Number of graph terms in the canonical endpoint domain.
Sourcepub fn accepted_pair_count(&self) -> usize
pub fn accepted_pair_count(&self) -> usize
Number of distinct accepted endpoint pairs.
Sourcepub fn contains(&self, source: &RawInline, target: &RawInline) -> bool
pub fn contains(&self, source: &RawInline, target: &RawInline) -> bool
Whether the automaton accepts a path from source to target.
Sourcepub fn accepted_pairs(
&self,
) -> impl Iterator<Item = (RawInline, RawInline)> + '_
pub fn accepted_pairs( &self, ) -> impl Iterator<Item = (RawInline, RawInline)> + '_
Sorted, duplicate-free accepted endpoint pairs.
Sourcepub fn reachable_from<'a>(
&'a self,
source: &RawInline,
) -> impl Iterator<Item = RawInline> + 'a
pub fn reachable_from<'a>( &'a self, source: &RawInline, ) -> impl Iterator<Item = RawInline> + 'a
Sorted accepted targets for one source.
Sourcepub fn reaching<'a>(
&'a self,
target: &RawInline,
) -> impl Iterator<Item = RawInline> + 'a
pub fn reaching<'a>( &'a self, target: &RawInline, ) -> impl Iterator<Item = RawInline> + 'a
Sorted accepted sources for one target.
Sourcepub fn starts(&self) -> impl Iterator<Item = RawInline> + '_
pub fn starts(&self) -> impl Iterator<Item = RawInline> + '_
Sorted sources having at least one accepted target.
Sourcepub fn ends(&self) -> impl Iterator<Item = RawInline> + '_
pub fn ends(&self) -> impl Iterator<Item = RawInline> + '_
Sorted targets having at least one accepted source.
Sourcepub fn diagonal(&self) -> impl Iterator<Item = RawInline> + '_
pub fn diagonal(&self) -> impl Iterator<Item = RawInline> + '_
Sorted vertices accepted from themselves.
Sourcepub fn merge(&self, other: &Self) -> Result<Self, PathError>
pub fn merge(&self, other: &Self) -> Result<Self, PathError>
Closes the canonical union of two retained summaries.
Sourcepub fn merge_all<'a>(
indexes: impl IntoIterator<Item = &'a Self>,
) -> Result<Self, PathError>
pub fn merge_all<'a>( indexes: impl IntoIterator<Item = &'a Self>, ) -> Result<Self, PathError>
Closes the canonical union of any nonempty index collection.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PathIndex
impl RefUnwindSafe for PathIndex
impl Send for PathIndex
impl Sync for PathIndex
impl Unpin for PathIndex
impl UnsafeUnpin for PathIndex
impl UnwindSafe for PathIndex
Blanket Implementations§
impl<T> ArchiveOwner for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more