Package org.openscience.cdk.math
Class IMatrix
java.lang.Object
org.openscience.cdk.math.IMatrix
This class contains a complex matrix.
- Belongs to CDK module:
- qm
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
the count of columns of the matrixdouble[][]
the imaginary part of the contentdouble[][]
the real part of the contentint
the count of rows of the matrix -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAddition from two matricesvoid
Addition from two matricesCalculates the contraction from a matrixCopy a matrixvoid
Copy a matrixint
Returns the count of columnsint
getRows()
Returns the count of rowsgetVectorFromColumn
(int index) Creates a vector with the content of a column from this matrixCreates a vector with the content of the diagonal elements from this matrixgetVectorFromRow
(int index) Creates a vector with the content of a row from this matrixMultiplikation from a scalar and a matrixvoid
Multiplikation from a scalar and a matrixMultiplikation from two matricesvoid
Multiplikation from two matricesMultiplikation from a vector and a matrixvoid
Multiplikation from a vector and a matrixvoid
reshape
(int newrows, int newcolumns) Resize the matrixSimilar transformation Ut * M * Uvoid
Similar transformation Ut * M * USubtraktion from two matricesvoid
Subtraktion from two matricestoString()
Return a matrix as a stringTranspose a matrixvoid
Transpose a matrix
-
Field Details
-
realmatrix
public double[][] realmatrixthe real part of the content -
imagmatrix
public double[][] imagmatrixthe imaginary part of the content -
rows
public int rowsthe count of rows of the matrix -
columns
public int columnsthe count of columns of the matrix
-
-
Constructor Details
-
IMatrix
public IMatrix(int rows, int columns) Creates a complex matrix -
IMatrix
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
Creates a vector with the content of a row from this matrix -
getVectorFromColumn
Creates a vector with the content of a column from this matrix -
getVectorFromDiagonal
Creates a vector with the content of the diagonal elements from this matrix -
add
Addition from two matrices -
add
Addition from two matrices -
sub
Subtraktion from two matrices -
sub
Subtraktion from two matrices -
mul
Multiplikation from two matrices -
mul
Multiplikation from two matrices -
mul
Multiplikation from a vector and a matrix -
mul
Multiplikation from a vector and a matrix -
mul
Multiplikation from a scalar and a matrix -
mul
Multiplikation from a scalar and a matrix -
duplicate
Copy a matrix -
duplicate
Copy a matrix -
transpose
Transpose a matrix -
transpose
Transpose a matrix -
similar
Similar transformation Ut * M * U -
similar
Similar transformation Ut * M * U -
contraction
Calculates the contraction from a matrix -
toString
Return a matrix as a string -
reshape
public void reshape(int newrows, int newcolumns) Resize the matrix
-