|
|||||||||
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.SparseVector
A sparse dynamic 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 | |
SparseVector()
Creates a sparse vector with zero size. |
|
SparseVector(double[] array)
Creates a sparse vector from the contents of 'array'. |
|
SparseVector(double[] array,
double epsilon)
Creates a sparse vector from the contents of 'array'. |
|
SparseVector(int size)
Creates a sparse vector with explicit size. |
|
SparseVector(int size,
int capacityOfElements)
Creates a sparse vector with explicit size and element capacity. |
|
SparseVector(VectorI vector)
Creates a sparse vector from the contents of 'vector'. |
|
SparseVector(VectorI vector,
double epsilon)
Creates a sparse vector from the non-null elements of 'vector'. |
Method Summary | |
void |
addElement(double value)
Adds a new element to the end of the vector. |
int |
capacity()
Always returns Integer.MAX_VALUE. |
double |
elementAt(int index)
Gets an element's value from the vector. |
java.util.Enumeration |
elements()
Returns an enumeration of the non-null elements in the vector. |
double[] |
getArray()
Returns a new two-dimensional array containing the values in matrix. |
boolean |
isNull(int index)
Returns true if an element has no value associated with it. |
void |
setCapacity(int capacity)
Has no effect. |
void |
setElementAt(int index,
double value)
Sets an element's value in the vector. |
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()
The length of the vector. |
int |
sizeOfElements()
Returns the number of non-null elements in the vector. |
double |
sum(int begin)
Returns the sum of all of the elements in the subvector. |
double |
sum(int begin,
int end)
Returns the sum of all of the selected elements in the subvector. |
double |
sumOfSquaredDifferences(int begin,
double scaler)
Returns the sum the squared differences between 'scaler' and the 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)
Returns the sum of the squares of the 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,
sumOfSquaredDifferences,
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 SparseVector()
public SparseVector(int size)
public SparseVector(int size, int capacityOfElements)
public SparseVector(double[] array)
public SparseVector(double[] array, double epsilon)
public SparseVector(VectorI vector)
public SparseVector(VectorI vector, double epsilon)
Method Detail |
public void setSize(int size)
public void setCapacity(int capacity)
public void addElement(double value)
public int sizeOfElements()
public int size()
public int capacity()
public void setElements(double value)
public void setElementAt(int index, double value)
public double[] getArray()
public boolean isNull(int index)
public double elementAt(int index)
public java.util.Enumeration elements()
public double sum(int begin)
public double sum(int begin, int end)
public double sumOfSquares(int begin)
public double sumOfSquares(int begin, int end)
public double sumOfSquaredDifferences(int begin, double scaler)
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 |