Map ranges of values. More...
#include <RangeMap.hpp>
Classes | |
struct | Range |
Public Types | |
typedef KeyType | key_type |
typedef ValType | value_type |
typedef std::vector< Range > | RangeList |
typedef RangeList::const_iterator | iterator |
typedef RangeList::const_iterator | const_iterator |
Public Member Functions | |
bool | empty () const |
const Range & | back () const |
const Range & | front () const |
std::pair< iterator, bool > | insert (KeyType first_key, ValType first_val, KeyType count) |
Insert mapping between range of keys and range of values. More... | |
bool | merge (const RangeMap< KeyType, ValType, NullVal > &other) |
Insert mapping between range of keys and range of values. More... | |
ValType | find (KeyType key) const |
bool | find (KeyType key, ValType &val_out) const |
bool | exists (KeyType key) const |
bool | intersects (KeyType start, KeyType count) const |
iterator | erase (KeyType beg, KeyType count) |
unsigned | num_ranges () const |
iterator | begin () const |
iterator | end () const |
iterator | lower_bound (KeyType key) const |
iterator | upper_bound (KeyType key) const |
std::pair< iterator, iterator > | equal_range (KeyType key) const |
void | clear () |
Static Public Member Functions | |
static iterator | lower_bound (iterator s, iterator e, KeyType key) |
static iterator | upper_bound (iterator s, iterator e, KeyType key) |
Protected Attributes | |
RangeList | data |
Map ranges of values.
This class provides a map between ranges of values, such as a map between file IDs and EntityHandles. It is intended for use in situations where there are relatively few insertions of large contiguous ranges of values.
Definition at line 38 of file RangeMap.hpp.
typedef RangeList::const_iterator moab::RangeMap< KeyType, ValType, NullVal >::const_iterator |
Definition at line 55 of file RangeMap.hpp.
typedef RangeList::const_iterator moab::RangeMap< KeyType, ValType, NullVal >::iterator |
Definition at line 54 of file RangeMap.hpp.
typedef KeyType moab::RangeMap< KeyType, ValType, NullVal >::key_type |
Definition at line 41 of file RangeMap.hpp.
typedef std::vector< Range > moab::RangeMap< KeyType, ValType, NullVal >::RangeList |
Definition at line 53 of file RangeMap.hpp.
typedef ValType moab::RangeMap< KeyType, ValType, NullVal >::value_type |
Definition at line 42 of file RangeMap.hpp.
|
inline |
Definition at line 62 of file RangeMap.hpp.
References moab::RangeMap< KeyType, ValType, NullVal >::data.
Referenced by moab::ReadHDF5::insert_in_id_map(), and moab::range_to_blocked_list_templ().
|
inline |
Definition at line 111 of file RangeMap.hpp.
References moab::RangeMap< KeyType, ValType, NullVal >::data.
Referenced by moab::SharedSetData::append_local_handles(), moab::ReadNASTRAN::assign_ids(), moab::ReadHDF5::convert_id_to_handle(), moab::ReadHDF5::convert_range_to_handle(), moab::ReadHDF5::delete_non_side_elements(), moab::RangeMap< KeyType, ValType, NullVal >::equal_range(), moab::RangeMap< KeyType, ValType, NullVal >::lower_bound(), moab::WriteHDF5::print_id_map(), moab::range_to_blocked_list_templ(), moab::range_to_id_list_templ(), moab::ReadHDF5::store_file_ids(), moab::ReadHDF5::store_sets_file_ids(), and moab::RangeMap< KeyType, ValType, NullVal >::upper_bound().
|
inline |
Definition at line 145 of file RangeMap.hpp.
References moab::RangeMap< KeyType, ValType, NullVal >::data.
Referenced by moab::ReadHDF5::init(), moab::WriteHDF5::init(), moab::ReadNASTRAN::load_file(), and moab::WriteHDF5::write_finished().
|
inline |
Definition at line 57 of file RangeMap.hpp.
References moab::RangeMap< KeyType, ValType, NullVal >::data.
Referenced by moab::ReadHDF5::insert_in_id_map(), and moab::set_map_intersect().
|
inline |
Definition at line 115 of file RangeMap.hpp.
References moab::RangeMap< KeyType, ValType, NullVal >::data.
Referenced by moab::SharedSetData::append_local_handles(), moab::ReadNASTRAN::assign_ids(), moab::ReadHDF5::convert_id_to_handle(), moab::ReadHDF5::convert_range_to_handle(), moab::ReadHDF5::delete_non_side_elements(), moab::RangeMap< KeyType, ValType, NullVal >::equal_range(), moab::ReadDamsel::get_contents(), moab::RangeMap< KeyType, ValType, NullVal >::lower_bound(), moab::WriteHDF5::print_id_map(), moab::range_to_blocked_list_templ(), moab::range_to_id_list_templ(), moab::ReadHDF5::read_dense_tag(), moab::ReadHDF5::store_file_ids(), moab::ReadHDF5::store_sets_file_ids(), and moab::RangeMap< KeyType, ValType, NullVal >::upper_bound().
|
inline |
Definition at line 139 of file RangeMap.hpp.
References moab::RangeMap< KeyType, ValType, NullVal >::begin(), and moab::RangeMap< KeyType, ValType, NullVal >::end().
|
inline |
Remove a block of values
Definition at line 296 of file RangeMap.hpp.
References moab::RangeMap< KeyType, ValType, NullVal >::Range::begin.
Referenced by moab::ReadHDF5::delete_non_side_elements().
|
inline |
Check if range contains key
Definition at line 280 of file RangeMap.hpp.
Referenced by moab::set_map_intersect().
|
inline |
Find the value corresponding to the specified key. Returns NullVal if not found
Definition at line 255 of file RangeMap.hpp.
Referenced by moab::WriteHDF5Parallel::communicate_shared_set_ids(), moab::WriteHDF5::convert_handle_tag(), moab::ReadHDF5::convert_id_to_handle(), moab::WriteHDF5Parallel::exchange_file_ids(), moab::WriteHDF5::get_adjacencies(), moab::ReadDamsel::get_contents(), moab::WriteHDF5Parallel::print_set_sharing_data(), moab::ReadHDF5::read_adjacencies(), moab::ReadNASTRAN::read_element(), moab::ReadHDF5::read_node_adj_elems(), moab::WriteHDF5::vector_to_id_list(), moab::WriteHDF5::write_adjacencies(), and moab::WriteHDF5::write_elems().
|
inline |
Find the value corresponding to the specified key. Returns false if not found
Definition at line 265 of file RangeMap.hpp.
|
inline |
Definition at line 66 of file RangeMap.hpp.
References moab::RangeMap< KeyType, ValType, NullVal >::data.
|
inline |
Insert mapping between range of keys and range of values.
Insert mapping from [first_key, first_key+count) to [first_val, first_val+count)
Input range of keys many not overlap any other input range. If it does overlap an existing range, the second value of the pair will be returned as false and the iterator will point to (one of) the overlapping ranges.
Definition at line 158 of file RangeMap.hpp.
Referenced by moab::WriteHDF5::assign_ids(), moab::WriteHDF5Parallel::communicate_shared_set_ids(), moab::WriteHDF5Parallel::exchange_file_ids(), moab::ReadHDF5::insert_in_id_map(), moab::ReadNASTRAN::load_file(), moab::ParallelComm::pack_range_map(), moab::ReadDamsel::process_ent_info(), moab::ReadNASTRAN::read_element(), and moab::ReadHDF5::read_node_adj_elems().
|
inline |
Check if range contains key
Definition at line 288 of file RangeMap.hpp.
Referenced by moab::set_map_intersect().
|
inlinestatic |
Definition at line 124 of file RangeMap.hpp.
|
inline |
Definition at line 119 of file RangeMap.hpp.
References moab::RangeMap< KeyType, ValType, NullVal >::begin(), and moab::RangeMap< KeyType, ValType, NullVal >::end().
Referenced by moab::ReadHDF5::convert_id_to_handle(), moab::ReadHDF5::convert_range_to_handle(), moab::ReadDamsel::get_contents(), moab::range_to_blocked_list_templ(), moab::range_to_id_list_templ(), and moab::ReadHDF5::read_dense_tag().
|
inline |
Insert mapping between range of keys and range of values.
Insert mapping from [first_key, first_key+count) to [first_val, first_val+count)
Input range of keys many not overlap any other input range. If it does overlap an existing range, the second value of the pair will be returned as false and the iterator will point to (one of) the overlapping ranges.
Definition at line 215 of file RangeMap.hpp.
References moab::RangeMap< KeyType, ValType, NullVal >::data.
Referenced by moab::ReadHDF5::insert_in_id_map().
|
inline |
Definition at line 106 of file RangeMap.hpp.
References moab::RangeMap< KeyType, ValType, NullVal >::data.
|
inlinestatic |
Definition at line 134 of file RangeMap.hpp.
|
inline |
Definition at line 129 of file RangeMap.hpp.
References moab::RangeMap< KeyType, ValType, NullVal >::begin(), and moab::RangeMap< KeyType, ValType, NullVal >::end().
|
protected |
Definition at line 151 of file RangeMap.hpp.
Referenced by moab::RangeMap< KeyType, ValType, NullVal >::back(), moab::RangeMap< KeyType, ValType, NullVal >::begin(), moab::RangeMap< KeyType, ValType, NullVal >::clear(), moab::RangeMap< KeyType, ValType, NullVal >::empty(), moab::RangeMap< KeyType, ValType, NullVal >::end(), moab::RangeMap< KeyType, ValType, NullVal >::front(), moab::RangeMap< KeyType, ValType, NullVal >::merge(), and moab::RangeMap< KeyType, ValType, NullVal >::num_ranges().