Object-oriented Scientific Computing Library: Version 0.910
Public Member Functions
array_alloc< vec_t > Class Template Reference

A simple class to provide an allocate() function for arrays. More...

#include <array.h>


Detailed Description

template<class vec_t>
class array_alloc< vec_t >

The functions here are blank, as fixed-length arrays are automatically allocated and destroyed by the compiler. This class is present to provide an analog to pointer_alloc and ovector_alloc . This class is used, for example, for sma_interp_vec .

Idea for Future:
Might it be possible to rework this so that it does range checking and ensures that the user doesn't try to allocate more or less space? I.e. array_alloc<double[2]> complains if you try an allocate(x,3)?

Definition at line 104 of file array.h.

Public Member Functions

void allocate (vec_t &v, size_t i)
 Allocate v for i elements.
void free (vec_t &v)
 Free memory.

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).

Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads.