drasys.or.matrix
Class Vect

java.lang.Object
  |
  +--drasys.or.matrix.RealContainer
        |
        +--drasys.or.matrix.Vect
Direct Known Subclasses:
ContiguousVector, SparseVector

public abstract class Vect
extends RealContainer
implements VectorI, java.io.Serializable

Abstract base class for vectors.

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

See Also:
Serialized Form

Fields inherited from class drasys.or.matrix.RealContainer
_epsilon, _globalEpsilon
 
Constructor Summary
Vect()
           
Vect(double epsilon)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 boolean equals(VectorI vector)
          Returns true if the vectors are numerically equal.
 void setElements(VectorI values)
          Sets the value of the elements from the non-null values in 'values'.
 double sum()
          Returns the sum of the elements in the vector.
 double sum(int begin)
          Returns the sum of the elements in the subvector.
 double sumOfSquaredDifferences(double scaler)
          Returns the sum the squared differences between 'scaler' and the elements in the vector.
 double sumOfSquaredDifferences(int begin, double scaler)
          Returns the sum the squared differences between 'scaler' and the elements in the subvector.
 double sumOfSquares()
          Returns the sum of the squares of the elements in the vector.
 double sumOfSquares(int begin)
          Returns the sum of the squares of the elements in the subvector.
 java.lang.String 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

Vect

public Vect()

Vect

public Vect(double epsilon)
Method Detail

setElements

public void setElements(VectorI values)
Sets the value of the elements from the non-null values in 'values'. Elements corresponding to null elements in 'values' are not changed.
Specified by:
setElements in interface VectorI

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

equals

public boolean equals(VectorI vector)
Returns true if the vectors are numerically equal. To be numerically equal the vectors must be the same size and all the elements must be equal to within this vector's 'epsilon'. All null elements have a value of zero for the comparison.
Specified by:
equals in interface VectorI

sum

public double sum()
Returns the sum of the elements in the vector.
Specified by:
sum in interface VectorI

sumOfSquares

public double sumOfSquares()
Returns the sum of the squares of the elements in the vector.
Specified by:
sumOfSquares in interface VectorI

sumOfSquaredDifferences

public double sumOfSquaredDifferences(double scaler)
Returns the sum the squared differences between 'scaler' and the elements in the vector.
Specified by:
sumOfSquaredDifferences in interface VectorI

sum

public double sum(int begin)
Returns the sum of the elements in the subvector.
Specified by:
sum in interface VectorI

sumOfSquares

public double sumOfSquares(int begin)
Returns the sum of the squares of the elements in the subvector.
Specified by:
sumOfSquares in interface VectorI

sumOfSquaredDifferences

public double sumOfSquaredDifferences(int begin,
                                      double scaler)
Returns the sum the squared differences between 'scaler' and the elements in the subvector.
Specified by:
sumOfSquaredDifferences in interface VectorI

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright(C)1997-2000 by DRA Systems all rights reserved. OpsResearch.com