Package org.openscience.cdk.math
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 Summary
Fields Modifier and Type Field Description int
columns
the count of columns of the matrixdouble[][]
imagmatrix
the imaginary part of the contentdouble[][]
realmatrix
the real part of the contentint
rows
the count of rows of the matrix
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IMatrix
add(IMatrix b)
Addition from two matricesvoid
add(IMatrix b, IMatrix result)
Addition from two matricesComplex
contraction()
Calculates the contraction from a matrixIMatrix
duplicate()
Copy a matrixvoid
duplicate(IMatrix result)
Copy a matrixint
getColumns()
Returns the count of columnsint
getRows()
Returns the count of rowsIVector
getVectorFromColumn(int index)
Creates a vector with the content of a column from this matrixIVector
getVectorFromDiagonal()
Creates a vector with the content of the diagonal elements from this matrixIVector
getVectorFromRow(int index)
Creates a vector with the content of a row from this matrixIMatrix
mul(Complex a)
Multiplikation from a scalar and a matrixvoid
mul(Complex a, IMatrix result)
Multiplikation from a scalar and a matrixIMatrix
mul(IMatrix b)
Multiplikation from two matricesvoid
mul(IMatrix b, IMatrix result)
Multiplikation from two matricesIVector
mul(IVector a)
Multiplikation from a vector and a matrixvoid
mul(IVector a, IVector result)
Multiplikation from a vector and a matrixvoid
reshape(int newrows, int newcolumns)
Resize the matrixIMatrix
similar(IMatrix U)
Similar transformation Ut * M * Uvoid
similar(IMatrix U, IMatrix result)
Similar transformation Ut * M * UIMatrix
sub(IMatrix b)
Subtraktion from two matricesvoid
sub(IMatrix b, IMatrix result)
Subtraktion from two matricesString
toString()
Return a matrix as a stringIMatrix
transpose()
Transpose a matrixvoid
transpose(IMatrix result)
Transpose a matrix
-
-
-
Constructor Detail
-
IMatrix
public IMatrix(int rows, int columns)
Creates a complex matrix
-
IMatrix
public IMatrix(Matrix m)
Creates a complex copy of a matrix
-
-
Method Detail
-
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
-
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
-
contraction
public Complex contraction()
Calculates the contraction from a matrix
-
reshape
public void reshape(int newrows, int newcolumns)
Resize the matrix
-
-