|
|||||||||
| 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.AbstractIntegerMatrix
public abstract class AbstractIntegerMatrix
The AbstractIntegerMatrix class provides an object for encapsulating integer matrices.
| Constructor Summary | |
|---|---|
protected |
AbstractIntegerMatrix(int rows,
int cols)
Constructs a matrix. |
| Method Summary | |
|---|---|
AbstractIntegerMatrix |
abs()
Applies the abs function on all the matrix components. |
AbelianGroup.Member |
add(AbelianGroup.Member m)
Returns the addition of this matrix and another. |
AbstractIntegerMatrix |
add(AbstractIntegerMatrix m)
Returns the addition of this matrix and another. |
AbstractIntegerMatrix |
directSum(AbstractIntegerMatrix m)
Returns the direct sum of this matrix and another. |
boolean |
equals(AbstractIntegerMatrix m)
Compares two ${nativeTyp} matrices for equality. |
boolean |
equals(AbstractIntegerMatrix 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. |
AbstractIntegerVector |
getColumn(int j)
Returns the ith column. |
Integer |
getElement(int i,
int j)
Returns an element of the matrix. |
int[] |
getMatrixAsColumns()
Make a one-dimensional column packed copy of the internal array. |
int[] |
getMatrixAsRows()
Make a one-dimensional row packed copy of the internal array. |
abstract int |
getPrimitiveElement(int i,
int j)
Returns an element of the matrix. |
AbstractIntegerVector |
getRow(int i)
Returns the ith row. |
java.lang.Object |
getSet()
|
AbstractIntegerMatrix |
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. |
AbstractIntegerMatrix |
horizontalAxisSymmetry()
Invert matrix elements order from the top to the bottom. |
int |
infNorm()
Returns the l -norm. |
AbstractDoubleMatrix |
mapElements(PrimitiveMapping f)
Applies a function on all the matrix elements. |
int |
mass()
Gets the mass of the matrix components. |
int |
max()
Gets the max of the matrix components. |
double |
mean()
Gets the mean of the matrix components. |
int |
min()
Gets the min of the matrix components. |
AbstractIntegerMatrix |
multiply(AbstractIntegerMatrix m)
Returns the multiplication of this matrix and another. |
AbstractIntegerVector |
multiply(AbstractIntegerVector 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 AbstractIntegerMatrix |
read(java.io.BufferedReader input)
Read a matrix from a stream. |
AbstractIntegerMatrix |
reverse()
Invert matrix elements order from the top to the bottom, from the right to the left. |
VectorSpace.Member |
scalarDivide(Field.Member x)
Returns the division of this matrix by a scalar. |
AbstractIntegerMatrix |
scalarMultiply(int 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. |
int |
scalarProduct(AbstractIntegerMatrix m)
Returns the scalar product of this matrix and another. |
void |
setAllElements(int m)
Sets the value of all elements of the matrix. |
void |
setColumn(int j,
AbstractIntegerVector v)
Returns the ith column. |
abstract void |
setElement(int i,
int j,
int x)
Sets the value of an element of the matrix. |
void |
setRow(int i,
AbstractIntegerVector v)
Returns the ith row. |
AbstractIntegerMatrix |
setSubMatrix(int k,
int l,
AbstractIntegerMatrix m)
Set a sub matrix. |
AbelianGroup.Member |
subtract(AbelianGroup.Member m)
Returns the subtraction of this matrix by another. |
AbstractIntegerMatrix |
subtract(AbstractIntegerMatrix m)
Returns the subtraction of this matrix by another. |
AbstractIntegerMatrix |
tensorProduct(AbstractIntegerMatrix m)
Returns the tensor product of this matrix and another. |
AbstractComplexMatrix |
toComplexMatrix()
Converts this matrix to a complex matrix. |
AbstractDoubleMatrix |
toDoubleMatrix()
Converts this matrix to a double matrix. |
int[][] |
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. |
AbstractIntegerMatrix |
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 AbstractIntegerMatrix(int rows,
int cols)
| Method Detail |
|---|
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - a int matrixpublic boolean equals(AbstractIntegerMatrix m)
m - a double matrix
public boolean equals(AbstractIntegerMatrix m,
double tol)
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic AbstractDoubleMatrix toDoubleMatrix()
public AbstractComplexMatrix toComplexMatrix()
public abstract int 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 Integer 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 AbstractIntegerVector getRow(int i)
i - DOCUMENT ME!
public AbstractIntegerVector getColumn(int j)
j - DOCUMENT ME!
public void setRow(int i,
AbstractIntegerVector v)
public void setColumn(int j,
AbstractIntegerVector v)
public abstract void setElement(int i,
int j,
int 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(int m)
m - a complex elementpublic final java.lang.Object getSet()
public int infNorm()
-norm.
public double frobeniusNorm()
public AbstractIntegerMatrix abs()
public int min()
public int mass()
public int max()
public double mean()
public AbelianGroup.Member negate()
public final AbelianGroup.Member add(AbelianGroup.Member m)
m - a group member
public AbstractIntegerMatrix add(AbstractIntegerMatrix m)
m - a int matrix
IllegalDimensionException - If the matrices are different sizes.public final AbelianGroup.Member subtract(AbelianGroup.Member m)
m - a group member
public AbstractIntegerMatrix subtract(AbstractIntegerMatrix m)
m - a int matrix
IllegalDimensionException - If the matrices are different sizes.public final Module.Member scalarMultiply(Ring.Member x)
x - a ring member
public AbstractIntegerMatrix scalarMultiply(int x)
x - a int.
public final VectorSpace.Member scalarDivide(Field.Member x)
x - a field member
public int scalarProduct(AbstractIntegerMatrix m)
m - a int matrix.
IllegalDimensionException - If the matrices are different sizes.public AbstractIntegerVector multiply(AbstractIntegerVector v)
v - a int vector.
IllegalDimensionException - If the matrix and vector are incompatible.public final Ring.Member multiply(Ring.Member m)
m - a ring member
public AbstractIntegerMatrix multiply(AbstractIntegerMatrix m)
m - a int matrix
IllegalDimensionException - If the matrices are incompatible.public AbstractIntegerMatrix directSum(AbstractIntegerMatrix m)
public AbstractIntegerMatrix tensorProduct(AbstractIntegerMatrix m)
public Matrix transpose()
public AbstractIntegerMatrix horizontalAxisSymmetry()
public AbstractIntegerMatrix verticalAxisSymmetry()
public AbstractIntegerMatrix reverse()
public AbstractIntegerMatrix 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 AbstractIntegerMatrix setSubMatrix(int k,
int l,
AbstractIntegerMatrix 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 int[][] toPrimitiveArray()
public int[] getMatrixAsRows()
public int[] getMatrixAsColumns()
public static AbstractIntegerMatrix 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 | ||||||||