|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.mathematics.algebraic.AbstractHypermatrix
public abstract class AbstractHypermatrix
The Hypermatrix superclass provides an abstract encapsulation for extended matrices. Hypermatrices are also known as MultiArrays. You should be aware when using this class that it is very computationally intensive. First it uses Java data structures that are not really optimized for this sort of task. Then there is additional error checking to ensure you use it the right way. Furthermore there is of course a real temptation to use many dimensions. Please recall that 10 elements in 10 dimensions is 10 power 10 total elements, therefore more than your system is probably able to handle.
| Constructor Summary | |
|---|---|
AbstractHypermatrix(int[] dimensions)
Constructs an hypermatrix. |
|
| Method Summary | |
|---|---|
int[] |
getDimensions()
Returns the array of dimensions. |
abstract java.lang.Number |
getElement(int[] position)
Returns the element at position given by the array of int. |
int |
numDimensions()
Returns the number of dimensions. |
int |
numElements()
Returns the total number of elements. |
int |
numElements(int i)
Returns the number of elements for the given dimension. |
java.lang.Object |
toArray()
Converts an hypermatrix to an array of n dimensions |
java.lang.Object |
toArray(Hypermatrix m)
Converts an hypermatrix to an array of n dimensions |
| 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.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 AbstractHypermatrix(int[] dimensions)
dimensions - DOCUMENT ME!
IllegalDimensionException - DOCUMENT ME!| Method Detail |
|---|
public final int numDimensions()
numDimensions in interface Hypermatrixpublic final int[] getDimensions()
getDimensions in interface Hypermatrixpublic final int numElements(int i)
numElements in interface Hypermatrixi - DOCUMENT ME!
public final int numElements()
numElements in interface Hypermatrix
public abstract java.lang.Number getElement(int[] position)
throws IllegalDimensionException
getElement in interface Hypermatrixposition - DOCUMENT ME!
IllegalDimensionException - DOCUMENT ME!public java.lang.Object toArray()
toArray in interface Hypermatrixpublic java.lang.Object toArray(Hypermatrix m)
toArray in interface Hypermatrixm - DOCUMENT ME!
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||