Documentation of 'mikera.vectorz.util.MatrixBuilder' Java class
MatrixBuilder
mikera.vectorz.util

Class MatrixBuilder

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<INDArray>, java.lang.Iterable<AVector>, INDArray, IMatrix


    public class MatrixBuilder
    extends AMatrix
    Utility class for efficiently building matrices by appending vector rows
    See Also:
    Serialized Form
    • Constructor Detail

      • MatrixBuilder

        public MatrixBuilder()
    • Method Detail

      • append

        public void append(java.lang.Iterable<java.lang.Object> d)
      • append

        public void append(AVector v)
      • append

        public void append(double[] ds)
      • appendRow

        public void appendRow(AVector row)
      • replaceRow

        public void replaceRow(int i,
                               AVector row)
        Description copied from class: AMatrix
        Replaces a row in a matrix, adding the row to the internal structure of the matrix. Will throw UnsupportedOperationException if not possible for the given matrix type.
        Overrides:
        replaceRow in class AMatrix
      • getRowView

        public AVector getRowView(int row)
        Description copied from interface: IMatrix
        Returns a row of the matrix as a vector view. May be used to modify the original matrix.
        Specified by:
        getRowView in interface IMatrix
        Overrides:
        getRowView in class AMatrix
      • rowCount

        public int rowCount()
        Description copied from interface: IMatrix
        Gets the number of rows in this matrix (dimension 0)
        Returns:
      • columnCount

        public int columnCount()
        Description copied from interface: IMatrix
        Gets the number of columns in this matrix (dimension 1)
        Returns:
      • exactClone

        public AMatrix exactClone()
        Description copied from interface: INDArray
        Creates a deep clone of an array, using the same class implementation as the original array
        Specified by:
        exactClone in interface INDArray
        Specified by:
        exactClone in class AMatrix
        Returns:
        A clone of the original array
      • get

        public double get(int row,
                          int column)
        Description copied from interface: INDArray
        Returns the double value at the specified position in a 2D matrix
        Specified by:
        get in interface INDArray
        Specified by:
        get in interface IMatrix
        Specified by:
        get in class AMatrix
      • set

        public void set(int row,
                        int column,
                        double value)
        Description copied from interface: INDArray
        Sets a value at a given position in a mutable 2D array
        Specified by:
        set in interface INDArray
        Specified by:
        set in interface IMatrix
        Specified by:
        set in class AMatrix
      • isFullyMutable

        public boolean isFullyMutable()
        Description copied from interface: INDArray
        If this method returns true, the INDArray is guaranteed to be fully mutable in all positions i.e. every position can store any valid double value
        Specified by:
        isFullyMutable in interface INDArray
        Specified by:
        isFullyMutable in class AMatrix

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.