Class RealCsrManipulations
java.lang.Object
org.flag4j.linalg.ops.sparse.csr.real.RealCsrManipulations
Utility class for manipulating
real sparse CSR matrices (e.g. row swaps, column swaps,
etc.).-
Method Summary
-
Method Details
-
swapRows
Swaps two rows in a sparse CSR matrix. This is done in place.- Parameters:
src- The matrix to swap rows within, done in place.rowIdx1- Index of the first row to swap.rowIdx2- Index of the second row to swap.- Throws:
IndexOutOfBoundsException- If eitherrowIdx1orrowIdx2is out of bounds of the rows of this matrix.
-
swapCols
Swaps two columns in a sparse CSR matrix. This is done in place.- Parameters:
src- The matrix to swap rows within, done in place.colIdx1- Index of the first column to swap.colIdx2- Index of the second column to swap.- Throws:
IndexOutOfBoundsException- If eithercolIndex1orcolIndex2is out of bounds of the columns of this matrix.
-