[][src]Struct color_counter::space::Space

pub struct Space { /* fields omitted */ }

The Space struct is a linear space subdivided in many regions every region is a Region struct with the data inside this region and a counter for frequency counting.

The idea is to insert data in a spacially dependent way.

Methods

impl Space[src]

pub fn region_idx(&self, color: Color) -> usize[src]

Returns the index of the color in the space.

pub fn from_file(filepath: &str, region_percentage: f64) -> Self[src]

Create a new space from a file, reading it's colors and saving them on the space sorted by frequency.

pub fn regions_iter(
    &self
) -> impl Iterator<Item = &Region>
[src]

Get an iterator for all the non-empty regions of the space.

Auto Trait Implementations

impl Send for Space

impl Sync for Space

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = !

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

The type returned in the event of a conversion error.

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

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

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

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

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

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

The type returned in the event of a conversion error.

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.