Revert "Rename nrows/ncols args for try_from_*_data functions for consistency"
This reverts commit 2a3e657b56
.
This commit is contained in:
parent
89f1e855bb
commit
99eb8c1589
|
@ -157,14 +157,18 @@ impl<T> CscMatrix<T> {
|
||||||
/// An error is returned if the data given does not conform to the CSC storage format.
|
/// An error is returned if the data given does not conform to the CSC storage format.
|
||||||
/// See the documentation for [CscMatrix](struct.CscMatrix.html) for more information.
|
/// See the documentation for [CscMatrix](struct.CscMatrix.html) for more information.
|
||||||
pub fn try_from_csc_data(
|
pub fn try_from_csc_data(
|
||||||
nrows: usize,
|
num_rows: usize,
|
||||||
ncols: usize,
|
num_cols: usize,
|
||||||
col_offsets: Vec<usize>,
|
col_offsets: Vec<usize>,
|
||||||
row_indices: Vec<usize>,
|
row_indices: Vec<usize>,
|
||||||
values: Vec<T>,
|
values: Vec<T>,
|
||||||
) -> Result<Self, SparseFormatError> {
|
) -> Result<Self, SparseFormatError> {
|
||||||
let pattern =
|
let pattern = SparsityPattern::try_from_offsets_and_indices(
|
||||||
SparsityPattern::try_from_offsets_and_indices(ncols, nrows, col_offsets, row_indices)
|
num_cols,
|
||||||
|
num_rows,
|
||||||
|
col_offsets,
|
||||||
|
row_indices,
|
||||||
|
)
|
||||||
.map_err(pattern_format_error_to_csc_error)?;
|
.map_err(pattern_format_error_to_csc_error)?;
|
||||||
Self::try_from_pattern_and_values(pattern, values)
|
Self::try_from_pattern_and_values(pattern, values)
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,14 +158,18 @@ impl<T> CsrMatrix<T> {
|
||||||
/// An error is returned if the data given does not conform to the CSR storage format.
|
/// An error is returned if the data given does not conform to the CSR storage format.
|
||||||
/// See the documentation for [CsrMatrix](struct.CsrMatrix.html) for more information.
|
/// See the documentation for [CsrMatrix](struct.CsrMatrix.html) for more information.
|
||||||
pub fn try_from_csr_data(
|
pub fn try_from_csr_data(
|
||||||
nrows: usize,
|
num_rows: usize,
|
||||||
ncols: usize,
|
num_cols: usize,
|
||||||
row_offsets: Vec<usize>,
|
row_offsets: Vec<usize>,
|
||||||
col_indices: Vec<usize>,
|
col_indices: Vec<usize>,
|
||||||
values: Vec<T>,
|
values: Vec<T>,
|
||||||
) -> Result<Self, SparseFormatError> {
|
) -> Result<Self, SparseFormatError> {
|
||||||
let pattern =
|
let pattern = SparsityPattern::try_from_offsets_and_indices(
|
||||||
SparsityPattern::try_from_offsets_and_indices(nrows, ncols, row_offsets, col_indices)
|
num_rows,
|
||||||
|
num_cols,
|
||||||
|
row_offsets,
|
||||||
|
col_indices,
|
||||||
|
)
|
||||||
.map_err(pattern_format_error_to_csr_error)?;
|
.map_err(pattern_format_error_to_csr_error)?;
|
||||||
Self::try_from_pattern_and_values(pattern, values)
|
Self::try_from_pattern_and_values(pattern, values)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue