nalgebra/src/traits/row.rs
Sébastien Crozet 7052aa88ee Add two traits: CrossMatrix and Row.
CrossMatrix is a trait for vectors having a cross product representable as a matrix.
Row is a trait for Matrixces and Vectors, to access (by index) their rows.
2013-08-25 23:01:44 +02:00

8 lines
223 B
Rust

/// Traits to access rows of a matrix or vector.
pub trait Row<R> {
/// Reads the `i`-th row of `self`.
fn row(&self, i: uint) -> R;
/// Writes the `i`-th row of `self`.
fn set_row(&mut self, i: uint, R);
}