pub struct UnifiedTriplePattern {
pub subject: UnifiedTermPattern,
pub predicate: UnifiedTermPattern,
pub object: UnifiedTermPattern,
}
Expand description
Unified pattern representation that can handle both algebra and model patterns
Fields§
§subject: UnifiedTermPattern
Subject pattern
predicate: UnifiedTermPattern
Predicate pattern
object: UnifiedTermPattern
Object pattern
Implementations§
Source§impl UnifiedTriplePattern
impl UnifiedTriplePattern
Sourcepub fn new(
subject: UnifiedTermPattern,
predicate: UnifiedTermPattern,
object: UnifiedTermPattern,
) -> Self
pub fn new( subject: UnifiedTermPattern, predicate: UnifiedTermPattern, object: UnifiedTermPattern, ) -> Self
Create a new unified triple pattern
Sourcepub fn to_algebra_pattern(&self) -> Result<AlgebraTriplePattern, OxirsError>
pub fn to_algebra_pattern(&self) -> Result<AlgebraTriplePattern, OxirsError>
Convert to algebra TriplePattern
Sourcepub fn to_model_pattern(&self) -> TriplePattern
pub fn to_model_pattern(&self) -> TriplePattern
Convert to model TriplePattern
Sourcepub fn from_algebra_pattern(pattern: &AlgebraTriplePattern) -> Self
pub fn from_algebra_pattern(pattern: &AlgebraTriplePattern) -> Self
Create from algebra TriplePattern
Sourcepub fn from_model_pattern(pattern: &TriplePattern) -> Self
pub fn from_model_pattern(pattern: &TriplePattern) -> Self
Create from model TriplePattern
Sourcepub fn extract_variables(&self) -> HashSet<Variable>
pub fn extract_variables(&self) -> HashSet<Variable>
Extract all variables from this pattern
Sourcepub fn selectivity_estimate(&self) -> f64
pub fn selectivity_estimate(&self) -> f64
Get pattern selectivity estimate (0.0 = most selective, 1.0 = least selective)
Trait Implementations§
Source§impl Clone for UnifiedTriplePattern
impl Clone for UnifiedTriplePattern
Source§fn clone(&self) -> UnifiedTriplePattern
fn clone(&self) -> UnifiedTriplePattern
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for UnifiedTriplePattern
impl Debug for UnifiedTriplePattern
Source§impl Hash for UnifiedTriplePattern
impl Hash for UnifiedTriplePattern
Source§impl PartialEq for UnifiedTriplePattern
impl PartialEq for UnifiedTriplePattern
impl Eq for UnifiedTriplePattern
impl StructuralPartialEq for UnifiedTriplePattern
Auto Trait Implementations§
impl Freeze for UnifiedTriplePattern
impl RefUnwindSafe for UnifiedTriplePattern
impl Send for UnifiedTriplePattern
impl Sync for UnifiedTriplePattern
impl Unpin for UnifiedTriplePattern
impl UnwindSafe for UnifiedTriplePattern
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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