|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.mathematics.algebraic.AbstractHypermatrix
org.jscience.mathematics.algebraic.AbstractMatrix
org.jscience.mathematics.algebraic.matrices.AbstractDoubleMatrix
public abstract class AbstractDoubleMatrix
Set a submatrix.
| Constructor Summary | |
|---|---|
protected |
AbstractDoubleMatrix(int rows,
int cols)
Constructs a matrix. |
| Method Summary | |
|---|---|
AbstractDoubleMatrix |
abs()
Applies the abs function on all the matrix components. |
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(AbstractDoubleMatrix m,
double tol)
|
boolean |
equals(java.lang.Object obj)
Compares two ${nativeTyp} matrices for equality. |
double |
frobeniusNorm()
Returns the Frobenius or Hilbert-Schmidt (l2) norm. |
AbstractDoubleVector |
getColumn(int j)
Returns the ith column. |
Double |
getElement(int i,
int j)
Returns an element of the matrix. |
double[] |
getMatrixAsColumns()
Make a one-dimensional column packed copy of the internal array. |
double[] |
getMatrixAsRows()
Make a one-dimensional row packed copy of the internal array. |
abstract double |
getPrimitiveElement(int i,
int j)
Returns an element of the matrix. |
AbstractDoubleVector |
getRow(int i)
Returns the ith row. |
java.lang.Object |
getSet()
|
AbstractDoubleMatrix |
getSubMatrix(int k1,
int k2,
int k3,
int k4)
Computes a sub matrix from the parameters index. |
int |
hashCode()
Returns a hashcode for this NON EMPTY matrix. |
AbstractDoubleMatrix |
horizontalAxisSymmetry()
Invert matrix elements order from the top to the bottom. |
double |
infNorm()
Returns the l -norm. |
AbstractDoubleMatrix |
mapElements(PrimitiveMapping f)
Applies a function on all the matrix elements. |
double |
mass()
Gets the mass of the matrix components. |
double |
max()
Gets the max of the matrix components. |
double |
mean()
Gets the mean of the matrix components. |
double |
min()
Gets the min of the matrix components. |
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. |
static AbstractDoubleMatrix |
read(java.io.BufferedReader input)
Read a matrix from a stream. |
AbstractDoubleMatrix |
reverse()
Invert matrix elements order from the top to the bottom, from the right to the left. |
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. |
void |
setAllElements(double m)
Sets the value of all elements of the matrix. |
void |
setColumn(int j,
AbstractDoubleVector v)
Returns the ith column. |
abstract void |
setElement(int i,
int j,
double x)
Sets the value of an element of the matrix. |
void |
setRow(int i,
AbstractDoubleVector v)
Returns the ith row. |
AbstractDoubleMatrix |
setSubMatrix(int k,
int l,
AbstractDoubleMatrix m)
Set a sub 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 |
tensorProduct(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. |
double[][] |
toPrimitiveArray()
Projects the matrix to an array. |
java.lang.String |
toString()
Returns a string representing this matrix. |
Matrix |
transpose()
Returns the transpose of this matrix. |
AbstractDoubleMatrix |
verticalAxisSymmetry()
Invert matrix elements order from the right to the left. |
| Methods inherited from class org.jscience.mathematics.algebraic.AbstractMatrix |
|---|
getElement, getInvalidElementMsg, numColumns, numRows, print, print, print, print, toArray, toArray |
| Methods inherited from class org.jscience.mathematics.algebraic.AbstractHypermatrix |
|---|
getDimensions, numDimensions, numElements, numElements, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jscience.mathematics.algebraic.Hypermatrix |
|---|
getDimensions, numDimensions, numElements, numElements, toArray |
| Constructor Detail |
|---|
protected AbstractDoubleMatrix(int rows,
int cols)
| Method Detail |
|---|
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - a double matrixpublic boolean equals(AbstractDoubleMatrix m)
m - a double matrix
public boolean equals(AbstractDoubleMatrix m,
double tol)
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic AbstractIntegerMatrix toIntegerMatrix()
public AbstractComplexMatrix toComplexMatrix()
public abstract double getPrimitiveElement(int i,
int j)
i - row index of the elementj - column index of the element
IllegalDimensionException - If attempting to access an invalid element.
public Double getElement(int i,
int j)
i - row index of the elementj - column index of the element
IllegalDimensionException - If attempting to access an invalid element.public AbstractDoubleVector getRow(int i)
i - DOCUMENT ME!
public AbstractDoubleVector getColumn(int j)
j - DOCUMENT ME!
public void setRow(int i,
AbstractDoubleVector v)
public void setColumn(int j,
AbstractDoubleVector v)
public abstract void setElement(int i,
int j,
double x)
i - row index of the elementj - column index of the elementx - a number
IllegalDimensionException - If attempting to access an invalid element.public void setAllElements(double m)
m - a complex elementpublic final java.lang.Object getSet()
public double infNorm()
-norm.
public double frobeniusNorm()
public AbstractDoubleMatrix abs()
public double min()
public double mass()
public double max()
public double mean()
public AbelianGroup.Member negate()
public final AbelianGroup.Member add(AbelianGroup.Member m)
m - a group member
public AbstractDoubleMatrix add(AbstractDoubleMatrix m)
m - a double matrix
IllegalDimensionException - If the matrices are different sizes.public final AbelianGroup.Member subtract(AbelianGroup.Member m)
m - a group member
public AbstractDoubleMatrix subtract(AbstractDoubleMatrix m)
m - a double matrix
IllegalDimensionException - If the matrices are different sizes.public final Module.Member scalarMultiply(Ring.Member x)
x - a ring member
public AbstractDoubleMatrix scalarMultiply(double x)
x - a double.
public final VectorSpace.Member scalarDivide(Field.Member x)
x - a field member
public AbstractDoubleMatrix scalarDivide(double x)
x - a double.
public double scalarProduct(AbstractDoubleMatrix m)
m - a double matrix.
IllegalDimensionException - If the matrices are different sizes.public AbstractDoubleVector multiply(AbstractDoubleVector v)
v - a double vector.
IllegalDimensionException - If the matrix and vector are incompatible.public final Ring.Member multiply(Ring.Member m)
m - a ring member
public AbstractDoubleMatrix multiply(AbstractDoubleMatrix m)
m - a double matrix
IllegalDimensionException - If the matrices are incompatible.public AbstractDoubleMatrix directSum(AbstractDoubleMatrix m)
public AbstractDoubleMatrix tensorProduct(AbstractDoubleMatrix m)
public Matrix transpose()
public AbstractDoubleMatrix horizontalAxisSymmetry()
public AbstractDoubleMatrix verticalAxisSymmetry()
public AbstractDoubleMatrix reverse()
public AbstractDoubleMatrix getSubMatrix(int k1,
int k2,
int k3,
int k4)
k1 - the beginning rows indexk2 - the finishing rows indexk3 - the beginning columns indexk4 - the finishing columns index
public AbstractDoubleMatrix setSubMatrix(int k,
int l,
AbstractDoubleMatrix m)
k - Initial row index to offset the patching matrixl - Initial column index to offset the patching matrixm - the patching matrixpublic AbstractDoubleMatrix mapElements(PrimitiveMapping f)
f - a user-defined function
public double[][] toPrimitiveArray()
public double[] getMatrixAsRows()
public double[] getMatrixAsColumns()
public static AbstractDoubleMatrix read(java.io.BufferedReader input)
throws java.io.IOException
input - the input stream.
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||