Skip to main content

remove_weights

Function remove_weights 

Source
pub fn remove_weights<T: CustomNumeric>(
    matrix: &DTensor<T, 2>,
    weights: &[T],
    is_row: bool,
) -> DTensor<T, 2>
Expand description

Remove Gauss weights from SVD matrix

This function removes the square root of Gauss quadrature weights that were applied before SVD computation. This is the inverse operation of DiscretizedKernel::apply_weights_for_sve().

§Arguments

  • matrix - SVD result matrix (U or V^T)
  • weights - Gauss quadrature weights
  • is_row - If true, remove from rows; if false, remove from columns

§Returns

Matrix with weights removed