Struct matrix::format::packed::Packed [] [src]

pub struct Packed<T: Element> {
    pub size: usize,
    pub variant: Variant,
    pub values: Vec<T>,
}

A packed matrix.

Fields

size: usize

The number of rows or columns.

variant: Variant

The format variant.

values: Vec<T>

The values of the lower triangle when variant = Lower or upper triangle when variant = Upper stored by columns.

Methods

impl<T: Element> Packed<T>
[src]

fn new<S: Size>(size: S, variant: Variant) -> Self

Create a zero matrix.

Trait Implementations

impl<T: Element> Transpose for Packed<T>
[src]

fn transpose(&self) -> Self

Perform the transpose.

impl<T: Element> Size for Packed<T>
[src]

fn rows(&self) -> usize

Return the number of rows.

fn columns(&self) -> usize

Return the number of columns.

fn dimensions(&self) -> (usize, usize)

Return the number of rows and columns.

impl<T: Element> Matrix for Packed<T>
[src]

type Element = T

The element type.

fn nonzeros(&self) -> usize

Count nonzero elements.

fn zero<S: Size>(size: S) -> Self

Create a zero matrix.

Derived Implementations

impl<T: PartialEq + Element> PartialEq for Packed<T>
[src]

fn eq(&self, __arg_0: &Packed<T>) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Packed<T>) -> bool

This method tests for !=.

impl<T: Debug + Element> Debug for Packed<T>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<T: Clone + Element> Clone for Packed<T>
[src]

fn clone(&self) -> Packed<T>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more