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

Method Index

 o add(double)
Add a scaler to this vector.
 o divide(double)
Divide this matrix by a vector.
 o elementAt(int)
Gets an element's value from the vector.
 o elements()
Returns an enumeration of the non-null elements in the vector.
 o equals(double, double)
Returns true if two scalers are equal to within the equality fuzz.
 o getArray()
Returns the elements of the vector in a new array;
 o getEqualityFuzz()
Gets the value that is used to relax the element equality test in the equals method.
 o getNullValue()
Gets the value that is returned for any null entries in the vector.
 o isNull(int)
Returns true if an element has no value associated with it.
 o isSparse()
Returns true if the vector is sparse.
 o multiply(double)
Multiply this matrix by a vector.
 o setElement(VectorElementI)
Sets an element's value in the vector.
 o setElementAt(int, double)
Sets an element's value in the vector.
 o setEqualityFuzz(double)
Sets the value that is used to relax the element equality test in the equals method.
 o size()
The number of elements in the vector.
 o subtract(double)
Subtract a scaler from this vector.
 o sum()
Returns the sum of all of the elements in the vector.
 o sumOfSquaredDifferences(double)
Returns the sum of the squares of the differences between each element and a constant.
 o sumOfSquares()
Returns the sum of the squares of all of the elements in the vector.

Methods

 o 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.

 o 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.

 o size
 public abstract int size()
The number of elements in the vector.

 o getArray
 public abstract double[] getArray()
Returns the elements of the vector in a new array;

 o setElement
 public abstract void setElement(VectorElementI element)
Sets an element's value in the vector.

 o setElementAt
 public abstract void setElementAt(int index,
                                   double value)
Sets an element's value in the vector.

 o elementAt
 public abstract double elementAt(int index)
Gets an element's value from the vector.

 o getNullValue
 public abstract double getNullValue()
Gets the value that is returned for any null entries in the vector.

 o getEqualityFuzz
 public abstract double getEqualityFuzz()
Gets the value that is used to relax the element equality test in the equals method.

 o setEqualityFuzz
 public abstract void setEqualityFuzz(double fuzz)
Sets the value that is used to relax the element equality test in the equals method.

 o equals
 public abstract boolean equals(double a,
                                double b)
Returns true if two scalers are equal to within the equality fuzz.

 o 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
 o sum
 public abstract double sum()
Returns the sum of all of the elements in the vector. The nullValue is used for all null elements.

 o 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.

 o 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.

 o add
 public abstract void add(double s)
Add a scaler to this vector.

 o subtract
 public abstract void subtract(double s)
Subtract a scaler from this vector.

 o multiply
 public abstract void multiply(double s)
Multiply this matrix by a vector.

 o divide
 public abstract void divide(double s)
Divide this matrix by a vector.


All Packages  Class Hierarchy  This Package  Previous  Next  Index