|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--drasys.or.matrix.RealContainer | +--drasys.or.matrix.Vect | +--drasys.or.matrix.ContiguousVector
A dense resizable vector of double values.
References:
Matrix Computations (Johns Hopkins Studies in the Mathematical Sciences)
Gene H. Golub, Charles F. Van Loan (Contributor) / Paperback / Published 1996
Numerical Recipes in C : The Art of Scientific Computing
William H. Press, et al / Hardcover / Published 1993
Parallel Algorithms for Matrix Computations
K.A. Gallivan / Paperback / Published 1990
Fields inherited from class drasys.or.matrix.RealContainer |
_epsilon,
_globalEpsilon |
Constructor Summary | |
ContiguousVector()
Create an empty dense vector with size zero and capacity 10. |
|
ContiguousVector(double[] array)
Create a new dense vector and copy the contents from 'array'. |
|
ContiguousVector(double[] array,
boolean useArrayInternally)
Create a new dense vector from 'array'. |
|
ContiguousVector(int size)
Create a new dense vector with explicit size. |
|
ContiguousVector(int size,
double fill)
Create a new dense vector with explicit size and initialized to 'fill'. |
|
ContiguousVector(int size,
int capacity)
Create a new dense vector with explicit size and capacity. |
|
ContiguousVector(VectorI vector)
Create a new dense vector copying the contents of 'vector'. |
Method Summary | |
void |
addElement(double value)
Adds a new element to the end of the vector. |
int |
capacity()
Returns the number of elements the vector can hold before allocating memory. |
double |
elementAt(int index)
Returns an element's value by its index. |
java.util.Enumeration |
elements()
Returns an enumeration of the elements in the matrix. |
double[] |
getArray()
Returns a new two-dimensional array containing the values in matrix. |
int |
getBegin()
Returns the offset of the first element into the internal array. |
int |
getIncrement()
Returns the increment between elements in the internal array. |
int |
getOffset(int index)
Returns an element's offset into the value array. |
double[] |
getValueArray()
Returns the internal array which holds the values. |
boolean |
isNull(int index)
Always returns 'false'. |
void |
setCapacity(int capacity)
Insures the vector can hold 'capacity' elements without reallocating memory. |
void |
setElementAt(int index,
double value)
Sets an element's value by its index. |
void |
setElements(double value)
Sets the value of all the non-null elements. |
void |
setSize(int size)
Sets the size of the vector. |
int |
size()
Returns the number of elements in the vector. |
int |
sizeOfElements()
Returns the number of non-null elements in the vector. |
ContiguousVectorI |
subvector(int begin)
Returns a reference to the subvector. |
ContiguousVectorI |
subvector(int begin,
int end)
Returns a reference to the subvector. |
double |
sum(int begin,
int end)
Returns the sum of all of the selected elements in the subvector. |
double |
sumOfSquaredDifferences(int begin,
int end,
double scaler)
Returns the sum the squared differences between 'scaler' and the selected elements in the subvector. |
double |
sumOfSquares(int begin,
int end)
Returns the sum of the squares of the selected elements in the subvector. |
Methods inherited from class drasys.or.matrix.Vect |
equals,
equals,
setElements,
sum,
sum,
sumOfSquaredDifferences,
sumOfSquaredDifferences,
sumOfSquares,
sumOfSquares,
toString |
Methods inherited from class drasys.or.matrix.RealContainer |
equals,
getEpsilon,
getGlobalEpsilon,
setEpsilon,
setGlobalEpsilon |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public ContiguousVector()
public ContiguousVector(int size)
public ContiguousVector(int size, double fill)
public ContiguousVector(int size, int capacity)
public ContiguousVector(double[] array)
public ContiguousVector(double[] array, boolean useArrayInternally)
public ContiguousVector(VectorI vector)
Method Detail |
public void setSize(int size)
public void setCapacity(int capacity)
public boolean isNull(int index)
public double[] getArray()
public ContiguousVectorI subvector(int begin)
public ContiguousVectorI subvector(int begin, int end)
public double[] getValueArray()
public int getOffset(int index)
public int getBegin()
public int getIncrement()
public int sizeOfElements()
public int size()
public int capacity()
public void addElement(double value)
public void setElements(double value)
public void setElementAt(int index, double value)
public double elementAt(int index)
public java.util.Enumeration elements()
public double sum(int begin, int end)
public double sumOfSquares(int begin, int end)
public double sumOfSquaredDifferences(int begin, int end, double scaler)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |