Struct faer_core::RowRef

source ·
pub struct RowRef<'a, T> { /* private fields */ }
Expand description

Row vector view with general column stride.

For usage examples, see MatRef.

Implementations

Returns a row vector slice from the given arguments.
ptr: pointer to the first element of the row vector.
ncols: number of columns of the row vector.
col_stride: offset between the first elements of two successive columns in the row vector.

Safety

ptr must be non null and properly aligned for type T.
For each j < ncols,
ptr.offset(j as isize * col_stride) must point to a valid initialized object of type T, unless memory pointing to that address is never read.
The referenced memory must not be mutated during the lifetime 'a.

Returns a pointer to the first (left) element of the row vector.

Returns the number of rows of the row vector. Always returns 1.

Returns the number of columns of the row vector.

Returns the offset between the first elements of two successive columns in the row vector.

Returns a pointer to the element at position (0, j) in the row vector.

Returns a pointer to the element at position (0, j) in the row vector, assuming it falls within its bounds with no bound checks.

Safety

Requires that j < self.ncols().

Otherwise, the behavior is undefined.

Returns a pointer to the element at position (0, j) in the row vector, while asserting that it falls within its bounds.

Panics

Requires that j < self.ncols().

Otherwise, it panics.

Splits the row vector into two parts in the following order: left, right.

Safety

Requires that j <= self.ncols().

Otherwise, the behavior is undefined.

Splits the row vector into two parts in the following order: left, right.

Panics

Requires that j <= self.ncols().

Otherwise, it panics.

Returns a reference to the element at position (0, j), with no bound checks.

Safety

Requires j < self.ncols().

Otherwise, the behavior is undefined.

Returns a reference to the element at position (0, j), or panics if the index is out of bounds.

Returns an equivalent matrix view over the same data.

Returns the transpose of self.

Returns a thin wrapper that can be used to execute coefficientwise operations on matrices.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
The returned type after indexing.
Performs the indexing (container[index]) operation. Read more
The type of the elements being iterated over.
Which kind of iterator are we turning this into?
Creates an iterator from a value. 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
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. 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.