Struct rustlearn::array::dense::Array [] [src]

pub struct Array {
    // some fields omitted
}

Basic two-dimensional dense matrix type.

Methods

impl Array
[src]

Create a rows by cols array of zeros.

Create a rows by cols array of ones.

Change the shape of the array to rows by cols.

Panics

If the number of elements implied by the new shape is different from the current number of elements.

Return the order (row-major or column-major) of the array.

Return an immutable reference to the underlying data buffer of the array.

The arrangement of the elements in that vector is dependent on whether this is a row-major or a column-major array.

Return an immutable reference to the underlying data buffer of the array.

The arrangement of the elements in that vector is dependent on whether this is a row-major or a column-major array.

Return an mutable reference to the underlying data buffer of the array.

The arrangement of the elements in that vector is dependent on whether this is a row-major or a column-major array.

Transpose the matrix.

Compute the sum of the entries of the array.

Compute the mean of the array.

Trait Implementations

impl Decodable for Array
[src]

impl Encodable for Array
[src]

impl Debug for Array
[src]

Formats the value using the given formatter.

impl Clone for Array
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> RowIterable for &'a Array
[src]

Iterate over rows of the matrix.

View a row of the matrix.

Iterate over a subset of rows of the matrix.

impl<'a> ColumnIterable for &'a Array
[src]

Iterate over columns of a the matrix.

View a column of the matrix.

Iterate over a subset of columns of the matrix.

impl IndexableMatrix for Array
[src]

Return the number of rows of the matrix.

Return the number of columns of the matrix.

Get the value of the entry at (row, column) without bounds checking.

Get a mutable reference to the value of the entry at (row, column) without bounds checking. Read more

Get the value of the entry at (row, column). Read more

Get a mutable reference to value of the entry at (row, column). Read more

Set the value of the entry at (row, column) to value. Read more

Set the value of the entry at (row, column) to value without bounds checking.

impl From<Vec<f32>> for Array
[src]

Construct an array from a vector.

Panics

This will panic if the input vector is emtpy.

impl<'a> From<&'a Vec<Vec<f32>>> for Array
[src]

Construct an array from a vector of vectors.

Panics

This will panic if the input vector is emtpy or if its rows are of unequal length.

impl ElementwiseArrayOps<f32> for Array
[src]

impl<'a> ElementwiseArrayOps<&'a Array> for Array
[src]

Perform elementwise operations between two arrays.

Panics

Will panic if the two operands are not of the same shape.

impl<'a> Dot<&'a Array> for Array
[src]

impl RowIndex<Vec<usize>> for Array
[src]