Package org.openscience.cdk.math
Class IMatrix
java.lang.Object
org.openscience.cdk.math.IMatrix
This class contains a complex matrix.
-
Field Summary
FieldsModifier and TypeFieldDescriptionintthe count of columns of the matrixdouble[][]the imaginary part of the contentdouble[][]the real part of the contentintthe count of rows of the matrix -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAddition from two matricesvoidAddition from two matricesCalculates the contraction from a matrixCopy a matrixvoidCopy a matrixintReturns the count of columnsintgetRows()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 matrixvoidMultiplikation from a scalar and a matrixMultiplikation from two matricesvoidMultiplikation from two matricesMultiplikation from a vector and a matrixvoidMultiplikation from a vector and a matrixvoidreshape(int newrows, int newcolumns) Resize the matrixSimilar transformation Ut * M * UvoidSimilar transformation Ut * M * USubtraktion from two matricesvoidSubtraktion from two matricestoString()Return a matrix as a stringTranspose a matrixvoidTranspose 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
-