pub struct Builder { /* private fields */ }
Expand description
A builder for samplers.
See Sampler::builder
for more details.
Implementations
sourceimpl Builder
impl Builder
sourcepub fn variable_degree(&mut self, degree: usize) -> &mut Self
pub fn variable_degree(&mut self, degree: usize) -> &mut Self
Fixes the variable’s degree. Default is 0.
sourcepub fn constraint_degree(&mut self, degree: usize) -> &mut Self
pub fn constraint_degree(&mut self, degree: usize) -> &mut Self
Fixes the constraint’s degree. Default is 0.
sourcepub fn number_of_variables(&mut self, n: usize) -> &mut Self
pub fn number_of_variables(&mut self, n: usize) -> &mut Self
Fixes the number of variables. Default is 0.
sourcepub fn number_of_constraints(&mut self, n: usize) -> &mut Self
pub fn number_of_constraints(&mut self, n: usize) -> &mut Self
Fixes the number of constraints. Default is 0.
sourcepub fn build(&self) -> Result<Sampler, InvalidParameters>
pub fn build(&self) -> Result<Sampler, InvalidParameters>
Build a sampler or returns an error if the number of variables times their degree is not the same as the number of constraints times their degree.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more