[−][src]Trait nonogrid::block::base::Color
Required methods
fn blank() -> Self
fn is_solved(&self) -> bool
fn solution_rate(&self, all_colors: &[ColorId]) -> f64
fn is_updated_with(&self, new: &Self) -> Result<bool, String>
fn variants(&self) -> Vec<Self> where
Self: Sized,
Self: Sized,
fn as_color_id(&self) -> Option<ColorId>
fn from_color_ids(ids: &[ColorId]) -> Self
Provided methods
fn memoize_rate() -> bool
Implementors
impl Color for BinaryColor
[src]
fn blank() -> Self
[src]
fn is_solved(&self) -> bool
[src]
fn solution_rate(&self, _all_colors: &[ColorId]) -> f64
[src]
fn is_updated_with(&self, new: &Self) -> Result<bool, String>
[src]
fn variants(&self) -> Vec<Self>
[src]
fn as_color_id(&self) -> Option<ColorId>
[src]
fn from_color_ids(ids: &[ColorId]) -> Self
[src]
fn memoize_rate() -> bool
[src]
impl Color for MultiColor
[src]
fn blank() -> Self
[src]
fn is_solved(&self) -> bool
[src]
fn memoize_rate() -> bool
[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
fn is_updated_with(&self, new: &Self) -> Result<bool, String>
[src]
fn variants(&self) -> Vec<Self> where
Self: Sized,
[src]
Self: Sized,