#include <Floats.hh>
The Floats class implements an arbitrary size array of floating point numbers. It is not very efficient as it internally allocates memory for array storage, but it is convenient for passing arrays of floats to and from functions.
Public Member Functions | |
Floats (int in_count, const char *n=NULL) | |
Floats (float *in_array, int size, const char *n=NULL) | |
Floats (const char *n=NULL) | |
Floats (const Floats &in) | |
~Floats (void) | |
Floats & | operator= (const Floats &rhs) |
float | get (int index) const |
void | set (int index, float f) |
int | getCount (void) const |
float * | getArray (void) const |
void | redefine (float *in_array, int size) |
void | fill (float *in_array) |
|
This constructor creates an array of size "in_count", with name "n" |
|
This constructor creates an array of size "size", with name "n" whose contents are copied from "in_array". |
|
This constructor creates an array of size 0, with name "n" |
|
This is the copy constructor |
|
The destructor frees up all the internal memory allocated at creation or resizing |
|
Debugging method to print out contents of array |
|
This method returns the float at location "index" in the array |
|
This method returns a pointer to the internal array of floats. Use with caution, preferably for read-only purposes. |
|
This method returns the number of elements in the array |
|
Assignment operator |
|
This method sets the float at location "index" to the indicated value. |