swapRowsLU method Null safety

void swapRowsLU(
  1. int r1,
  2. int r2
)

Swap rows in a matrix holding an LU decomposition.

Implementation

void swapRowsLU(int r1, int r2) {
  assert(isLU);
  checkIndices(r1, r2); // It's square, so this works
  final swaps = _rowSwaps!;
  final t = swaps[r1];
  swaps[r1] = swaps[r2];
  swaps[r2] = t;
}