columns property

Iterable<List> get columns

Getter to retrieve column-wise iteration over the matrix. It returns an iterable of columns, where each column is a list of elements.

Example usage:

final matrix = Matrix([[1, 2], [3, 4]]);
matrix.columns.forEach(print); // Prints [[1], [3]] then [[2], [4]]

Implementation

Iterable<List<dynamic>> get columns =>
    _MatrixIterable(this, columnMajor: true);