slotCollection¶
- template <std::size_t dim, typename node_value_type>
-
struct
slotCollection¶ Inherits from std::vector< std::shared_ptr< slot< dim, node_value_type > > >
Public Functions
-
void
copyInArray(std::vector<node_type> &array)¶ An other “copy init”.
Here we put the Nodes of each slot in a global array. This is supposed to reduce the number of allocations. We use this to store a local copy of a SlotCollection.
- Parameters
SC: slot collection to be copyed.G: global array.
-
void
clone(const slotCollection &C)¶ make a “clone”, ie copy all, but not the Nodes!
-
bool
inInterval(node_type s1, node_type s2, node_type x) const¶ Is a Node abscissa in the interval [s1,s2[ ?
- Note
- x must be not hashed.
- Parameters
s1:s2:x: Node to check.
-
void
insert(node_type x, Cache<dim, node_value_type> &cache)¶ Store one node using a cache.
- Parameters
x: the node to be inserted.cache: an external Cache.
-
void
insert(node_type x)¶ Store one node.
- Parameters
x: the node to be inserted.
-
std::size_t
nbNodes() const¶ number of Nodes stored.
-
level_count_type
nbNodesByLevel() const¶ Returns the number of nodes by level.
-
auto
ubound(node_type x) const¶ return a pointer to a slot which possibly contains a Node.
- Parameters
x: Node not hashed
-
auto
ubound_hashed(node_type x) const¶ return a pointer to a slot which possibly contains a Node.
- Parameters
x: Node hashed
-
std::size_t
findSlot(node_type N, std::size_t left, std::size_t right) const¶ Given a Node, find his slot.
- Note
- we search in range [left,right] of the SlotCollection
- Note
- returns the rank of the slot which contains N
- Parameters
N: the Nodeleft:right:
-
std::size_t
count(node_type x, Cache<dim, node_value_type> &cache) const¶ Test if a Node exists within this slotCollection, using a cache.
-
std::size_t
count(node_type x) const¶ Test if a Node exists within this slotCollection.
-
void
forgetFreeBits()¶ remove all free bits from all nodes.
-
void
compress(node_type val = node_type::voidbit)¶ suppress void Nodes, if any.
update the count of leaves.
-
void
clear()¶ empty all the slots.
-
void
makeExtern(SetNode &setN)¶ make a copy (in a set) of the Nodes.
- Parameters
setN: the set.
-
void
finalize()¶ finalize: compute cumulsize (to allow rank function to work), and maximum size of slots;
-
void
relink()¶ compute ranks, …
-
std::size_t
maxSlotSize() const¶ return maximum size of slots.
Public Members
-
std::size_t
slot_max_size¶ size of slot which triggers decomposition of a slot.
-
std::size_t
slot_min_size¶ size of slot which triggers fusion of two slots.
-
struct
ltNode¶ define order on the Nodes.
We use the Peano-Hilbert curve for indexation, and thus, we must suppress all what is not position.
-
void