diff --git a/src/matrix/mat.rs b/src/matrix/mat.rs index 20ff191..284be31 100644 --- a/src/matrix/mat.rs +++ b/src/matrix/mat.rs @@ -192,6 +192,16 @@ impl<'a, T> MatrixRow<'a, T> { (0..self.matrix.cols).map(move |c| &self.matrix[(self.row, c)]) } } + +/// Specifies the axis along which to perform a reduction operation. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Axis { + /// Apply reduction along columns (vertical axis). + Col, + /// Apply reduction along rows (horizontal axis). + Row, +} + /// A trait to turn either a Matrix or a scalar T into a Vec of /// length rows*cols (broadcasting the scalar). pub trait Broadcastable { @@ -335,14 +345,6 @@ impl Not for Matrix { } } -/// Specifies the axis along which to perform a reduction operation. -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum Axis { - /// Apply reduction along columns (vertical axis). - Col, - /// Apply reduction along rows (horizontal axis). - Row, -} #[cfg(test)] mod tests {