|
|||||||||
| Home >> All >> com >> hartmath >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.hartmath.util
Class DoubleDiagonalMatrix

java.lang.Objectcom.hartmath.util.Matrix
com.hartmath.util.DoubleMatrix
com.hartmath.util.DoubleSquareMatrix
com.hartmath.util.DoubleTridiagonalMatrix
com.hartmath.util.DoubleDiagonalMatrix
- public final class DoubleDiagonalMatrix
- extends DoubleTridiagonalMatrix
The DoubleDiagonalMatrix class encapsulates diagonal matrices containing doubles.
- Version:
- 2.0
| Field Summary |
| Fields inherited from class com.hartmath.util.DoubleMatrix |
matrix |
| Constructor Summary | |
protected |
DoubleDiagonalMatrix()
Constructs a matrix. |
|
DoubleDiagonalMatrix(double[] array)
Constructs a matrix by wrapping an array containing the diagonal elements. |
|
DoubleDiagonalMatrix(double[][] array)
Constructs a matrix from an array. |
|
DoubleDiagonalMatrix(int size)
Constructs an empty matrix. |
| Method Summary | |
DoubleDiagonalMatrix |
add(DoubleDiagonalMatrix m)
Returns the addition of this matrix and another. |
DoubleMatrix |
add(DoubleMatrix m)
Returns the addition of this matrix and another. |
DoubleSquareMatrix |
add(DoubleSquareMatrix m)
Returns the addition of this matrix and another. |
DoubleTridiagonalMatrix |
add(DoubleTridiagonalMatrix m)
Returns the addition of this matrix and another. |
Matrix |
add(Matrix m)
Returns the addition of this matrix and another. |
DoubleSquareMatrix[] |
choleskyDecompose()
Returns the Cholesky decomposition of this matrix. |
int |
columns()
Returns the number of columns. |
double |
det()
Returns the determinant. |
boolean |
equals(java.lang.Object m)
Compares two double diagonal matrices for equality. |
double |
frobeniusNorm()
Returns the Frobenius norm. |
double |
getElement(int i,
int j)
Returns an element of the matrix. |
static DoubleDiagonalMatrix |
identity(int size)
Creates an identity matrix. |
double |
infNorm()
Returns the l(infinity)-norm. |
DoubleSquareMatrix |
inverse()
Returns the inverse of this matrix. |
boolean |
isSymmetric()
Returns true if this matrix is symmetric. |
boolean |
isUnitary()
Returns true if this matrix is unitary. |
DoubleSquareMatrix[] |
luDecompose()
Returns the LU decomposition of this matrix. |
DoubleMatrix |
mapElements(com.hartmath.mapping.HUnaryNumerical f)
Applies a function on all the matrix elements. |
DoubleDiagonalMatrix |
multiply(DoubleDiagonalMatrix m)
Returns the multiplication of this matrix and another. |
DoubleMatrix |
multiply(DoubleMatrix m)
Returns the multiplication of this matrix and another. |
DoubleSquareMatrix |
multiply(DoubleSquareMatrix m)
Returns the multiplication of this matrix and another. |
DoubleSquareMatrix |
multiply(DoubleTridiagonalMatrix m)
Returns the multiplication of this matrix and another. |
DoubleVector |
multiply(DoubleVector v)
Returns the multiplication of a vector by this matrix. |
Matrix |
multiply(Matrix m)
Returns the multiplication of this matrix and another. |
private DoubleMatrix |
rawAdd(DoubleMatrix m)
Description of the Method |
private DoubleSquareMatrix |
rawAdd(DoubleSquareMatrix m)
Description of the Method |
private DoubleTridiagonalMatrix |
rawAdd(DoubleTridiagonalMatrix m)
Description of the Method |
private DoubleMatrix |
rawMultiply(DoubleMatrix m)
Description of the Method |
private DoubleSquareMatrix |
rawMultiply(DoubleSquareMatrix m)
Description of the Method |
private DoubleSquareMatrix |
rawMultiply(DoubleTridiagonalMatrix m)
Description of the Method |
private DoubleMatrix |
rawSubtract(DoubleMatrix m)
Description of the Method |
private DoubleSquareMatrix |
rawSubtract(DoubleSquareMatrix m)
Description of the Method |
private DoubleTridiagonalMatrix |
rawSubtract(DoubleTridiagonalMatrix m)
Description of the Method |
int |
rows()
Returns the number of rows. |
DoubleMatrix |
scalarMultiply(double x)
Returns the multiplication of this matrix by a scalar. |
void |
setElement(int i,
int j,
double x)
Sets the value of an element of the matrix. |
DoubleDiagonalMatrix |
subtract(DoubleDiagonalMatrix m)
Returns the subtraction of this matrix by another. |
DoubleMatrix |
subtract(DoubleMatrix m)
Returns the subtraction of this matrix and another. |
DoubleSquareMatrix |
subtract(DoubleSquareMatrix m)
Returns the subtraction of this matrix and another. |
DoubleTridiagonalMatrix |
subtract(DoubleTridiagonalMatrix m)
Returns the subtraction of this matrix and another. |
Matrix |
subtract(Matrix m)
Returns the subtraction of this matrix by another. |
ComplexMatrix |
toComplexMatrix()
Converts this matrix to an integer matrix. |
double |
trace()
Returns the trace. |
Matrix |
transpose()
Returns the transpose of this matrix. |
| Methods inherited from class com.hartmath.util.DoubleTridiagonalMatrix |
toString |
| Methods inherited from class com.hartmath.util.DoubleMatrix |
finalize, hashCode, toFunction |
| Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
DoubleDiagonalMatrix
public DoubleDiagonalMatrix(int size)
- Constructs an empty matrix.
DoubleDiagonalMatrix
public DoubleDiagonalMatrix(double[][] array)
- Constructs a matrix from an array.
DoubleDiagonalMatrix
public DoubleDiagonalMatrix(double[] array)
- Constructs a matrix by wrapping an array containing the diagonal elements.
DoubleDiagonalMatrix
protected DoubleDiagonalMatrix()
- Constructs a matrix.
| Method Detail |
setElement
public void setElement(int i,
int j,
double x)
- Sets the value of an element of the matrix.
- Overrides:
setElementin classDoubleTridiagonalMatrix
getElement
public double getElement(int i,
int j)
- Returns an element of the matrix.
- Overrides:
getElementin classDoubleTridiagonalMatrix
isSymmetric
public boolean isSymmetric()
- Returns true if this matrix is symmetric.
- Overrides:
isSymmetricin classDoubleTridiagonalMatrix
isUnitary
public boolean isUnitary()
- Returns true if this matrix is unitary.
- Overrides:
isUnitaryin classDoubleSquareMatrix
equals
public boolean equals(java.lang.Object m)
- Compares two double diagonal matrices for equality.
- Overrides:
equalsin classDoubleTridiagonalMatrix
toComplexMatrix
public ComplexMatrix toComplexMatrix()
- Converts this matrix to an integer matrix.
Converts this matrix to a complex matrix.
- Overrides:
toComplexMatrixin classDoubleTridiagonalMatrix
det
public double det()
- Returns the determinant.
- Overrides:
detin classDoubleSquareMatrix
trace
public double trace()
- Returns the trace.
- Overrides:
tracein classDoubleTridiagonalMatrix
infNorm
public double infNorm()
- Returns the l(infinity)-norm.
- Overrides:
infNormin classDoubleTridiagonalMatrix
frobeniusNorm
public double frobeniusNorm()
- Returns the Frobenius norm.
- Overrides:
frobeniusNormin classDoubleTridiagonalMatrix
rows
public int rows()
- Returns the number of rows.
- Overrides:
rowsin classDoubleTridiagonalMatrix
columns
public int columns()
- Returns the number of columns.
- Overrides:
columnsin classDoubleTridiagonalMatrix
add
public Matrix add(Matrix m)
- Returns the addition of this matrix and another.
- Overrides:
addin classDoubleTridiagonalMatrix
add
public DoubleMatrix add(DoubleMatrix m)
- Returns the addition of this matrix and another.
- Overrides:
addin classDoubleTridiagonalMatrix
add
public DoubleSquareMatrix add(DoubleSquareMatrix m)
- Returns the addition of this matrix and another.
- Overrides:
addin classDoubleTridiagonalMatrix
add
public DoubleTridiagonalMatrix add(DoubleTridiagonalMatrix m)
- Returns the addition of this matrix and another.
- Overrides:
addin classDoubleTridiagonalMatrix
add
public DoubleDiagonalMatrix add(DoubleDiagonalMatrix m)
- Returns the addition of this matrix and another.
subtract
public Matrix subtract(Matrix m)
- Returns the subtraction of this matrix by another.
- Overrides:
subtractin classDoubleTridiagonalMatrix
subtract
public DoubleMatrix subtract(DoubleMatrix m)
- Returns the subtraction of this matrix and another.
- Overrides:
subtractin classDoubleTridiagonalMatrix
subtract
public DoubleSquareMatrix subtract(DoubleSquareMatrix m)
- Returns the subtraction of this matrix and another.
- Overrides:
subtractin classDoubleTridiagonalMatrix
subtract
public DoubleTridiagonalMatrix subtract(DoubleTridiagonalMatrix m)
- Returns the subtraction of this matrix and another.
- Overrides:
subtractin classDoubleTridiagonalMatrix
subtract
public DoubleDiagonalMatrix subtract(DoubleDiagonalMatrix m)
- Returns the subtraction of this matrix by another.
scalarMultiply
public DoubleMatrix scalarMultiply(double x)
- Returns the multiplication of this matrix by a scalar.
- Overrides:
scalarMultiplyin classDoubleTridiagonalMatrix
multiply
public DoubleVector multiply(DoubleVector v)
- Returns the multiplication of a vector by this matrix.
- Overrides:
multiplyin classDoubleTridiagonalMatrix
multiply
public Matrix multiply(Matrix m)
- Returns the multiplication of this matrix and another.
- Overrides:
multiplyin classDoubleTridiagonalMatrix
multiply
public DoubleMatrix multiply(DoubleMatrix m)
- Returns the multiplication of this matrix and another.
- Overrides:
multiplyin classDoubleTridiagonalMatrix
multiply
public DoubleSquareMatrix multiply(DoubleSquareMatrix m)
- Returns the multiplication of this matrix and another.
- Overrides:
multiplyin classDoubleTridiagonalMatrix
multiply
public DoubleSquareMatrix multiply(DoubleTridiagonalMatrix m)
- Returns the multiplication of this matrix and another.
- Overrides:
multiplyin classDoubleTridiagonalMatrix
multiply
public DoubleDiagonalMatrix multiply(DoubleDiagonalMatrix m)
- Returns the multiplication of this matrix and another.
inverse
public DoubleSquareMatrix inverse()
- Returns the inverse of this matrix.
- Overrides:
inversein classDoubleSquareMatrix
transpose
public Matrix transpose()
- Returns the transpose of this matrix.
- Overrides:
transposein classDoubleTridiagonalMatrix
luDecompose
public DoubleSquareMatrix[] luDecompose()
- Returns the LU decomposition of this matrix.
- Overrides:
luDecomposein classDoubleTridiagonalMatrix
choleskyDecompose
public DoubleSquareMatrix[] choleskyDecompose()
- Returns the Cholesky decomposition of this matrix. Matrix must be symmetric
and positive definite.
- Overrides:
choleskyDecomposein classDoubleTridiagonalMatrix
mapElements
public DoubleMatrix mapElements(com.hartmath.mapping.HUnaryNumerical f)
- Applies a function on all the matrix elements.
- Overrides:
mapElementsin classDoubleTridiagonalMatrix
rawAdd
private DoubleMatrix rawAdd(DoubleMatrix m)
- Description of the Method
rawAdd
private DoubleSquareMatrix rawAdd(DoubleSquareMatrix m)
- Description of the Method
rawAdd
private DoubleTridiagonalMatrix rawAdd(DoubleTridiagonalMatrix m)
- Description of the Method
rawSubtract
private DoubleMatrix rawSubtract(DoubleMatrix m)
- Description of the Method
rawSubtract
private DoubleSquareMatrix rawSubtract(DoubleSquareMatrix m)
- Description of the Method
rawSubtract
private DoubleTridiagonalMatrix rawSubtract(DoubleTridiagonalMatrix m)
- Description of the Method
rawMultiply
private DoubleMatrix rawMultiply(DoubleMatrix m)
- Description of the Method
rawMultiply
private DoubleSquareMatrix rawMultiply(DoubleSquareMatrix m)
- Description of the Method
rawMultiply
private DoubleSquareMatrix rawMultiply(DoubleTridiagonalMatrix m)
- Description of the Method
identity
public static DoubleDiagonalMatrix identity(int size)
- Creates an identity matrix.
|
|||||||||
| Home >> All >> com >> hartmath >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC