|
| | Array1D () |
| | Default constructor, which does not allocate any memory.
|
| |
| | Array1D (const int &nx) |
| | Constructor that allocates the memory.
|
| |
| | Array1D (const int &nx, const int &t) |
| | Constructor that allocates and initializes the data to a value t.
|
| |
| Array1D & | operator= (const Array1D &obj) |
| | Assignment operator copies the data structure by value.
|
| |
| | Array1D (const Array1D &obj) |
| | Copy constructor.
|
| |
| | ~Array1D () |
| | Destructor that frees up the memory.
|
| |
| void | Clear () |
| | Function to clear the memory.
|
| |
| int | XSize () const |
| | Returns size in the x-direction.
|
| |
| int | Length () const |
| | Returns length (i.e. size in the x-direction)
|
| |
| void | Resize (const int &nx) |
| | Resizes the array.
|
| |
| void | Resize (const int &nx, const int &t) |
| | Resizes the array and sets ALL entries to the specified value.
|
| |
| void | SetValue (const int &t) |
| | Set all values in the array to the given value.
|
| |
| void | PushBack (const int &t) |
| | Add element to the end of the vector.
|
| |
| int * | GetArrayPointer () |
| | Return a pointer to the first element of the data in the vector so we can use it access the data in array format (e.g. for passing it to a Fortran program).
|
| |
| const int * | GetConstArrayPointer () const |
| | Return a const point to the first element of the data in the vector so we can use it access the data in array format (e.g. for passing it to a Fortran program).
|
| |
| int & | operator() (int ix) |
| |
| const int & | operator() (int ix) const |
| |
| void | insert (Array1D< int > &insarr, int ix) |
| | Insert a given array to the position ix.
|
| |
| void | insert (const int &insval, int ix) |
| | Insert a given value to the position ix.
|
| |
| void | erase (int ix) |
| | Erase the value from the position ix.
|
| |
| void | DumpBinary (FILE *f_out) const |
| | Dump contents of the array to a file in binary format.
|
| |
| void | ReadBinary (FILE *f_in) |
| | Read contents of the array from a file in binary format.
|
| |
| int & | operator[] (int i) |
| |
| vector< int > | shape () |
| |
| void | assign (const int x, const int val) |
| |
| void | DumpBinary (char *filename) |
| | Dump contents of the array to a file in binary format.
|
| |
| void | ReadBinary (char *filename) |
| |
| void | DumpBinary4py (char *filename) |
| |
| void | ReadBinary4py (char *filename, int n) |
| |
| void | setArray (vector< int > inarray) |
| |
| void | setnpintArray (vector< int > inarray, int n) |
| |
| void | getnpintArray (long *outarray) |
| |
| vector< int > | flatten () |
| |
| string | type () |
| |