#include <solArray.h>
Public Member Functions | |
| SolArray () | |
| SolArray (uintSA nbElements, array_type t) | |
| SolArray (void *ptr, array_type t, uintSA nbElements) throw (invalid_argument) | |
| SolArray (SolArray &sa) | |
| void | init (uintSA nbElements, array_type t) |
| uintSA | get (uintSA pos) |
| array_type | getType () |
| uintSA | length () |
| void | realloc (uintSA nbElements) throw (logic_error) |
| void | set (uintSA pos, uintSA value) |
| uintSA | operator[] (uintSA pos) |
Small Or Large (SOL) Array storing integers. A SOL array can either store 32-bit, 64-bit integers, or fixed length integers on a different number of bits, depending on the user choice. This class allows to deal with the same variable whatever the type of integers we are storing.
| gkarrays::SolArray::SolArray | ( | uintSA | nbElements, |
| array_type | t | ||
| ) |
| nbElements,: | number of elements to be stored in the array. |
| t,: | type of the array to be constructed. This specifies if we need to build a small array (32-bit integers) a large array (64-bit integers) or an optimal array which uses the optimal number of bits in memory (but which is longer) |
| gkarrays::SolArray::SolArray | ( | void * | ptr, |
| array_type | t, | ||
| uintSA | nbElements | ||
| ) | throw (invalid_argument) |
| ptr,: | pointer to an already allocated memory |
| t,: | type of the array to be built |
| nbElements,: | Number of elements that can be stored in the array |
| gkarrays::SolArray::SolArray | ( | SolArray & | sa | ) |
Copy constructor. Warning, the arrays are not copied, only the pointers are (to avoid huge memory consumption).
| uintSA gkarrays::SolArray::get | ( | uintSA | pos | ) | [inline] |
| pos,: | position in the array |
| array_type gkarrays::SolArray::getType | ( | ) | [inline] |
| void gkarrays::SolArray::init | ( | uintSA | nbElements, |
| array_type | t | ||
| ) |
| uintSA gkarrays::SolArray::length | ( | ) | [inline] |
| uintSA gkarrays::SolArray::operator[] | ( | uintSA | pos | ) | [inline] |
A shortcut to the get method.
| void gkarrays::SolArray::realloc | ( | uintSA | nbElements | ) | throw (logic_error) |
| void gkarrays::SolArray::set | ( | uintSA | pos, |
| uintSA | value | ||
| ) | [inline] |
| pos,: | position in the array |
| value,: | value to be stored. |
1.7.6.1