heasarc.util
Class DoubleVector

java.lang.Object
  |
  +--heasarc.util.DoubleVector

public class DoubleVector
extends java.lang.Object

This class is a simple implementation of a 'Vector' class for doubles. However, the only functions supported are adding an element to the end of the vector, and transforming the vector into an array. This is intended to support applications where an vector will be grown until it's final size is known at which point it can be treated as a standard array.


Constructor Summary
DoubleVector()
          Default size
DoubleVector(int size)
          User specified initial size
 
Method Summary
 void add(double val)
          Add an element to the vector.
 double[] toArray()
          Convert the vector to an array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleVector

public DoubleVector()
Default size

DoubleVector

public DoubleVector(int size)
User specified initial size
Method Detail

add

public void add(double val)
Add an element to the vector.

toArray

public double[] toArray()
Convert the vector to an array