Class SparseDoubleMatrix<R,​C>

    • Constructor Detail

      • SparseDoubleMatrix

        public SparseDoubleMatrix​(double[][] T)
        Parameters:
        T - double[][]
      • SparseDoubleMatrix

        public SparseDoubleMatrix​(int rows,
                                  int cols)
        Parameters:
        rows - int
        cols - int
      • SparseDoubleMatrix

        public SparseDoubleMatrix​(int rows,
                                  int cols,
                                  int initialCapacity,
                                  double minLoadFactor,
                                  double maxLoadFactor)
        Parameters:
        rows - int
        cols - int
        initlalCapacity - int
        minLoadFactor - double
        maxLoadFactor - double
    • Method Detail

      • asArray

        public double[][] asArray()
        Specified by:
        asArray in class DoubleMatrix<R,​C>
        Returns:
        double[][]
      • cardinality

        public int cardinality()
        Returns:
      • columns

        public int columns()
        Description copied from interface: Matrix2D
        Get the number of columns the matrix has.
        Returns:
      • get

        public double get​(int row,
                          int column)
        Specified by:
        get in class DoubleMatrix<R,​C>
        Parameters:
        row -
        column -
        Returns:
      • getColObj

        public Double[] getColObj​(int col)
        Returns:
      • getColRange

        public DoubleMatrix<R,​C> getColRange​(int startCol,
                                                   int endCol)
        Specified by:
        getColRange in class DoubleMatrix<R,​C>
        Parameters:
        startCol - inclusive, numbered from zero
        endCol - inclusive, numbered from zero
        Returns:
        new matrix with just the requested range of columns from this
      • getObject

        public Double getObject​(int row,
                                int col)
        Returns:
      • getRow

        public double[] getRow​(int row)
        Return a reference to a specific row.
        Specified by:
        getRow in class DoubleMatrix<R,​C>
        Parameters:
        row - int
        Returns:
        double[]
      • getRowArrayList

        public cern.colt.list.DoubleArrayList getRowArrayList​(int i)
        Specified by:
        getRowArrayList in class DoubleMatrix<R,​C>
      • getRowByName

        public double[] getRowByName​(R s)
        Overrides:
        getRowByName in class DoubleMatrix<R,​C>
        Parameters:
        s - String
        Returns:
        double[]
      • getRowObj

        public Double[] getRowObj​(int row)
        Returns:
      • getRowRange

        public DoubleMatrix<R,​C> getRowRange​(int startRow,
                                                   int endRow)
        Specified by:
        getRowRange in class DoubleMatrix<R,​C>
        Parameters:
        startRow - inclusive, numbered from zero
        endRow - inclusive
        Returns:
      • isMissing

        public boolean isMissing​(int i,
                                 int j)
        Description copied from interface: Matrix2D
        Check if the value at a given index is missing.
        Parameters:
        i - row
        j - column
        Returns:
        true if the value is missing, false otherwise.
      • rows

        public int rows()
        Description copied from interface: Matrix2D
        Get the number of rows the matrix has
        Returns:
      • set

        public void set​(int row,
                        int column,
                        Double value)
      • trimToSize

        public void trimToSize()
      • viewColumn

        public cern.colt.matrix.DoubleMatrix1D viewColumn​(int column)
        Specified by:
        viewColumn in class DoubleMatrix<R,​C>
        Parameters:
        column -
        Returns:
      • viewRow

        public cern.colt.matrix.DoubleMatrix1D viewRow​(int row)
        Specified by:
        viewRow in class DoubleMatrix<R,​C>
        Parameters:
        row -
        Returns: