![]() |
Gowdy solver
|
A vector (or an array) of elements. More...
#include <matrix.h>
Public Types | |
typedef T | value_type |
Makes T available externally. | |
Public Member Functions | |
Vector () | |
Constructs the empty vector. | |
~Vector () | |
Destructs the vector, freeing allocated resources. | |
Vector (Int n) | |
Constructs the zero-based vector. | |
Vector (Int n, const T &c) | |
Constructs the vector initialized to a constant value. | |
Vector (Int n, const T *ap) | |
Constructs the vector from an array. | |
Vector (const Vector< T > &rhs) | |
Vector< T > & | operator= (const Vector< T > &rhs) |
Assigns an existing vector. | |
T & | operator[] (const Int i) |
const T & | operator[] (const Int i) const |
Int | size () const |
Returns the size. | |
void | resize (Int newn) |
Resize the array. | |
void | assign (Int newn, const T &c) |
Resize and assign a constant value. | |
Private Attributes | |
Int | nn |
The size of the array. The upper index is nn-1 . | |
T * | v |
The elements of the array. |
A vector (or an array) of elements.
typedef T Vector< T >::value_type |
Assigns an existing vector.
Postcondition: normal assignment via copying has been performed; if vector and rhs were different sizes, vector has been resized to match the size of rhs.
Definition at line 107 of file matrix.h.
{ assertBounds( i >= 0 && i < nn, "Vector subscript out of bounds" ); return v[i]; }
Definition at line 113 of file matrix.h.
{ assertBounds( i >= 0 && i < nn, "Vector subscript out of bounds" ); return v[i]; }
The size of the array. The upper index is nn-1
.
Definition at line 25 of file matrix.h.
Referenced by Vector< Real >::assign(), Vector< Real >::operator=(), Vector< Real >::operator[](), Vector< Real >::resize(), Vector< Real >::size(), and Vector< Real >::Vector().
The elements of the array.
Definition at line 26 of file matrix.h.
Referenced by Vector< Real >::assign(), Vector< Real >::operator=(), Vector< Real >::operator[](), Vector< Real >::resize(), Vector< Real >::Vector(), and Vector< Real >::~Vector().