|
|||||||||
| 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.AbstractVector
public abstract class AbstractVector
The Vector superclass provides an abstract encapsulation for vectors. Vectors are basically a matrix with 1 column. Concrete implementations of this class should implement additional interfaces. See subclasses.
| Constructor Summary | |
|---|---|
AbstractVector(int n)
Constructs a mathematical vector. |
|
| Method Summary | |
|---|---|
int |
getDimension()
Returns the vector's dimension. |
abstract java.lang.Number |
getElement(int i)
Returns the element at position i,j. |
java.lang.Number |
getElement(int i,
int j)
Returns the element at position i. |
protected static java.lang.String |
getInvalidElementMsg(int i)
Returns an "invalid element" error message. |
java.lang.Object |
toArray()
public AbstractVector getColumn(int j) { if (j==1) { return this; } else throw new IllegalDimensionException("Requested element out of bounds."); } |
java.lang.Number[] |
toArray(Vector v)
Converts a vector to an array. |
| Methods inherited from class org.jscience.mathematics.algebraic.AbstractMatrix |
|---|
getElement, getInvalidElementMsg, numColumns, numRows, print, print, print, print, toArray |
| 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, getRow, numColumns, numRows, toArray, transpose |
| Methods inherited from interface org.jscience.mathematics.algebraic.Hypermatrix |
|---|
getDimensions, getElement, numDimensions, numElements, numElements, toArray |
| 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.modules.VectorSpace.Member |
|---|
scalarDivide |
| Methods inherited from interface org.jscience.mathematics.algebraic.fields.Ring.Member |
|---|
multiply |
| Constructor Detail |
|---|
public AbstractVector(int n)
n - the dimension of the vector.| Method Detail |
|---|
public final int getDimension()
getDimension in interface Vector
public abstract java.lang.Number getElement(int i)
throws IllegalDimensionException
getElement in interface Vectori - DOCUMENT ME!
IllegalDimensionException - DOCUMENT ME!
public final java.lang.Number getElement(int i,
int j)
throws IllegalDimensionException
getElement in interface Matrixi - DOCUMENT ME!j - DOCUMENT ME!
IllegalDimensionException - DOCUMENT ME!public java.lang.Object toArray()
toArray in interface HypermatrixtoArray in class AbstractMatrixpublic java.lang.Number[] toArray(Vector v)
toArray in interface Vectorv - DOCUMENT ME!
protected static java.lang.String getInvalidElementMsg(int i)
i - row index of the element
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||