Class DefaultSparseColumnObjectMatrix2D

    • Field Detail

      • columns

        protected java.util.Map<java.lang.Long,​Matrix> columns
    • Constructor Detail

      • DefaultSparseColumnObjectMatrix2D

        public DefaultSparseColumnObjectMatrix2D​(long rows,
                                                 long columns)
      • DefaultSparseColumnObjectMatrix2D

        public DefaultSparseColumnObjectMatrix2D​(Matrix m)
    • Method Detail

      • availableCoordinates

        public java.lang.Iterable<long[]> availableCoordinates()
        Description copied from interface: CoordinateFunctions
        Returns an Iterator that only goes over the coordinates in the Matrix that are stored. For most Matrices, this is the same as allCoordinates(). For sparse Matrices, it iterates only over the entries in it.
        Specified by:
        availableCoordinates in interface CoordinateFunctions
        Returns:
        Iterable over the saved entries in a Matrix.
      • containsCoordinates

        public boolean containsCoordinates​(long... coordinates)
        Description copied from interface: CoordinateFunctions
        Determines if the given Coordinates are part of the Matrix. If the Matrix is dense, true is returned for all Coordinates smaller than the Matrix's size. For sparse Matrices, this function checks if the coordinates are actually stored in the matrix or not.
        Specified by:
        containsCoordinates in interface CoordinateFunctions
        Parameters:
        coordinates - The coordinates to check
        Returns:
        a boolean stating if the coordinates are part of the Matrix
      • setSize

        public void setSize​(long... size)
        Description copied from interface: BaseMatrixProperties
        Sets the size of the matrix. This is an optional method that is not implemented for all matrices. If this method is not implemented, a MatrixException is thrown.
        Specified by:
        setSize in interface BaseMatrixProperties
        Overrides:
        setSize in class AbstractMatrix
        Parameters:
        size - the new size of the matrix
      • clear

        public final void clear()
        Specified by:
        clear in interface Clearable
      • getColumn

        public Matrix getColumn​(long column)
      • max

        public Matrix max​(Calculation.Ret returnType,
                          int dimension)
        Description copied from interface: StatisticalDoubleCalculations
        Calculates the maximum of the values in the matrix either rowwise, columnwise, or global.
        Specified by:
        max in interface StatisticalDoubleCalculations
        Overrides:
        max in class AbstractMatrix
        Parameters:
        returnType - Select whether a new or a linked Matrix is returned, or if the operation is performed on the original Matrix
        dimension - the axis along which should be calculated, e.g. ROW=0, COLUMN=1 or ALL
        Returns:
        A new matrix containing the maximum values
      • getWrappedObject

        public java.util.Map<java.lang.Long,​Matrix> getWrappedObject()
        Description copied from interface: Wrapper
        Returns the object that is wrapped inside the wrapper
        Specified by:
        getWrappedObject in interface Wrapper<java.util.Map<java.lang.Long,​Matrix>>
        Returns:
        the inner object
      • setWrappedObject

        public void setWrappedObject​(java.util.Map<java.lang.Long,​Matrix> object)