pub struct TieredExprDatabase { /* private fields */ }Expand description
Database with tiered storage for efficient priority-based searching
Expressions are organized by complexity tiers, allowing searches to process simpler expressions first and potentially skip higher tiers when good matches are found.
Implementations§
Source§impl TieredExprDatabase
impl TieredExprDatabase
Sourcepub fn insert(&mut self, expr: EvaluatedExpr)
pub fn insert(&mut self, expr: EvaluatedExpr)
Insert an expression into the appropriate tier
Sourcepub fn total_count(&self) -> usize
pub fn total_count(&self) -> usize
Get total count of expressions across all tiers
Sourcepub fn tier_count(&self, tier: ComplexityTier) -> usize
pub fn tier_count(&self, tier: ComplexityTier) -> usize
Get count for a specific tier
Sourcepub fn range_in_tier(
&self,
tier: ComplexityTier,
low: f64,
high: f64,
) -> &[EvaluatedExpr]
pub fn range_in_tier( &self, tier: ComplexityTier, low: f64, high: f64, ) -> &[EvaluatedExpr]
Find expressions in a specific tier within the value range [low, high]
Sourcepub fn iter_tiers_in_range(&self, low: f64, high: f64) -> TieredRangeIter<'_>
pub fn iter_tiers_in_range(&self, low: f64, high: f64) -> TieredRangeIter<'_>
Create an iterator that yields expressions from all tiers in order (Tier 0 first, then Tier 1, etc.) within a value range
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TieredExprDatabase
impl RefUnwindSafe for TieredExprDatabase
impl Send for TieredExprDatabase
impl Sync for TieredExprDatabase
impl Unpin for TieredExprDatabase
impl UnsafeUnpin for TieredExprDatabase
impl UnwindSafe for TieredExprDatabase
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> 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