Struct backtrack::problems::total_sum::TotalSum [−][src]
Accept all values where the final sum was reached with one non-zero solution.
If e.g. sum_at_least
is 3 and 4 arbitrary integers are required, [0,2,2,0],
[1,1,0,1] and [2,0,3,0] are valid while [1,1,1,1] is not.
Implementations
impl TotalSum
[src]
Trait Implementations
impl CheckInc<usize> for TotalSum
[src]
type Accumulator = SumReached
fn fold_acc(
&self,
accu: Option<&Self::Accumulator>,
x: &usize
) -> Self::Accumulator
[src]
&self,
accu: Option<&Self::Accumulator>,
x: &usize
) -> Self::Accumulator
fn accu_sat(
&self,
accu: Option<&Self::Accumulator>,
x: &usize,
index: usize
) -> bool
[src]
&self,
accu: Option<&Self::Accumulator>,
x: &usize,
index: usize
) -> bool
impl Debug for TotalSum
[src]
impl Scope<'_, usize> for TotalSum
[src]
Auto Trait Implementations
impl RefUnwindSafe for TotalSum
impl Send for TotalSum
impl Sync for TotalSum
impl Unpin for TotalSum
impl UnwindSafe for TotalSum
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<C, T> Check<T> for C where
C: CheckInc<T>,
[src]
C: CheckInc<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,