[−][src]Struct color_counter::space::Space
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]
&self
) -> impl Iterator<Item = &Region>
Get an iterator for all the non-empty regions of the space.
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.