pub struct FixedOrder { /* private fields */ }Expand description
A variable selection strategy that picks variables in a fixed, predefined order.
It iterates through variables by their index (1 to num_vars - 1).
The first unassigned variable encountered is chosen.
The polarity (truth value) assigned to the chosen variable is selected randomly.
This strategy is simple and deterministic in variable choice (once an order is set) but random in polarity.
Trait Implementations§
Source§impl Clone for FixedOrder
impl Clone for FixedOrder
Source§fn clone(&self) -> FixedOrder
fn clone(&self) -> FixedOrder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FixedOrder
impl Debug for FixedOrder
Source§impl Default for FixedOrder
impl Default for FixedOrder
Source§fn default() -> FixedOrder
fn default() -> FixedOrder
Returns the “default value” for a type. Read more
Source§impl<L: Literal> VariableSelection<L> for FixedOrder
impl<L: Literal> VariableSelection<L> for FixedOrder
Source§fn new<C: AsRef<[L]>>(num_vars: usize, _: &[L], _: &[C]) -> Self
fn new<C: AsRef<[L]>>(num_vars: usize, _: &[L], _: &[C]) -> Self
Creates a new FixedOrder strategy.
num_vars is the total number of variables.
The random number generator is initialised with a fixed seed (0).
Source§fn pick<A: Assignment>(&mut self, assignment: &A) -> Option<L>
fn pick<A: Assignment>(&mut self, assignment: &A) -> Option<L>
Picks the first unassigned variable according to a fixed order (variable index).
Variables are typically checked from index 1 up to var_count - 1.
The polarity of the chosen variable is selected randomly.
Source§fn bumps<T: IntoIterator<Item = L>>(&mut self, _: T)
fn bumps<T: IntoIterator<Item = L>>(&mut self, _: T)
No-op
Auto Trait Implementations§
impl Freeze for FixedOrder
impl RefUnwindSafe for FixedOrder
impl Send for FixedOrder
impl Sync for FixedOrder
impl Unpin for FixedOrder
impl UnwindSafe for FixedOrder
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§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