Documentation of 'org.spaceroots.mantissa.linalg.GeneralMatrix' Java class
GeneralMatrix
org.spaceroots.mantissa.linalg

Class GeneralMatrix

  • All Implemented Interfaces:
    java.io.Serializable


    public class GeneralMatrix
    extends Matrix
    This class represents matrices of the most general type.

    This class is the basic implementation of matrices to use when nothing special is known about the structure of the matrix.

    See Also:
    Serialized Form
    • Constructor Detail

      • GeneralMatrix

        public GeneralMatrix(int rows,
                             int columns)
        Simple constructor. Build a matrix with null elements.
        Parameters:
        rows - number of rows of the matrix
        columns - number of columns of the matrix
      • GeneralMatrix

        public GeneralMatrix(int rows,
                             int columns,
                             double[] data)
        Simple constructor. Build a matrix with specified elements.
        Parameters:
        rows - number of rows of the matrix
        columns - number of columns of the matrix
        data - table of the matrix elements (stored row after row)
      • GeneralMatrix

        public GeneralMatrix(Matrix m)
        Copy constructor.
        Parameters:
        m - matrix to copy
    • Method Detail

      • duplicate

        public Matrix duplicate()
        Description copied from class: Matrix
        Polymorphic copy operator. This method build a new object of the same type of the instance. It is somewhat similar to the Object.clone() method, except that it has public access, it doesn't throw any specific exception and it returns a Matrix.
        Specified by:
        duplicate in class Matrix
        See Also:
        Object.clone()
      • selfAdd

        public void selfAdd(Matrix m)
        Add a matrix to the instance. This method adds a matrix to the instance. It does modify the instance.
        Parameters:
        m - matrix to add
        Throws:
        java.lang.IllegalArgumentException - if there is a dimension mismatch
      • selfSub

        public void selfSub(Matrix m)
        Substract a matrix from the instance. This method substracts a matrix from the instance. It does modify the instance.
        Parameters:
        m - matrix to substract
        Throws:
        java.lang.IllegalArgumentException - if there is a dimension mismatch

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.