Function binary_op
pub fn binary_op<I, E, LhsE, RhsE>(
lhs: SparseColMatRef<'_, I, LhsE>,
rhs: SparseColMatRef<'_, I, RhsE>,
f: impl FnMut(LhsE, RhsE) -> E,
) -> Result<SparseColMat<I, E>, FaerError>
Expand description
Returns the resulting matrix obtained by applying f
to the elements from lhs
and rhs
,
skipping entries that are unavailable in both of lhs
and rhs
.
§Panics
Panics if lhs
and rhs
don’t have matching dimensions.