Template Function bats::sparsify_basis(ColumnMatrix<TVec>&, ColumnMatrix<TVec>&, const size_t, std::map<F, size_t>&, typename TVec::tmp_type&)¶
Defined in File reduction.hpp
Function Documentation¶
-
template<typename TVec, typename F>
void bats::sparsify_basis(ColumnMatrix<TVec> &R, ColumnMatrix<TVec> &U, const size_t j, std::map<F, size_t> &coeff, typename TVec::tmp_type &tmp)¶ greedily introduce sparsity into columns j of U and R using columns k < j assumes columns k <= j are already reduced
objective to greedily minimize is nnz(U[j]) + nnz(R[j])
- Parameters
R – reduced matrix
U – change of basis matrix
j – column
coeff – preallocated map to use when sparsifying.
tmp – preallocated to use with axpy