|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openscience.cdk.math.Matrix
public class Matrix
This class contains a matrix.
| Field Summary | |
|---|---|
int |
columns
the number of columns of this matrix |
double[][] |
matrix
the content of this matrix |
int |
rows
the number of rows of this matrix |
| Constructor Summary | |
|---|---|
Matrix(double[][] array)
Creates a Matrix with content of an array. |
|
Matrix(int rows,
int columns)
Creates a new Matrix. |
|
| Method Summary | |
|---|---|
Matrix |
add(Matrix b)
Adds two matrices. |
double |
contraction()
|
Matrix |
diagonalize(int nrot)
Diagonalize this matrix with the Jacobi algorithm. |
Matrix |
duplicate()
Copies a matrix. |
static Vector |
elimination(Matrix matrix,
Vector vector)
Solves a linear equation system with Gauss elimination. |
int |
getColumns()
Returns the number of columns. |
int |
getRows()
Returns the number of rows. |
Vector |
getVectorFromColumn(int index)
Creates a Vector with the content of a column from this Matrix. |
Vector |
getVectorFromDiagonal()
Creates a Vector with the content of the diagonal elements from this Matrix. |
Vector |
getVectorFromRow(int index)
Creates a Vector with the content of a row from this Matrix. |
Matrix |
mul(double a)
Multiplies a scalar with this Matrix. |
Matrix |
mul(Matrix b)
Multiplies this Matrix with another one. |
Vector |
mul(Vector a)
Multiplies a Vector with this Matrix. |
Matrix |
normalize(Matrix S)
Normalizes the vectors of this matrix. |
Matrix |
orthonormalize(Matrix S)
Orthonormalize the vectors of this matrix by Gram-Schmidt. |
Matrix |
similar(Matrix U)
Similar transformation Ut * M * U |
Matrix |
sub(Matrix b)
Subtracts from two matrices. |
String |
toString()
Return a matrix as a String. |
Matrix |
transpose()
Transposes a matrix. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public double[][] matrix
public int rows
public int columns
| Constructor Detail |
|---|
public Matrix(int rows,
int columns)
public Matrix(double[][] array)
| Method Detail |
|---|
public int getRows()
public int getColumns()
public Vector getVectorFromRow(int index)
public Vector getVectorFromColumn(int index)
public Vector getVectorFromDiagonal()
public Matrix add(Matrix b)
public Matrix sub(Matrix b)
public Matrix mul(Matrix b)
public Vector mul(Vector a)
public Matrix mul(double a)
public Matrix duplicate()
public Matrix transpose()
public Matrix similar(Matrix U)
public double contraction()
public String toString()
toString in class Objectpublic Matrix diagonalize(int nrot)
nrot - Count of max. rotations
public static Vector elimination(Matrix matrix,
Vector vector)
public Matrix orthonormalize(Matrix S)
public Matrix normalize(Matrix S)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||