Inherits noncopyable.
Public Member Functions |
| map (unsigned_type node_cache_size_in_bytes, unsigned_type leaf_cache_size_in_bytes) |
| A constructor.
|
| map (const key_compare &c_, unsigned_type node_cache_size_in_bytes, unsigned_type leaf_cache_size_in_bytes) |
| A constructor.
|
template<class InputIterator > |
| map (InputIterator b, InputIterator e, unsigned_type node_cache_size_in_bytes, unsigned_type leaf_cache_size_in_bytes, bool range_sorted=false, double node_fill_factor=0.75, double leaf_fill_factor=0.6) |
| Constructs a map from a given input range.
|
template<class InputIterator > |
| map (InputIterator b, InputIterator e, const key_compare &c_, unsigned_type node_cache_size_in_bytes, unsigned_type leaf_cache_size_in_bytes, bool range_sorted=false, double node_fill_factor=0.75, double leaf_fill_factor=0.6) |
| Constructs a map from a given input range.
|
void | enable_prefetching () |
| Enables leaf prefetching during scanning.
|
void | disable_prefetching () |
| Disables leaf prefetching during scanning.
|
bool | prefetching_enabled () |
| Returns the status of leaf prefetching during scanning.
|
void | print_statistics (std::ostream &o) const |
| Prints cache statistics.
|
void | reset_statistics () |
| Resets cache statistics.
|
template<class KeyType, class DataType, class CompareType, unsigned RawNodeSize = 16 * 1024, unsigned RawLeafSize = 128 * 1024, class PDAllocStrategy = stxxl::SR>
class map< KeyType, DataType, CompareType, RawNodeSize, RawLeafSize, PDAllocStrategy >
Priority queue type generator.
Template parameters:
- KeyType key type
- DataType data type
- CompareType comparison type used to determine
whether a key is smaller than another one.
If CompareType()(x,y) is true, then x is smaller than y.
CompareType must also provide a static \c max_value method, that returns
a value of type KeyType that is
larger than any key stored in map : i.e. for all \b x in map holds
CompareType()(x,CompareType::max_value()) <BR>
<BR>
Example: :
@verbatim
//! struct CmpIntGreater //! { //! bool operator () (const int & a, const int & b) const { return a>b; } //! static int max_value() { return std::numeric_limits<int>::max(); } //! }; //! Another example:
//! struct CmpIntLess
//! {
//! bool operator () (const int & a, const int & b) const { return a<b; }
//! static int max_value() const { return std::numeric_limits<int>::min(); }
//! };
//!
Note that CompareType must define a strict weak ordering. (see what it is)
RawNodeSize
size of internal nodes of map in bytes (btree implementation).
RawLeafSize
size of leaves of map in bytes (btree implementation).
PDAllocStrategy
parallel disk allocation strategy (stxxl::SR
is recommended and default)
template<class KeyType, class DataType, class CompareType, unsigned RawNodeSize = 16 * 1024, unsigned RawLeafSize = 128 * 1024, class PDAllocStrategy = stxxl::SR>
template<class InputIterator >
map< KeyType, DataType, CompareType, RawNodeSize, RawLeafSize, PDAllocStrategy >::map |
( |
InputIterator |
b, |
|
|
InputIterator |
e, |
|
|
unsigned_type |
node_cache_size_in_bytes, |
|
|
unsigned_type |
leaf_cache_size_in_bytes, |
|
|
bool |
range_sorted = false , |
|
|
double |
node_fill_factor = 0.75 , |
|
|
double |
leaf_fill_factor = 0.6 |
|
) |
| |
|
inline |
Constructs a map from a given input range.
- Parameters
-
b | beginning of the range |
e | end of the range |
node_cache_size_in_bytes | size of node cache in bytes (btree implementation) |
leaf_cache_size_in_bytes | size of leaf cache in bytes (btree implementation) |
range_sorted | if true than the constructor assumes that the range is sorted and performs a fast bottom-up bulk construction of the map (btree implementation) |
node_fill_factor | node fill factor in [0,1] for bulk construction |
leaf_fill_factor | leaf fill factor in [0,1] for bulk construction |
template<class KeyType, class DataType, class CompareType, unsigned RawNodeSize = 16 * 1024, unsigned RawLeafSize = 128 * 1024, class PDAllocStrategy = stxxl::SR>
template<class InputIterator >
map< KeyType, DataType, CompareType, RawNodeSize, RawLeafSize, PDAllocStrategy >::map |
( |
InputIterator |
b, |
|
|
InputIterator |
e, |
|
|
const key_compare & |
c_, |
|
|
unsigned_type |
node_cache_size_in_bytes, |
|
|
unsigned_type |
leaf_cache_size_in_bytes, |
|
|
bool |
range_sorted = false , |
|
|
double |
node_fill_factor = 0.75 , |
|
|
double |
leaf_fill_factor = 0.6 |
|
) |
| |
|
inline |
Constructs a map from a given input range.
- Parameters
-
b | beginning of the range |
e | end of the range |
c_ | comparator object |
node_cache_size_in_bytes | size of node cache in bytes (btree implementation) |
leaf_cache_size_in_bytes | size of leaf cache in bytes (btree implementation) |
range_sorted | if true than the constructor assumes that the range is sorted and performs a fast bottom-up bulk construction of the map (btree implementation) |
node_fill_factor | node fill factor in [0,1] for bulk construction |
leaf_fill_factor | leaf fill factor in [0,1] for bulk construction |