pub struct PermutationSolutionBuilder { /* private fields */ }Expand description
Builder for permutation-based solutions (Solution<usize>).
Typical use case: routing problems like TSP.
Implementations§
Source§impl PermutationSolutionBuilder
impl PermutationSolutionBuilder
Sourcepub fn from_variables(variables: Vec<usize>) -> Self
pub fn from_variables(variables: Vec<usize>) -> Self
Creates a builder from an existing permutation vector.
Sourcepub fn with_variables(self, variables: Vec<usize>) -> Self
pub fn with_variables(self, variables: Vec<usize>) -> Self
Replaces the permutation vector.
Sourcepub fn with_quality(self, quality: f64) -> Self
pub fn with_quality(self, quality: f64) -> Self
Sets optional scalar quality.
Auto Trait Implementations§
impl Freeze for PermutationSolutionBuilder
impl RefUnwindSafe for PermutationSolutionBuilder
impl Send for PermutationSolutionBuilder
impl Sync for PermutationSolutionBuilder
impl Unpin for PermutationSolutionBuilder
impl UnsafeUnpin for PermutationSolutionBuilder
impl UnwindSafe for PermutationSolutionBuilder
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