All Packages Class Hierarchy This Package Previous Next Index
Interface drasys.or.linear.VectorI
- public interface VectorI
The interface used by all algorithms to access a vector of double values.
Copyright (C) 1997 by DRA Systems all rights reserved.
- See Also:
- DenseVector, SparseVector
-
add(double)
- Add a scaler to this vector.
-
divide(double)
- Divide this matrix by a vector.
-
elementAt(int)
- Gets an element's value from the vector.
-
elements()
- Returns an enumeration of the non-null elements in the vector.
-
equals(double, double)
- Returns true if two scalers are equal to within the equality fuzz.
-
getArray()
- Returns the elements of the vector in a new array;
-
getEqualityFuzz()
- Gets the value that is used to relax the element equality test in the equals method.
-
getNullValue()
- Gets the value that is returned for any null entries in the vector.
-
isNull(int)
- Returns true if an element has no value associated with it.
-
isSparse()
- Returns true if the vector is sparse.
-
multiply(double)
- Multiply this matrix by a vector.
-
setElement(VectorElementI)
- Sets an element's value in the vector.
-
setElementAt(int, double)
- Sets an element's value in the vector.
-
setEqualityFuzz(double)
- Sets the value that is used to relax the element equality test in the equals method.
-
size()
- The number of elements in the vector.
-
subtract(double)
- Subtract a scaler from this vector.
-
sum()
- Returns the sum of all of the elements in the vector.
-
sumOfSquaredDifferences(double)
- Returns the sum of the squares of the differences between each element and a constant.
-
sumOfSquares()
- Returns the sum of the squares of all of the elements in the vector.
isNull
public abstract boolean isNull(int index)
- Returns true if an element has no value associated with it.
Elements which have no value assigned return 'nullValue' when accessed.
isSparse
public abstract boolean isSparse()
- Returns true if the vector is sparse.
Sparse vectors can be traversed more efficiently with enumerations than with index addressing.
Dense matrices are accessed more efficiently by index addressing than by enumeration.
size
public abstract int size()
- The number of elements in the vector.
getArray
public abstract double[] getArray()
- Returns the elements of the vector in a new array;
setElement
public abstract void setElement(VectorElementI element)
- Sets an element's value in the vector.
setElementAt
public abstract void setElementAt(int index,
double value)
- Sets an element's value in the vector.
elementAt
public abstract double elementAt(int index)
- Gets an element's value from the vector.
getNullValue
public abstract double getNullValue()
- Gets the value that is returned for any null entries in the vector.
getEqualityFuzz
public abstract double getEqualityFuzz()
- Gets the value that is used to relax the element equality test in the equals method.
setEqualityFuzz
public abstract void setEqualityFuzz(double fuzz)
- Sets the value that is used to relax the element equality test in the equals method.
equals
public abstract boolean equals(double a,
double b)
- Returns true if two scalers are equal to within the equality fuzz.
elements
public abstract Enumeration elements()
- Returns an enumeration of the non-null elements in the vector.
The elements are enumerated in random order.
- Returns:
- an enumeration whose elements are of type VectorElementI
sum
public abstract double sum()
- Returns the sum of all of the elements in the vector.
The nullValue is used for all null elements.
sumOfSquares
public abstract double sumOfSquares()
- Returns the sum of the squares of all of the elements in the vector.
The nullValue is used for all null elements.
sumOfSquaredDifferences
public abstract double sumOfSquaredDifferences(double constant)
- Returns the sum of the squares of the differences between each element and a constant.
The nullValue is used for all null elements.
add
public abstract void add(double s)
- Add a scaler to this vector.
subtract
public abstract void subtract(double s)
- Subtract a scaler from this vector.
multiply
public abstract void multiply(double s)
- Multiply this matrix by a vector.
divide
public abstract void divide(double s)
- Divide this matrix by a vector.
All Packages Class Hierarchy This Package Previous Next Index