|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object JSci.maths.matrices.Matrix JSci.maths.matrices.AbstractDoubleMatrix
The AbstractDoubleMatrix class provides an object for encapsulating double matrices.
Field Summary |
Fields inherited from class JSci.maths.matrices.Matrix |
numCols, numRows |
Constructor Summary | |
protected |
AbstractDoubleMatrix(int rows,
int cols)
Constructs a matrix. |
Method Summary | |
AbelianGroup.Member |
add(AbelianGroup.Member m)
Returns the addition of this matrix and another. |
AbstractDoubleMatrix |
add(AbstractDoubleMatrix m)
Returns the addition of this matrix and another. |
AbstractDoubleMatrix |
directSum(AbstractDoubleMatrix m)
Returns the direct sum of this matrix and another. |
boolean |
equals(AbstractDoubleMatrix m)
Compares two ${nativeTyp} matrices for equality. |
boolean |
equals(java.lang.Object obj)
Compares two ${nativeTyp} matrices for equality. |
double |
frobeniusNorm()
Returns the Frobenius or Hilbert-Schmidt (l2) norm. |
abstract double |
getElement(int i,
int j)
Returns an element of the matrix. |
int |
hashCode()
Returns a hashcode for this matrix. |
double |
infNorm()
Returns the l-norm. |
AbstractDoubleMatrix |
mapElements(Mapping f)
Applies a function on all the matrix elements. |
AbstractDoubleMatrix |
multiply(AbstractDoubleMatrix m)
Returns the multiplication of this matrix and another. |
AbstractDoubleVector |
multiply(AbstractDoubleVector v)
Returns the multiplication of a vector by this matrix. |
Ring.Member |
multiply(Ring.Member m)
Returns the multiplication of this matrix and another. |
AbelianGroup.Member |
negate()
Returns the negative of this matrix. |
AbstractDoubleMatrix |
scalarDivide(double x)
Returns the division of this matrix by a scalar. |
VectorSpace.Member |
scalarDivide(Field.Member x)
Returns the division of this matrix by a scalar. |
AbstractDoubleMatrix |
scalarMultiply(double x)
Returns the multiplication of this matrix by a scalar. |
Module.Member |
scalarMultiply(Ring.Member x)
Returns the multiplication of this matrix by a scalar. |
double |
scalarProduct(AbstractDoubleMatrix m)
Returns the scalar product of this matrix and another. |
abstract void |
setElement(int i,
int j,
double x)
Sets the value of an element of the matrix. |
AbelianGroup.Member |
subtract(AbelianGroup.Member m)
Returns the subtraction of this matrix by another. |
AbstractDoubleMatrix |
subtract(AbstractDoubleMatrix m)
Returns the subtraction of this matrix by another. |
AbstractDoubleMatrix |
tensor(AbstractDoubleMatrix m)
Returns the tensor product of this matrix and another. |
AbstractComplexMatrix |
toComplexMatrix()
Converts this matrix to a complex matrix. |
AbstractIntegerMatrix |
toIntegerMatrix()
Converts this matrix to an integer matrix. |
java.lang.String |
toString()
Returns a string representing this matrix. |
Matrix |
transpose()
Returns the transpose of this matrix. |
Methods inherited from class JSci.maths.matrices.Matrix |
columns, getInvalidElementMsg, rows |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected AbstractDoubleMatrix(int rows, int cols)
Method Detail |
public final boolean equals(java.lang.Object obj)
obj
- a double matrixpublic boolean equals(AbstractDoubleMatrix m)
public java.lang.String toString()
public int hashCode()
public AbstractIntegerMatrix toIntegerMatrix()
public AbstractComplexMatrix toComplexMatrix()
public abstract double getElement(int i, int j)
i
- row index of the elementj
- column index of the element
MatrixDimensionException
- If attempting to access an invalid element.public abstract void setElement(int i, int j, double x)
i
- row index of the elementj
- column index of the elementx
- a number
MatrixDimensionException
- If attempting to access an invalid element.public double infNorm()
public double frobeniusNorm()
public AbelianGroup.Member negate()
public final AbelianGroup.Member add(AbelianGroup.Member m)
m
- a group memberpublic AbstractDoubleMatrix add(AbstractDoubleMatrix m)
m
- a double matrix
MatrixDimensionException
- If the matrices are different sizes.public final AbelianGroup.Member subtract(AbelianGroup.Member m)
m
- a group memberpublic AbstractDoubleMatrix subtract(AbstractDoubleMatrix m)
m
- a double matrix
MatrixDimensionException
- If the matrices are different sizes.public final Module.Member scalarMultiply(Ring.Member x)
x
- a ring memberpublic AbstractDoubleMatrix scalarMultiply(double x)
x
- a double.
public final VectorSpace.Member scalarDivide(Field.Member x)
x
- a field memberpublic AbstractDoubleMatrix scalarDivide(double x)
x
- a double.
public double scalarProduct(AbstractDoubleMatrix m)
m
- a double matrix.
MatrixDimensionException
- If the matrices are different sizes.public AbstractDoubleVector multiply(AbstractDoubleVector v)
v
- a double vector.
DimensionException
- If the matrix and vector are incompatible.public final Ring.Member multiply(Ring.Member m)
m
- a ring memberpublic AbstractDoubleMatrix multiply(AbstractDoubleMatrix m)
m
- a double matrix
MatrixDimensionException
- If the matrices are incompatible.public AbstractDoubleMatrix directSum(AbstractDoubleMatrix m)
public AbstractDoubleMatrix tensor(AbstractDoubleMatrix m)
public Matrix transpose()
transpose
in class Matrix
public AbstractDoubleMatrix mapElements(Mapping f)
f
- a user-defined function
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |