Skip navigation links
Ignite - In-Memory Data Fabric
org.apache.ignite.ml.math.impls.matrix

Class SparseDistributedMatrix

    • Constructor Detail

      • SparseDistributedMatrix

        public SparseDistributedMatrix()
      • SparseDistributedMatrix

        public SparseDistributedMatrix(int rows,
                                       int cols,
                                       int stoMode,
                                       int acsMode)
        Parameters:
        rows - Amount of rows in the matrix.
        cols - Amount of columns in the matrix.
        stoMode - Matrix storage mode.
        acsMode - Matrix elements access mode.
      • SparseDistributedMatrix

        public SparseDistributedMatrix(double[][] data)
        Parameters:
        data - Data to fill the matrix
      • SparseDistributedMatrix

        public SparseDistributedMatrix(int rows,
                                       int cols)
        Parameters:
        rows - Amount of rows in the matrix.
        cols - Amount of columns in the matrix.
    • Method Detail

      • divide

        public Matrix divide(double d)
        Return the same matrix with updates values (broken contract).
        Specified by:
        divide in interface Matrix
        Overrides:
        divide in class AbstractMatrix
        Parameters:
        d - Value to divide to.
        Returns:
        This matrix.
      • plus

        public Matrix plus(double x)
        Return the same matrix with updates values (broken contract).
        Specified by:
        plus in interface Matrix
        Overrides:
        plus in class AbstractMatrix
        Parameters:
        x - Value to add.
        Returns:
        New matrix of the same underlying class and size.
      • times

        public Matrix times(double x)
        Return the same matrix with updates values (broken contract).
        Specified by:
        times in interface Matrix
        Overrides:
        times in class AbstractMatrix
        Parameters:
        x - Value to multiply.
        Returns:
        New matrix.
      • times

        public Matrix times(Matrix mtx)
        Creates new matrix that is the product of multiplying this matrix and the argument matrix.
        Specified by:
        times in interface Matrix
        Overrides:
        times in class AbstractMatrix
        Parameters:
        mtx - Argument matrix.
        Returns:
        New matrix.
      • times

        public Vector times(Vector vec)
        Creates new matrix that is the product of multiplying this matrix and the argument vector.
        Specified by:
        times in interface Matrix
        Overrides:
        times in class AbstractMatrix
        Parameters:
        vec - Argument vector.
        Returns:
        New matrix.
      • assign

        public Matrix assign(double val)
        Assigns given value to all elements of this matrix.
        Specified by:
        assign in interface Matrix
        Overrides:
        assign in class AbstractMatrix
        Parameters:
        val - Value to assign to all elements.
        Returns:
        This matrix.
      • sum

        public double sum()
        Gets sum of all elements in the matrix.
        Specified by:
        sum in interface Matrix
        Overrides:
        sum in class AbstractMatrix
        Returns:
        Sum of all elements in this matrix.
      • maxValue

        public double maxValue()
        Gets the maximum value in this matrix.
        Specified by:
        maxValue in interface Matrix
        Overrides:
        maxValue in class AbstractMatrix
        Returns:
        Maximum value in this matrix.
      • minValue

        public double minValue()
        Gets the minimum value in this matrix.
        Specified by:
        minValue in interface Matrix
        Overrides:
        minValue in class AbstractMatrix
        Returns:
        Minimum value in this matrix.
      • copy

        public Matrix copy()
        Clones this matrix.

        NOTE: new matrix will have the same flavor as the this matrix but a different ID.

        Specified by:
        copy in interface Matrix
        Overrides:
        copy in class AbstractMatrix
        Returns:
        New matrix of the same underlying class, the same size and the same values.
      • like

        public Matrix like(int rows,
                           int cols)
        Creates new empty matrix of the same underlying class but of different size.

        NOTE: new matrix will have the same flavor as the this matrix but a different ID.

        Specified by:
        like in interface Matrix
        Parameters:
        rows - Number of rows for new matrix.
        cols - Number of columns for new matrix.
        Returns:
        New matrix of the same underlying class and size.
      • likeVector

        public Vector likeVector(int crd)
        Creates new empty vector of compatible properties (similar or the same flavor) to this matrix.
        Specified by:
        likeVector in interface Matrix
        Parameters:
        crd - Cardinality of the vector.
        Returns:
        Newly created empty vector "compatible" to this matrix.
      • getUUID

        public UUID getUUID()
Ignite - In-Memory Data Fabric

2018 Copyright © Apache Software Foundation
Ignite Fabric :   ver. 2.5.0
Release Date :   May 23 2018