Vector Class Template Reference

Template class for the Dakota numerical vector. More...

Inheritance diagram for Vector:

BaseVector List of all members.

Public Member Functions

 Vector ()
 Default constructor.
 Vector (size_t len)
 Constructor which takes an initial length.
 Vector (size_t len, const T &initial_val)
 Constructor which takes an initial length and an initial value.
 Vector (const Vector< T > &a)
 Copy constructor.
 Vector (const T *p, size_t len)
 Constructor which copies len entries from T*.
 ~Vector ()
 Destructor.
Vector< T > & operator= (const Vector< T > &a)
 Normal const assignment operator.
Vector< T > & operator= (const T &ival)
 Sets all elements in self to the value ival.
 operator T * () const
 Use with care!
void read (istream &s)
 Reads a Vector from an input stream.
void read (istream &s, Array< String > &label_array)
 Reads a Vector and associated label array from an input stream.
void read_partial (istream &s, size_t start_index, size_t num_items)
 Reads part of a Vector from an input stream.
void read_partial (istream &s, size_t start_index, size_t num_items, Array< String > &label_array)
 Reads part of a Vector and the corresponding labels from an input stream.
void read_tabular (istream &s)
 Reads a Vector from a tabular text input file.
void read_annotated (istream &s, Array< String > &label_array)
 input stream
void write (ostream &s) const
 Writes a Vector to an output stream.
void write (ostream &s, const Array< String > &label_array) const
 Writes a Vector and associated label array to an output stream.
void write_partial (ostream &s, size_t start_index, size_t num_items) const
 Writes part of a Vector to an output stream.
void write_partial (ostream &s, size_t start_index, size_t num_items, const Array< String > &label_array) const
 output stream
void write_aprepro (ostream &s, const Array< String > &label_array) const
 in aprepro format
void write_partial_aprepro (ostream &s, size_t start_index, size_t num_items, const Array< String > &label_array) const
 output stream in aprepro format
void write_annotated (ostream &s, const Array< String > &label_array) const
 to an output stream
void write_tabular (ostream &s) const
 Writes a Vector in tabular form to an output stream.
void write_partial_tabular (ostream &s, size_t start_index, size_t num_items) const
 Writes part of a Vector in tabular form to an output stream.
void read (BiStream &s, Array< String > &label_array)
 Reads a Vector and associated label array from a binary input stream.
void write (BoStream &s, const Array< String > &label_array) const
 Writes a Vector and associated label array to a binary output stream.
void read (MPIUnpackBuffer &s)
 Reads a Vector from a buffer after an MPI receive.
void read (MPIUnpackBuffer &s, Array< String > &label_array)
 MPI receive.
void write (MPIPackBuffer &s) const
 Writes a Vector to a buffer prior to an MPI send.
void write (MPIPackBuffer &s, const Array< String > &label_array) const
 an MPI send

Detailed Description

template<class T>
class Dakota::Vector< T >

Template class for the Dakota numerical vector.

The Dakota::Vector class is the numeric vector class. It inherits from the common vector class Dakota::BaseVector which provides the same interface for both the STL and RW vector classes. If the STL version of BaseVector is based on the valarray class then some basic vector operations such as + , * are available. This class adds functionality to read/write vectors in a variety of ways


Constructor & Destructor Documentation

Vector ( const T *  p,
size_t  len 
) [inline]

Constructor which copies len entries from T*.

Assigns size values from p into array.


Member Function Documentation

Vector< T > & operator= ( const T &  ival  )  [inline]

Sets all elements in self to the value ival.

Assigns all values of array to ival. If STL, uses the vector assign method because there is no operator=(ival).

Reimplemented from BaseVector.


The documentation for this class was generated from the following file:
Generated on Wed Nov 5 19:54:06 2008 for DAKOTA by  doxygen 1.5.1