This can be used if arrays are not possible, or for partial grid functions. More...
#include </home/guntram/tmp/GrAL/gral/base/include/Gral/Base/grid-function-hash.h>
Public Types | |
typedef element_traits< E > | et |
typedef E | element_type |
typedef et::hasher_type | hasher_type |
typedef et::grid_type | grid_type |
typedef STDHASH::hash_map< E, T, hasher_type > | table_type |
typedef table_type::size_type | size_type |
typedef T | value_type |
typedef T & | reference |
typedef T const & | const_reference |
typedef table_type::pointer | pointer |
typedef table_type::difference_type | difference_type |
typedef E const & | argument_type |
typedef const_reference | result_type |
typedef grid_function_hash_base< E, T > | gfc2dh |
typedef table_type::iterator | base_it |
typedef table_type::const_iterator | base_cit |
typedef iter | iterator |
typedef const_iter | const_iterator |
Public Member Functions | |
grid_function_hash_base (const grid_type &gg) | |
grid_function_hash_base (ref_ptr< grid_type const > gg) | |
grid_function_hash_base (const gfc2dh &rs) | |
gfc2dh & | operator= (const gfc2dh &rs) |
void | set_grid (ref_ptr< grid_type const > gg) |
void | set_grid (const grid_type &gg) |
const grid_type & | TheGrid () const |
bool | defined (const E &e) const |
void | undefine (const E &e) |
unsigned | size () const |
bool | empty () const |
void | clear () |
iter | begin () |
iter | end () |
const_iter | begin () const |
const_iter | end () const |
Protected Attributes | |
ref_ptr< grid_type const > | g |
table_type | table |
This can be used if arrays are not possible, or for partial grid functions.
Access operations have slightly different semantics for total and partial grid-functions, so corresponding derivations grid_function_hash and partial_grid_function_hash are provided.
The main difference between a partial grid function and a hashed total grid function is the handling of read access to undefined item: in the total version this is an error (program termination in debug mode!), whereas for the partial version a default value (which can be manipulated seperately) is returned.
hash_table<element_handle,T>
instead of hash_table<Element,T>
. However, in some cases it is not possible to implement equality testing of the underlying elements without referring to the grid.Definition at line 59 of file grid-function-hash.h.