rowMins method

List rowMins()

Calculates the minimum value for each row in the matrix.

Returns a list of minimum values, one for each row.

Example usage:

final matrix = Matrix([
  [1, 2],
  [3, 4],
  [5, 6]
]);
final mins = matrix.rowMins();
print(mins);  // Output: [1, 3, 5]

Implementation

List<dynamic> rowMins() {
  return _Utils.toNumList(_data).map((row) => row.reduce(math.min)).toList();
}