Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
Matrix(double[][] array)
Creates a Matrix with content of an array.
|
Matrix(int rows,
int columns)
Creates a new Matrix.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public double[][] matrix
public int rows
public int columns
public Matrix(int rows, int columns)
public Matrix(double[][] array)
public int getRows()
public int getColumns()
public Vector getVectorFromRow(int index)
public Vector getVectorFromColumn(int index)
public Vector getVectorFromDiagonal()
public Matrix mul(double a)
public Matrix duplicate()
public Matrix transpose()
public double contraction()
public Matrix diagonalize(int nrot)
nrot
- Count of max. rotationspublic static Vector elimination(Matrix matrix, Vector vector)
public Matrix orthonormalize(Matrix S)
Copyright © 2017. All Rights Reserved.