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

Class SymetricalMatrix

  • All Implemented Interfaces:
    java.io.Serializable


    public class SymetricalMatrix
    extends GeneralSquareMatrix
    This class implements symetrical matrices of linear algebra.
    See Also:
    Serialized Form
    • Constructor Detail

      • SymetricalMatrix

        public SymetricalMatrix(int order)
        Simple constructor. This constructor builds a symetrical matrix of specified order, all elements beeing zeros.
        Parameters:
        order - order of the matrix
      • SymetricalMatrix

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

        public SymetricalMatrix(SymetricalMatrix s)
        Copy constructor.
        Parameters:
        s - square matrix to copy
      • SymetricalMatrix

        public SymetricalMatrix(double w,
                                double[] a)
        Build the symetrical matrix resulting from the product w.A.At.
        Parameters:
        w - multiplicative factor (weight)
        a - base vector used to compute the symetrical contribution
    • 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.
        Overrides:
        duplicate in class GeneralSquareMatrix
        See Also:
        Object.clone()
      • setElementAndSymetricalElement

        public void setElementAndSymetricalElement(int i,
                                                   int j,
                                                   double value)
        Set both a matrix element and its symetrical element.
        Parameters:
        i - row index of first element (column index of second element), from 0 to order - 1
        j - column index of first element (row index of second element), from 0 to order - 1
        value - value of the elements
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - if the indices are wrong
        See Also:
        setElement(int, int, double), Matrix.getElement(int, int)
      • selfAdd

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

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

        public void selfAddWAAt(double w,
                                double[] a)
        Add the symetrical matrix resulting from the product w.A.At to the instance. This method can be used to build progressively the matrices of least square problems. The instance is modified.
        Parameters:
        w - multiplicative factor (weight)
        a - base vector used to compute the symetrical contribution
        Throws:
        java.lang.IllegalArgumentException - if there is a dimension mismatch

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.