identity method Null safety

void identity()

Make this the identity matrix

Implementation

void identity() {
  visit((r, c) {
    if (r == c) {
      setF(r, c, 1);
    } else {
      setF(r, c, 0);
    }
  });
}