Enum ndarray::Order [−][src]
#[non_exhaustive] pub enum Order { RowMajor, ColumnMajor, }
Expand description
Array order
Order refers to indexing order, or how a linear sequence is translated into a two-dimensional or multi-dimensional array.
RowMajor
means that the index along the row is the most rapidly changingColumnMajor
means that the index along the column is the most rapidly changing
Given a sequence like: 1, 2, 3, 4, 5, 6
If it is laid it out in a 2 x 3 matrix using row major ordering, it results in:
1 2 3
4 5 6
If it is laid using column major ordering, it results in:
1 3 5
2 4 6
It can be seen as filling in “rows first” or “columns first”.
Order
can be used both to refer to logical ordering as well as memory ordering or memory
layout. The orderings have common short names, also seen in other environments, where
row major is called “C” order (after the C programming language) and column major is called “F”
or “Fortran” order.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Expand description
Row major or “C” order
Expand description
Column major or “F” order
Implementations
impl Order
[src]
impl Order
[src]pub fn is_row_major(self) -> bool
[src]
pub fn is_row_major(self) -> bool
[src]Return true if input is Order::RowMajor, false otherwise
pub fn is_column_major(self) -> bool
[src]
pub fn is_column_major(self) -> bool
[src]Return true if input is Order::ColumnMajor, false otherwise
pub fn row_major(row_major: bool) -> Order
[src]
pub fn row_major(row_major: bool) -> Order
[src]Return Order::RowMajor if the input is true, Order::ColumnMajor otherwise
pub fn column_major(column_major: bool) -> Order
[src]
pub fn column_major(column_major: bool) -> Order
[src]Return Order::ColumnMajor if the input is true, Order::RowMajor otherwise
Trait Implementations
impl Copy for Order
[src]
impl Eq for Order
[src]
impl StructuralEq for Order
[src]
impl StructuralPartialEq for Order
[src]
Auto Trait Implementations
impl RefUnwindSafe for Order
impl Send for Order
impl Sync for Order
impl Unpin for Order
impl UnwindSafe for Order
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more