A simple vector class for floating point numbers that allows for dynamic resizing.
More...
#include <stringBuffer.h>
|
| | VectorFP (void) |
| | Construct a new VectorFP object.
|
| | ~VectorFP (void) |
| | Destroy the VectorFP object.
|
| void | appendValue (const cawlign_fp) |
| | Append a value to the vector.
|
| void | appendValues (const cawlign_fp *, long) |
| | Append multiple values to the vector.
|
| void | storeValue (const cawlign_fp, const unsigned long) |
| | Store a value at a specific index.
|
| cawlign_fp | value (const long idx) |
| | Get a value at a specific index.
|
| unsigned long | length (void) const |
| | Get the length of the vector.
|
| const cawlign_fp * | values (void) |
| | Get the underlying C array.
|
| cawlign_fp * | rvalues (void) |
| | Get the underlying C array.
|
|
|
static long | vDefaultLength = 16 |
|
static long | vDefaultBoost = 16 |
A simple vector class for floating point numbers that allows for dynamic resizing.
◆ VectorFP()
| VectorFP::VectorFP |
( |
void | | ) |
|
Construct a new VectorFP object.
Initializes an empty vector of floating-point values with a default initial capacity.
◆ ~VectorFP()
| VectorFP::~VectorFP |
( |
void | | ) |
|
Destroy the VectorFP object.
Frees the memory allocated for the floating-point vector data.
◆ appendValue()
| void VectorFP::appendValue |
( |
const cawlign_fp | l | ) |
|
Append a value to the vector.
- Parameters
-
| value | The value to append. |
Appends a floating-point value to the VectorFP.
Adds a floating-point value to the end of the vector, growing the vector if needed.
- Parameters
-
| l | The floating-point value to append. |
◆ appendValues()
| void VectorFP::appendValues |
( |
const cawlign_fp * | l, |
|
|
long | N ) |
Append multiple values to the vector.
- Parameters
-
| values | The values to append. |
| count | The number of values to append. |
Appends multiple floating-point values to the VectorFP.
- Parameters
-
| l | The array of floating-point values to append. |
| N | The number of values to append. |
◆ length()
| unsigned long VectorFP::length |
( |
void | | ) |
const |
|
inline |
Get the length of the vector.
- Returns
- unsigned long The length of the vector.
◆ rvalues()
| cawlign_fp * VectorFP::rvalues |
( |
void | | ) |
|
|
inline |
Get the underlying C array.
- Returns
- cawlign_fp* A pointer to the underlying C array.
◆ storeValue()
| void VectorFP::storeValue |
( |
const cawlign_fp | v, |
|
|
const unsigned long | l ) |
Store a value at a specific index.
- Parameters
-
| value | The value to store. |
| index | The index to store the value at. |
Stores a floating-point value at a specific index in the VectorFP.
If the index is beyond the current capacity, the vector grows to accommodate the value.
- Parameters
-
| v | The floating-point value to store. |
| l | The index at which to store the value. |
◆ value()
| cawlign_fp VectorFP::value |
( |
const long | idx | ) |
|
|
inline |
Get a value at a specific index.
- Parameters
-
| idx | The index to get the value from. |
- Returns
- cawlign_fp The value at the index.
◆ values()
| const cawlign_fp * VectorFP::values |
( |
void | | ) |
|
|
inline |
Get the underlying C array.
- Returns
- const cawlign_fp* A pointer to the underlying C array.
The documentation for this class was generated from the following files: