pub struct ModelMinimizer { /* private fields */ }Expand description
Model minimizer.
Implementations§
Source§impl ModelMinimizer
impl ModelMinimizer
Sourcepub fn new(config: MinimizerConfig) -> Self
pub fn new(config: MinimizerConfig) -> Self
Create a new model minimizer.
Sourcepub fn default_config() -> Self
pub fn default_config() -> Self
Create with default configuration.
Sourcepub fn add_assignment(&mut self, term: TermId, value: TermId)
pub fn add_assignment(&mut self, term: TermId, value: TermId)
Add an assignment to the model.
Sourcepub fn mark_essential(&mut self, term: TermId)
pub fn mark_essential(&mut self, term: TermId)
Mark a term as essential (cannot be removed).
Sourcepub fn minimize(&mut self) -> Vec<Assignment>
pub fn minimize(&mut self) -> Vec<Assignment>
Minimize the model.
Sourcepub fn assignments(&self) -> &[Assignment]
pub fn assignments(&self) -> &[Assignment]
Get the current assignments.
Sourcepub fn stats(&self) -> &MinimizerStats
pub fn stats(&self) -> &MinimizerStats
Get statistics.
Sourcepub fn reset_stats(&mut self)
pub fn reset_stats(&mut self)
Reset statistics.
Trait Implementations§
Source§impl Debug for ModelMinimizer
impl Debug for ModelMinimizer
Auto Trait Implementations§
impl Freeze for ModelMinimizer
impl RefUnwindSafe for ModelMinimizer
impl Send for ModelMinimizer
impl Sync for ModelMinimizer
impl Unpin for ModelMinimizer
impl UnwindSafe for ModelMinimizer
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> 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