Skip to content

Commit

Permalink
remove unncessary else-if branch in sparse::isometry_scale
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyjmurray committed Sep 12, 2024
1 parent e79d63e commit 5e57323
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions RandBLAS/sparse_skops.hh
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,8 @@ static state_t repeated_fisher_yates(
inline double isometry_scale(Axis major_axis, int64_t vec_nnz, int64_t dim_major, int64_t dim_minor) {
if (major_axis == Axis::Short) {
return std::pow(vec_nnz, -0.5);
} else if (major_axis == Axis::Long) {
return std::sqrt( ((double) dim_major) / (vec_nnz * ((double) dim_minor)) );
} else {
throw std::invalid_argument("Cannot compute the isometry scale for a sparse operator with unspecified major axis.");
return std::sqrt( ((double) dim_major) / (vec_nnz * ((double) dim_minor)) );
}
}

Expand Down

0 comments on commit 5e57323

Please sign in to comment.