Trait binpool::Matrix [] [src]

pub trait Matrix: Sized + Default {
    type Scalar: Scalar;
    fn dim() -> [usize; 2];
    fn get(&self, row: usize, col: usize) -> &Self::Scalar;
    fn set(&mut self, row: usize, col: usize, val: Self::Scalar);

    fn write_property<W: Write>(
        &self,
        property_id: u16,
        w: &mut W
    ) -> Result<()> { ... } fn write_array<W: Write, A: Array<Item = Self>>(
        property_id: u16,
        arr: &A,
        w: &mut W
    ) -> Result<()> { ... } fn read_property<R: Read>(
        &mut self,
        state: State<Bytes>,
        ty: u16,
        r: &mut R
    ) -> Result<()> { ... } fn read_array<R: Read, A: Array<Item = Self>>(
        state: State<Bytes>,
        ty: u16,
        arr: &mut A,
        r: &mut R
    ) -> Result<()> { ... } }

Implemented by matrix types.

Associated Types

Scalar type.

Required Methods

Returns dimensions.

Gets value.

Sets value.

Provided Methods

Writes property.

Writes array.

Reads property.

Reads array.

Implementors