[][src]Struct alg_ds::ds::table::Table

pub struct Table<T> where
    T: Default + Copy
{ /* fields omitted */ }

Methods

impl<T> Table<T> where
    T: Default + Copy
[src]

pub fn new(height: usize, width: usize) -> Table<T>[src]

Creates new table, filled by default values.

pub fn new_with_fill(height: usize, width: usize, value: T) -> Table<T>[src]

Creates new table, filled by given values.

pub fn fill(&mut self, value: T)[src]

Fills the table with value.

pub fn width(&self) -> usize[src]

Returns table width.

pub fn height(&self) -> usize[src]

Returns table height

pub fn nth(&self, index: usize) -> T[src]

Returns the n-th element of the table.

pub fn elements(&self) -> Iter<T>[src]

An iterator over table elements in line traversal order.

Trait Implementations

impl<T> Index<usize> for Table<T> where
    T: Default + Copy
[src]

type Output = [T]

The returned type after indexing.

impl<T> IndexMut<usize> for Table<T> where
    T: Default + Copy
[src]

Auto Trait Implementations

impl<T> Send for Table<T> where
    T: Send

impl<T> Sync for Table<T> where
    T: Sync

Blanket Implementations

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.

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]