Struct backtrack::problems::total_sum::TotalSum[][src]

pub struct TotalSum { /* fields omitted */ }

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]

pub fn new(n: usize, domain: &[usize], sum_at_least: usize) -> Self[src]

Trait Implementations

impl CheckInc for TotalSum[src]

type Accumulator = SumReached

impl Debug for TotalSum[src]

impl Scope for TotalSum[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Check for T where
    T: CheckInc
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.