Public Member Functions | |
| Array () | |
| Default constructor. | |
| Array (size_t size) | |
| Constructor which takes an initial size. | |
| Array (size_t size, const T &initial_val) | |
| Constructor which takes an initial size and an initial value. | |
| Array (const Array< T > &a) | |
| Copy constructor. | |
| Array (const T *p, size_t size) | |
| Constructor which copies size entries from T*. | |
| ~Array () | |
| Destructor. | |
| Array< T > & | operator= (const Array< T > &a) |
| Normal const assignment operator. | |
| Array< T > & | operator= (Array< T > &a) |
| Normal assignment operator. | |
| T & | operator[] (size_t i) |
| Index operator, returns the ith value of the array. | |
| const T & | operator[] (size_t i) const |
| Index operator const, returns the ith value of the array. | |
| void | read (std::istream &s) |
| Reads an Array from an std::istream. | |
| void | write (std::ostream &s) const |
| Writes an Array to an output stream. | |
| void | write (std::ostream &s, const Array< String > &label_array) const |
| Writes an Array and associated label array to an output stream. | |
| void | write_aprepro (std::ostream &s, const Array< String > &label_array) const |
| aprepro format | |
| void | write_annotated (std::ostream &s, bool write_len) const |
| Writes an Array to an output stream in annotated format. | |
| void | read (BiStream &s) |
| Reads an Array from a binary input stream. | |
| void | write (BoStream &s) const |
| Writes an Array to a binary output stream. | |
| void | read (MPIUnpackBuffer &s) |
| Reads an Array from a buffer after an MPI receive. | |
| void | write (MPIPackBuffer &s) const |
| Writes an Array to a buffer prior to an MPI send. | |
| size_t | length () const |
| Returns size of array. | |
| void | reshape (size_t sz) |
| Resizes array to size sz. | |
An array class template that provides additional functionality that is specific to Dakota's needs. The Array class adds additional functionality needed by Dakota to the inherited base (i.e. std::vector) class.
| Array | ( | const T * | p, | |
| size_t | size | |||
| ) | [inline] |
Constructor which copies size entries from T*.
Assigns size values from p into array.
| T & operator[] | ( | size_t | i | ) | [inline] |
Index operator, returns the ith value of the array.
Index operator; calls the STL method at() which is bounds checked, but only when '--enable-debug' is specified during configuration.
| const T & operator[] | ( | size_t | i | ) | const [inline] |
Index operator const, returns the ith value of the array.
A const version of the index operator; calls the STL method at() which is bounds checked if building a debug executable.
1.4.7