MFEM v4.7.0
Finite element discretization library
|
#include <array.hpp>
Classes | |
class | const_iterator |
class | iterator |
class | iterator_base |
Public Member Functions | |
BlockArray (int block_size=16 *1024) | |
BlockArray (const BlockArray< T > &other) | |
BlockArray & | operator= (const BlockArray &)=delete |
~BlockArray () | |
int | Append () |
Allocate and construct a new item in the array, return its index. | |
int | Append (const T &item) |
Allocate and copy-construct a new item in the array, return its index. | |
T & | At (int index) |
Access item of the array. | |
const T & | At (int index) const |
T & | operator[] (int index) |
Access item of the array. | |
const T & | operator[] (int index) const |
int | Size () const |
Return the number of items actually stored. | |
int | Capacity () const |
Return the current capacity of the BlockArray. | |
void | DeleteAll () |
Destroy all items, set size to zero. | |
void | Swap (BlockArray< T > &other) |
std::size_t | MemoryUsage () const |
iterator | begin () |
iterator | end () |
const_iterator | cbegin () const |
const_iterator | cend () const |
Protected Member Functions | |
int | Alloc () |
void | CheckIndex (int index) const |
void | Destroy () |
Protected Attributes | |
Array< T * > | blocks |
int | size |
int | shift |
int | mask |
A container for items of type T. Dynamically grows as items are added. Each item is accessible by its index. Items are allocated in larger chunks (blocks), so the 'Append' method is very fast on average.
mfem::BlockArray< T >::BlockArray | ( | int | block_size = 16*1024 | ) |
mfem::BlockArray< T >::BlockArray | ( | const BlockArray< T > & | other | ) |
|
inline |
|
protected |
int mfem::BlockArray< T >::Append | ( | ) |
int mfem::BlockArray< T >::Append | ( | const T & | item | ) |
|
inline |
|
inline |
|
inline |
|
inline |
Return the current capacity of the BlockArray.
|
inline |
|
inline |
|
inlineprotected |
|
inline |
|
protected |
|
inline |
std::size_t mfem::BlockArray< T >::MemoryUsage | ( | ) | const |
|
delete |
|
inline |
|
inline |
|
inline |
void mfem::BlockArray< T >::Swap | ( | BlockArray< T > & | other | ) |
|
protected |
|
protected |
|
protected |
|
protected |