Matrix.eye constructor

Matrix.eye(
  1. int size
)

Constructs an identity matrix of size

Implementation

Matrix.eye(int size) : _values = _createStore(size, size, 0.0) {
  for (int i = 0; i < size; i++) {
    _values[i][i] = 1.0;
  }
}