pub struct Problem<T = String>where
T: Clone,{ /* private fields */ }
Implementations§
Source§impl<T: Clone> Problem<T>
impl<T: Clone> Problem<T>
pub fn new() -> Problem<T>
pub fn solver(self, solver: Solver) -> Self
pub fn set_solver(&mut self, solver: Solver)
pub fn variables<V: Into<String>>( self, var_names: Vec<V>, domains: Vec<T>, ) -> Self
pub fn add_variables<V: Into<String>>( &mut self, var_names: Vec<V>, domains: Vec<T>, )
pub fn variable<V: Into<String>>(self, var_name: V, domains: Vec<T>) -> Self
pub fn add_variable<V: Into<String>>(&mut self, var_name: V, domains: Vec<T>)
pub fn constraint(self, constraint: Constraint<T>) -> Self
pub fn add_constraint(&mut self, constraint: Constraint<T>)
pub fn constraint_unary<N: Into<String>>( self, var_name: N, test: fn(&T) -> bool, ) -> Self
pub fn add_constraint_unary<N: Into<String>>( &mut self, var_name: N, test: fn(&T) -> bool, )
pub fn constraint_binary<N: Into<String>>( self, var_a: N, var_b: N, test: fn(&T, &T) -> bool, ) -> Self
pub fn add_constraint_binary<N: Into<String>>( &mut self, var_a: N, var_b: N, test: fn(&T, &T) -> bool, )
pub fn get_solutions(&self) -> Vec<Solution<T>>
Auto Trait Implementations§
impl<T> Freeze for Problem<T>
impl<T> RefUnwindSafe for Problem<T>where
T: RefUnwindSafe,
impl<T> Send for Problem<T>where
T: Send,
impl<T> Sync for Problem<T>where
T: Sync,
impl<T> Unpin for Problem<T>where
T: Unpin,
impl<T> UnwindSafe for Problem<T>where
T: UnwindSafe,
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