pub struct Function { /* private fields */ }Expand description
Implementations§
source§impl Function
impl Function
pub fn add_weighted_literal(&mut self, literal: Literal, weight: u64)
pub fn add_weighted_integer(&mut self, domain_id: DomainId, weight: u64)
pub fn add_constant_term(&mut self, value: u64)
pub fn get_weighted_literals(&self) -> Iter<'_, Literal, u64>
pub fn get_weighted_integers(&self) -> Iter<'_, DomainId, u64>
pub fn get_constant_term(&self) -> u64
pub fn is_empty(&self) -> bool
pub fn evaluate_solution(&self, solution: SolutionReference<'_>) -> u64
pub fn evaluate_assignment(&self, solution: &Solution) -> u64
pub fn get_function_as_weighted_literals_vector( &self, solver: &Solver, ) -> Vec<WeightedLiteral>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Function
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnwindSafe for Function
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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