pub struct Matrix<'a, T> {
    pub data: &'a [T],
    pub index: Vec<usize>,
    pub rows: usize,
    pub cols: usize,
    /* private fields */
}
Expand description

Contigious Column major matrix data container. This is used throughout the crate, to house both the user provided data as well as the binned data.

Fields

data: &'a [T]index: Vec<usize>rows: usizecols: usize

Implementations

Get a single reference to an item in the matrix.

  • i - The ith row of the data to get.
  • j - the jth column of the data to get.

Get a slice of a column in the matrix.

  • col - The index of the column to select.
  • start_row - The index of the start of the slice.
  • end_row - The index of the end of the slice of the column to select.

Get an entire column in the matrix.

  • col - The index of the column to get.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.