Class MatBuilder<R extends Num,​C extends Num>

  • Type Parameters:
    R - The number of rows of the desired matrix.
    C - The number of columns of the desired matrix.
    Direct Known Subclasses:
    VecBuilder

    public class MatBuilder<R extends Num,​C extends Num>
    extends Object
    A class for constructing arbitrary RxC matrices.
    • Constructor Detail

      • MatBuilder

        public MatBuilder​(Nat<R> rows,
                          Nat<C> cols)
        Creates a new MatBuilder with the given dimensions.
        Parameters:
        rows - The number of rows of the matrix.
        cols - The number of columns of the matrix.
    • Method Detail

      • fill

        public final Matrix<R,​C> fill​(double... data)
        Fills the matrix with the given data, encoded in row major form. (The matrix is filled row by row, left to right with the given data).
        Parameters:
        data - The data to fill the matrix with.
        Returns:
        The constructed matrix.