pub struct RootHintsCache { /* private fields */ }Expand description
Root approximation hints cache.
Implementations§
Source§impl RootHintsCache
impl RootHintsCache
Sourcepub fn with_config(config: RootHintsConfig) -> Self
pub fn with_config(config: RootHintsConfig) -> Self
Create a new cache with the given configuration.
Sourcepub fn store_hints(
&mut self,
poly: &Polynomial,
variable: Var,
hints: Vec<RootHint>,
)
pub fn store_hints( &mut self, poly: &Polynomial, variable: Var, hints: Vec<RootHint>, )
Store root hints for a polynomial.
Sourcepub fn lookup_hints(
&mut self,
poly: &Polynomial,
variable: Var,
) -> Option<&[RootHint]>
pub fn lookup_hints( &mut self, poly: &Polynomial, variable: Var, ) -> Option<&[RootHint]>
Lookup root hints for a polynomial.
Sourcepub fn refine_hint(
&mut self,
poly: &Polynomial,
variable: Var,
root_index: usize,
new_lower: BigRational,
new_upper: BigRational,
) -> bool
pub fn refine_hint( &mut self, poly: &Polynomial, variable: Var, root_index: usize, new_lower: BigRational, new_upper: BigRational, ) -> bool
Refine an existing hint with more precise bounds.
Sourcepub fn num_roots(&mut self, poly: &Polynomial, variable: Var) -> Option<usize>
pub fn num_roots(&mut self, poly: &Polynomial, variable: Var) -> Option<usize>
Get the number of cached root hints for a polynomial.
Sourcepub fn stats(&self) -> &RootHintsStats
pub fn stats(&self) -> &RootHintsStats
Get statistics.
Sourcepub fn cache_size(&self) -> usize
pub fn cache_size(&self) -> usize
Get cache size.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RootHintsCache
impl RefUnwindSafe for RootHintsCache
impl Send for RootHintsCache
impl Sync for RootHintsCache
impl Unpin for RootHintsCache
impl UnsafeUnpin for RootHintsCache
impl UnwindSafe for RootHintsCache
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