#include <NumArray.h>
Inheritance diagram for NumArray::

Public Methods | |
| NumArray () | |
| Empty constructor. | |
| NumArray (const size_type len, T *d=((T *) 0), const EnumDataOwned o=DataNotOwned) | |
| Constructor that initializes the length and possibly data. More... | |
| NumArray (const NumArray &array) | |
| Copy constructor. | |
| ~NumArray () | |
| Default destructor. | |
| NumArray< T > & | operator= (const NumArray< T > &array) |
| Copies the array object by constructing a new NumArray. | |
| NumArray< T > & | operator= (const T &array) |
| Set all elements of the array to val. | |
| void | plus (const NumArray< T > &x, const NumArray< T > &y) |
| Sets the array equal to the pair-wise value x + y. | |
| void | minus (const NumArray< T > &x, const NumArray< T > &y) |
| Sets the array equal to the pair-wise value x - y. | |
| void | times (const NumArray< T > &x, const NumArray< T > &y) |
| Sets the array equal to the pair-wise value x * y. | |
| void | divide (const NumArray< T > &x, const NumArray< T > &y) |
| Sets the array equal to the pair-wise value x / y. | |
| void | plus (const NumArray< T > &x, const T &z) |
| Sets the array equal to the value x[i] + z. | |
| void | minus (const NumArray< T > &x, const T &z) |
| Sets the array equal to the value x[i] - z. | |
| void | times (const NumArray< T > &x, const T &z) |
| Sets the array equal to the value x[i] * z. | |
| void | divide (const NumArray< T > &x, const T &z) |
| Sets the array equal to the value x[i] / z. | |
| NumArray< T > | operator- () |
| Changes the sign of elements in the array. | |
| NumArray< T > & | operator+= (const NumArray< T > &x) |
| Adds the values of x elementwise to the current array. | |
| NumArray< T > & | operator-= (const NumArray< T > &x) |
| Subtracts the values of x elementw to the current array.ise. | |
| NumArray< T > & | operator *= (const NumArray< T > &x) |
| Multiplies the values of x elementwise to the current array. | |
| NumArray< T > & | operator/= (const NumArray< T > &x) |
| Divides the values of x elementwise to the current array. | |
| NumArray< T > & | operator+= (const T &z) |
| Adds z to the elements of the current array. | |
| NumArray< T > & | operator-= (const T &z) |
| Subtracts z to the elements of the current array. | |
| NumArray< T > & | operator *= (const T &z) |
| Multiplies z to the elements of the current array. | |
| NumArray< T > & | operator/= (const T &z) |
| Divides z to the elements of the current array. | |
Protected Methods | |
| void | initialize (T *data, const size_type start, const size_type stop) |
| Initializes the array to zero from start to stop. | |
Private Attributes | |
| friend | Num2DArray<T> |
NumArray extends the definition of SimpleArray to include numerical vector operations.
|
||||||||||||||||||||
|
Constructor that initializes the length and possibly data. The len parameter specifies the length of the array. If the d parameter is null, then the array is initialized to have a zero value. Otherwise, this array is assumed to have length len. The initialization of the array then depends upon the value of the o parameter. If o is DataNotOwned (the default), then the data is copied from d. Otherwise, the internal point is set to d and the internal ownership flag is set to o. |