Class IMatrix

java.lang.Object
org.openscience.cdk.math.IMatrix

public class IMatrix extends Object
This class contains a complex matrix.
Belongs to CDK module:
qm
  • Field Details

    • realmatrix

      public double[][] realmatrix
      the real part of the content
    • imagmatrix

      public double[][] imagmatrix
      the imaginary part of the content
    • rows

      public int rows
      the count of rows of the matrix
    • columns

      public int columns
      the count of columns of the matrix
  • Constructor Details

    • IMatrix

      public IMatrix(int rows, int columns)
      Creates a complex matrix
    • IMatrix

      public IMatrix(Matrix m)
      Creates a complex copy of a matrix
  • Method Details

    • getRows

      public int getRows()
      Returns the count of rows
    • getColumns

      public int getColumns()
      Returns the count of columns
    • getVectorFromRow

      public IVector getVectorFromRow(int index)
      Creates a vector with the content of a row from this matrix
    • getVectorFromColumn

      public IVector getVectorFromColumn(int index)
      Creates a vector with the content of a column from this matrix
    • getVectorFromDiagonal

      public IVector getVectorFromDiagonal()
      Creates a vector with the content of the diagonal elements from this matrix
    • add

      public IMatrix add(IMatrix b)
      Addition from two matrices
    • add

      public void add(IMatrix b, IMatrix result)
      Addition from two matrices
    • sub

      public IMatrix sub(IMatrix b)
      Subtraktion from two matrices
    • sub

      public void sub(IMatrix b, IMatrix result)
      Subtraktion from two matrices
    • mul

      public IMatrix mul(IMatrix b)
      Multiplikation from two matrices
    • mul

      public void mul(IMatrix b, IMatrix result)
      Multiplikation from two matrices
    • mul

      public IVector mul(IVector a)
      Multiplikation from a vector and a matrix
    • mul

      public void mul(IVector a, IVector result)
      Multiplikation from a vector and a matrix
    • mul

      public IMatrix mul(Complex a)
      Multiplikation from a scalar and a matrix
    • mul

      public void mul(Complex a, IMatrix result)
      Multiplikation from a scalar and a matrix
    • duplicate

      public IMatrix duplicate()
      Copy a matrix
    • duplicate

      public void duplicate(IMatrix result)
      Copy a matrix
    • transpose

      public IMatrix transpose()
      Transpose a matrix
    • transpose

      public void transpose(IMatrix result)
      Transpose a matrix
    • similar

      public IMatrix similar(IMatrix U)
      Similar transformation Ut * M * U
    • similar

      public void similar(IMatrix U, IMatrix result)
      Similar transformation Ut * M * U
    • contraction

      public Complex contraction()
      Calculates the contraction from a matrix
    • toString

      public String toString()
      Return a matrix as a string
      Overrides:
      toString in class Object
    • reshape

      public void reshape(int newrows, int newcolumns)
      Resize the matrix