Matrix<T>.fromList constructor

Matrix<T>.fromList(
  1. List<List<T>> list, {
  2. ({int x, int y}) offset = oneIndexedMatrixOffset,
})

Implementation

Matrix.fromList(
  List<List<T>> list, {
  this.offset = oneIndexedMatrixOffset,
})  : _entries = _Array<T>.fromList([
        for (var j = 0; j < (list.firstOrNull ?? []).length; j++) ...[
          for (var i = 0; i < list.length; i++) list[i][j],
        ],
      ], offset: 0),
      dimensions = (list.length, (list.firstOrNull ?? []).length),
      _strides = (list.length, 1);