[][src]Struct nonogrid::block::multicolor::MultiColor

pub struct MultiColor(pub ColorId);

Trait Implementations

impl Color for MultiColor[src]

fn solution_rate(&self, all_colors: &[ColorId]) -> f64[src]

Calculate the rate of the given cell. The formula is like that: rate = (N - n) / (N - 1), where N = full puzzle color set n = current color set for given cell,

in particular: a) when the cell is completely unsolved rate = (N - N) / (N - 1) = 0 b) when the cell is solved rate = (N - 1) / (N - 1) = 1

impl DynamicColor for MultiColor[src]

impl Default for MultiColor[src]

impl Clone for MultiColor[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Ord for MultiColor[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl Eq for MultiColor[src]

impl Copy for MultiColor[src]

impl PartialOrd<MultiColor> for MultiColor[src]

impl PartialEq<MultiColor> for MultiColor[src]

impl Debug for MultiColor[src]

impl Display for MultiColor[src]

impl Add<MultiColor> for MultiColor[src]

type Output = Self

The resulting type after applying the + operator.

impl Sub<MultiColor> for MultiColor[src]

type Output = Result<Self, String>

The resulting type after applying the - operator.

impl Hash for MultiColor[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for MultiColor

impl Sync for MultiColor

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]