OPENF4
Library for Gröebner basis computations over finite fields.
|
Represent a dynamic array whose the width is fixed, the memory is allocated by blocs. More...
#include <dynamic-array.h>
Public Member Functions | |
DynamicArray (int width, int maxHeight) | |
Constructor. More... | |
DynamicArray (int width, int maxHeight, int initialCapacity) | |
Constructor. More... | |
~DynamicArray () | |
Destructor. | |
void | printDynamicArray (std::ostream &stream=std::cout) const |
Print the dynamic array. | |
void | reset () |
Reset the dynamic array, do not free the memory. | |
int | getWidth () |
Get the width of the dynamic array. | |
int | getMaxHeight () |
Get the maximum height of the dynamic array. | |
int | getCurrentHeight () |
Get the current height of the dynamic array. | |
dataType & | operator[] (int index) |
Overload the operator []. More... | |
dataType const & | operator[] (int index) const |
Overload the operator []. More... | |
dataType * | getBegin () |
Get an iterator to the beginning of the array. More... | |
dataType * | getNext (dataType *data) |
Get an iterator to next data after data. More... | |
Private Attributes | |
int | _width |
int | _maxHeight |
int | _currentHeight |
int | _colIt |
int | _rowIt |
dataType ** | _array |
Represent a dynamic array whose the width is fixed, the memory is allocated by blocs.
Definition at line 45 of file dynamic-array.h.
F4::DynamicArray< dataType >::DynamicArray | ( | int | width, |
int | maxHeight | ||
) |
Constructor.
width | Width of the array (size of a memory block). |
maxHeight | Maximum height of the dynamic array. The maximal capacity of this array will be width * maxHeight. |
F4::DynamicArray< dataType >::DynamicArray | ( | int | width, |
int | maxHeight, | ||
int | initialCapacity | ||
) |
Constructor.
width | Width of the array (size of a memory block). |
maxHeight | Maximum height of the dynamic array. The maximal capacity of this array will be width * maxHeight. |
initialCapacity | initial number of allocated rows. |
dataType* F4::DynamicArray< dataType >::getBegin | ( | ) |
Get an iterator to the beginning of the array.
dataType* F4::DynamicArray< dataType >::getNext | ( | dataType * | data | ) |
Get an iterator to next data after data.
data | Pointer on a cell of the dynamic array. |
dataType& F4::DynamicArray< dataType >::operator[] | ( | int | index | ) |
Overload the operator [].
dataType const& F4::DynamicArray< dataType >::operator[] | ( | int | index | ) | const |
Overload the operator [].
|
private |
2 dimensionnal array
Definition at line 142 of file dynamic-array.h.
|
private |
Column iterator
Definition at line 140 of file dynamic-array.h.
|
private |
Number of allocated rows in the 2D array
Definition at line 138 of file dynamic-array.h.
|
private |
Maximum height of the 2D array
Definition at line 137 of file dynamic-array.h.
|
private |
Row iterator
Definition at line 141 of file dynamic-array.h.
|
private |
Width of the 2D array
Definition at line 136 of file dynamic-array.h.