|
|||||||||
| 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
public abstract class AbstractMatrix
The Matrix superclass provides an abstract encapsulation for traditional 2D matrices. Concrete implementations of this class should implement additional interfaces. See subclasses.
| Constructor Summary | |
|---|---|
AbstractMatrix(int rows,
int cols)
Constructs a matrix. |
|
| Method Summary | |
|---|---|
java.lang.Number |
getElement(int[] position)
Returns the element at position given by the array of int. |
protected static java.lang.String |
getInvalidElementMsg(int i,
int j)
Returns an "invalid element" error message. |
int |
numColumns()
Returns the number of columns. |
int |
numRows()
Returns the number of rows. |
void |
print(int w,
int d)
Print the matrix to stdout. |
void |
print(java.text.NumberFormat format,
int width)
Print the matrix to stdout. |
void |
print(java.io.PrintWriter output,
int w,
int d)
Print the matrix to the output stream. |
void |
print(java.io.PrintWriter output,
java.text.NumberFormat format,
int width)
Print the matrix to the output stream. |
java.lang.Object |
toArray()
Converts an hypermatrix to an array of n dimensions |
java.lang.Number[][] |
toArray(Matrix v)
Converts a matrix to an array. |
| Methods inherited from class org.jscience.mathematics.algebraic.AbstractHypermatrix |
|---|
getDimensions, numDimensions, numElements, numElements, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jscience.mathematics.algebraic.Matrix |
|---|
getColumn, getElement, getRow, transpose |
| Methods inherited from interface org.jscience.mathematics.algebraic.Hypermatrix |
|---|
getDimensions, numDimensions, numElements, numElements, toArray |
| Methods inherited from interface org.jscience.mathematics.algebraic.modules.VectorSpace.Member |
|---|
scalarDivide |
| Methods inherited from interface org.jscience.mathematics.algebraic.modules.Module.Member |
|---|
scalarMultiply |
| Methods inherited from interface org.jscience.mathematics.algebraic.groups.AbelianGroup.Member |
|---|
add, negate, subtract |
| Methods inherited from interface org.jscience.mathematics.algebraic.fields.Ring.Member |
|---|
multiply |
| Constructor Detail |
|---|
public AbstractMatrix(int rows,
int cols)
| Method Detail |
|---|
public final int numRows()
numRows in interface Matrixpublic final int numColumns()
numColumns in interface Matrix
public final java.lang.Number getElement(int[] position)
throws IllegalDimensionException
getElement in interface HypermatrixgetElement in class AbstractHypermatrixposition - DOCUMENT ME!
IllegalDimensionException - DOCUMENT ME!public java.lang.Object toArray()
AbstractHypermatrix
toArray in interface HypermatrixtoArray in class AbstractHypermatrixpublic java.lang.Number[][] toArray(Matrix v)
toArray in interface Matrixv - DOCUMENT ME!
protected static java.lang.String getInvalidElementMsg(int i,
int j)
i - row index of the elementj - column index of the element
public void print(int w,
int d)
w - Column width.d - Number of digits after the decimal.
public void print(java.io.PrintWriter output,
int w,
int d)
output - Output stream.w - Column width.d - Number of digits after the decimal.
public void print(java.text.NumberFormat format,
int width)
format - A Formatting object for individual elements.width - Field width for each column.DecimalFormat.setDecimalFormatSymbols(java.text.DecimalFormatSymbols)
public void print(java.io.PrintWriter output,
java.text.NumberFormat format,
int width)
output - the output stream.format - A formatting object to format the matrix elementswidth - Column width.DecimalFormat.setDecimalFormatSymbols(java.text.DecimalFormatSymbols)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||