Skip to content

Commit

Permalink
Add Matrix::from_row
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyBF committed Oct 21, 2024
1 parent c978f03 commit d2931df
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ext/crates/fp/src/matrix/matrix_inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ impl Matrix {
}
}

/// Produces a `1 x n` matrix from a single FpVector. This is a convenience function.
pub fn from_row(p: ValidPrime, row: FpVector, columns: usize) -> Self {
Self::from_rows(p, vec![row], columns)
}

/// Produces a Matrix from an `&[Vec<u32>]` object. If the number of rows is 0, the number
/// of columns is also assumed to be zero.
///
Expand Down

0 comments on commit d2931df

Please sign in to comment.