Matrix<T>.concatVertical constructor
Matrix<T>.concatVertical (
- DataType<
T> dataType, - Iterable<
Matrix< matrices, {T> > - MatrixFormat? format,
Returns the vertical concatenation of matrices
.
Implementation
factory Matrix.concatVertical(
DataType<T> dataType, Iterable<Matrix<T>> matrices,
{MatrixFormat? format}) {
if (matrices.isEmpty) {
throw ArgumentError.value(
matrices, 'matrices', 'Expected at least 1 matrix.');
}
final result = matrices.length == 1
? matrices.first
: ConcatVerticalMatrix<T>(dataType, matrices.toList(growable: false));
return format == null ? result : result.toMatrix(format: format);
}