SheafSystem
0.0.0.0
|
An implementation of class explicit_index_space_state that supports gathered insertion of new members, that is, new members can only be inserted within the existing domain interval or at the end of it. More...
#include <gathered_insertion_index_space_state.h>
Public Member Functions | |
virtual const std::string & | class_name () const |
The name of this class. More... | |
Public Member Functions inherited from sheaf::explicit_index_space_state | |
virtual explicit_index_space_state * | clone () const =0 |
Virtual constructor; create a new instance of the same type at this. More... | |
virtual | ~explicit_index_space_state () |
Destructor. More... | |
const index_space_collection & | host () const |
The host collection (const version). More... | |
index_space_collection & | host () |
The host collection (mutable version). More... | |
pod_type | index () const |
The index of this id space. More... | |
virtual size_type | deep_size (bool xinclude_shallow) const |
The deep size of this. More... | |
const index_space_family & | id_spaces () const |
The id space family for this (const version). More... | |
index_space_family & | id_spaces () |
The id space family for this (mutable version). More... | |
const hub_index_space_handle & | hub_id_space () const |
The hub id space. More... | |
size_type | ct () const |
The number of members. More... | |
bool | is_empty () const |
True if there are no ids in the space. More... | |
pod_type | begin () const |
Beginning id of this space. More... | |
pod_type | end () const |
Ending id of this space. More... | |
bool | is_gathered () const |
True if begin() == 0 and end() == ct(). More... | |
virtual bool | contains (pod_type xid) const =0 |
True if this space contains id xid. More... | |
bool | contains (const scoped_index &xid) const |
True if this space contains an id equivalent to xid. synonym for contains_hub(xid.hub_pod()). More... | |
bool | contains_hub (pod_type xid) const |
True if this space contains an id equivalent to xid in the unglued hub id space. synonym for contains_unglued_hub(xid) More... | |
virtual bool | contains_unglued_hub (pod_type xid) const =0 |
True if this space contains an id equivalent to xid in the unglued hub id space. More... | |
virtual bool | contains_glued_hub (pod_type xid) const |
True if this space contains an id equivalent to xid in the hub id space. More... | |
bool | contains (pod_type xid, const scoped_index &xhub_id) const |
True if this space contains an id xid equivalent to xhub_id in the hub id space. synonym for contains(xid, xhub_id.hub_pod()). More... | |
virtual bool | contains (pod_type xid, pod_type xhub_id) const |
True if this space contains an id xid equivalent to xhub_id in the hub id space. More... | |
virtual pod_type | pod (pod_type xid) const =0 |
The pod index in this space equivalent to xid in the unglued hub id space. More... | |
pod_type | pod (const scoped_index &xid) const |
The pod index in this space equivalent to xid. synonym for pod(xid.hub_pod()). More... | |
pod_type | hub_pod (pod_type xid) const |
The pod index in the unglued hub id space equivalent to xid in this id space. synonym for unglued_hub_pod(xid). More... | |
virtual pod_type | unglued_hub_pod (pod_type xid) const =0 |
The pod index in the unglued hub id space equivalent to xid in this id space. More... | |
virtual pod_type | glued_hub_pod (pod_type xid) const |
The pod index in the glued hub id space equivalent to xid in this id space. More... | |
bool | is_persistent () const |
True if this id space should be written to disk. More... | |
virtual void | new_product_structure (const abstract_product_structure &xproduct) |
Creates a new product structure for this id space by cloning the product structure, xproduct. More... | |
virtual void | delete_product_structure () |
Deletes the product structure for this id space. More... | |
const abstract_product_structure & | product_structure () const |
The product structure for this id space (const version). More... | |
abstract_product_structure & | product_structure () |
The product structure for this id space (mutable version). More... | |
bool | has_product_structure () const |
True if this id space has a product structure. More... | |
virtual index_space_handle & | get_id_space () const =0 |
Allocates an id space handle from the handle pool. More... | |
virtual void | release_id_space (index_space_handle &xid_space) const =0 |
Returns the id space handle xid_space to the handle pool. More... | |
virtual bool | allocated_id_space (const index_space_handle &xid_space) const =0 |
True if and only if id space handle xid_space was allocated by the handle pool. More... | |
virtual index_space_iterator & | get_iterator () const =0 |
Allocates an id space iterator from the iterator pool. More... | |
virtual void | release_iterator (index_space_iterator &xitr) const =0 |
Returns the id space iterator xitr to the iterator pool. More... | |
virtual bool | allocated_iterator (const index_space_iterator &xitr) const =0 |
True if and only if id space iterator xitr was allocated by the iterator pool. More... | |
Public Member Functions inherited from sheaf::any | |
bool | is_same_type (const any *other) const |
True if other is the same type as this. More... | |
virtual | ~any () |
Destructor. More... | |
bool | invariant_check () const |
True if invariant checking is enabled. More... | |
void | enable_invariant_check () const |
Enable invariant checking. More... | |
void | disable_invariant_check () const |
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More... | |
int | disable_invariance_check_request_depth () const |
Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More... | |
GATHERED_INSERTION_INDEX_SPACE_STATE FACET | |
gathered_insertion_index_space_state () | |
Default constructor. More... | |
gathered_insertion_index_space_state (const gathered_insertion_index_space_state &xother) | |
Copy constructor; disabled. More... | |
virtual | ~gathered_insertion_index_space_state () |
Destructor. More... | |
GATHERED_INSERTION INDEX SPACE FACET | |
virtual void | update_extrema_after_remove () |
Update the id extrema after a remove operation. More... | |
void | update_extrema (pod_type xid) |
Update the extrema for the inserted id xid. More... | |
void | push_back (const scoped_index &xhub_id) |
Make the next id in this space equivalent to xhub_id in the hub id space. synonym for push_back(xhub_id.hub_pod()). More... | |
void | push_back (pod_type xid) |
Make the next id in this space equivalent to xhub_id in the hub id space. More... | |
void | push (index_space_iterator &xitr, const scoped_index &xhub_id) |
Makes id xitr.id() in this id space equivalent to xhub_id in the hub id space. Increments all ids greater than xitr.id() by one, if any. Xitr will be set to the entry with id, xitr.id()+1. synonym for push(xitr, xhub_id.pod()). More... | |
void | push (index_space_iterator &xitr, pod_type xhub_id) |
Makes id xitr.id() in this id space equivalent to xhub_id in the hub id space. Increments all ids greater than xitr.id() if any by one. Xitr will be set to the entry with id xitr.id()+1. More... | |
pod_type | next_id () const |
The id inserted by the next call to push_back. More... | |
size_type | remove (const scoped_index &xid, bool update_extrema) |
Removes the equivalence associated with xid.hub_pod(). synonym for remove_hub(xid.hub_pod(), xupdate_extrema). Returns the number of entries actually removed, either 0 or 1. More... | |
size_type | remove (pod_type xid, bool update_extrema) |
Removes the equivalence associated with id xid. Returns the number of entries actually removed, either 0 or 1. More... | |
size_type | remove_hub (pod_type xhub_id, bool update_extrema) |
Removes the equivalence associated with hub id xhub_id. Returns the number of entries actually removed, either 0 or 1. More... | |
void | remove (index_space_iterator &xitr, bool update_extrema) |
Removes the equivalence associated with id xitr.pod(). Increments xitr to the next entry if any. More... | |
void | gather () |
Gathers this id space into a 0-based, contiguous interval. More... | |
virtual void | update_extrema ()=0 |
Update the id extrema. More... | |
virtual void | reserve (size_type xcapacity)=0 |
Reserve enough memory for xcapacity number of ids. More... | |
virtual size_type | capacity () const =0 |
The number of ids reserved in memory. More... | |
void | clear () |
Delete all ids. More... | |
MAP REPRESENTATION FACET | |
virtual void | map_rep_push_back (pod_type xrange_id)=0 |
Inserts entry (next_id(), xrange_id) into the map representation. More... | |
virtual void | map_rep_push (index_space_iterator &xitr, pod_type xrange_id)=0 |
Inserts entry (xitr.pod(), xrange_id) into the map representation. Increments all domain ids greater than xitr.pod() by one. Sets xitr to the entry at xitr.pod()+1. More... | |
virtual size_type | map_rep_remove_entry (pod_type xid, bool xis_range_id)=0 |
Removes the entry containing range id xid (xis_range_id true) or domain id xid (xis_range_id false) from the map representation; returns the number of entries actully removed, either 0 or 1. More... | |
virtual void | map_rep_remove_entry (index_space_iterator &xitr)=0 |
Removes the equivalence associated with id xitr.pod()/ Increments xitr to the next entry if any. More... | |
virtual void | map_rep_clear ()=0 |
Removes all entrires from the map representation. More... | |
virtual void | map_rep_gather ()=0 |
Gathers the map representation into an interval. More... | |
EXPLICIT_INDEX_SPACE_STATE FACET | |
virtual gathered_insertion_index_space_state & | operator= (const explicit_index_space_state &xother) |
Assignment operator. More... | |
virtual bool | operator== (const explicit_index_space_state &xother) const |
True if this is equivalent to xother. More... | |
INDEX SPACE FACET | |
void | put_is_persistent (bool xis_persistent) |
Set if this id space should be written to disk. More... | |
ANY FACET | |
virtual bool | is_ancestor_of (const any *other) const |
Conformance test; true if other conforms to this. More... | |
virtual bool | invariant () const |
Class invariant. More... | |
Additional Inherited Members | |
Public Types inherited from sheaf::explicit_index_space_state | |
typedef pod_index_type | pod_type |
The "plain old data" index type for this. More... | |
Static Public Member Functions inherited from sheaf::explicit_index_space_state | |
static factory< explicit_index_space_state > & | id_space_factory () |
A factory for making descendants of this class. More... | |
Protected Member Functions inherited from sheaf::explicit_index_space_state | |
explicit_index_space_state () | |
Default constructor. More... | |
explicit_index_space_state (const explicit_index_space_state &xother) | |
Copy constructor; disabled. More... | |
void | new_state (index_space_family &xid_spaces, const std::string &xname, bool xis_persistent) |
Create a new id space state in the id space family xid_spaces at the next available id space index with name xname, and persistence xis_persistent. More... | |
void | new_state (index_space_family &xid_spaces, pod_type xid, const std::string &xname, bool xis_persistent) |
Create a new id space state in the id space family xid_spaces at the id space index xid with name xname, and persistence xis_persistent. More... | |
void | invalidate_extrema () |
Invalidate the extrema. More... | |
void | attach (explicit_index_space_handle &xid_space) const |
Attach the id space handle xid_space to this state. More... | |
void | attach (explicit_index_space_iterator &xitr) const |
Attach the id space iterator xitr to this state. More... | |
Protected Member Functions inherited from sheaf::any | |
any () | |
default constructor More... | |
Protected Attributes inherited from sheaf::explicit_index_space_state | |
index_space_collection * | _host |
The host collection. More... | |
pod_type | _index |
The index of this id space. More... | |
size_type | _ct |
The number of members. More... | |
pod_type | _begin |
Beginning id of this space. More... | |
pod_type | _end |
Ending id of this space. More... | |
bool | _is_persistent |
True if this id space should be written to disk. More... | |
abstract_product_structure * | _product |
The product structure for this id space. More... | |
An implementation of class explicit_index_space_state that supports gathered insertion of new members, that is, new members can only be inserted within the existing domain interval or at the end of it.
Definition at line 42 of file gathered_insertion_index_space_state.h.
|
protected |
Default constructor.
Definition at line 36 of file gathered_insertion_index_space_state.cc.
References invariant(), sheaf::explicit_index_space_state::is_empty(), and ~gathered_insertion_index_space_state().
|
inlineprotected |
Copy constructor; disabled.
Definition at line 62 of file gathered_insertion_index_space_state.h.
References sheaf::operator==(), and fiber_bundle::jcb_algebra::push().
|
protectedvirtual |
Destructor.
Definition at line 54 of file gathered_insertion_index_space_state.cc.
References push_back().
Referenced by gathered_insertion_index_space_state().
|
pure virtual |
The number of ids reserved in memory.
Is Abstract.
Implemented in sheaf::interval_index_space_state, sheaf::list_index_space_state, sheaf::array_index_space_state, and sheaf::hash_index_space_state.
Definition at line 484 of file gathered_insertion_index_space_state.cc.
References clear().
Referenced by sheaf::gathered_insertion_index_space_handle::capacity(), and reserve().
|
virtual |
The name of this class.
Reimplemented from sheaf::explicit_index_space_state.
Reimplemented in sheaf::interval_index_space_state, sheaf::list_index_space_state, sheaf::array_index_space_state, sheaf::hash_index_space_state, and sheaf::scattered_insertion_index_space_state.
Definition at line 855 of file gathered_insertion_index_space_state.cc.
References is_ancestor_of().
Referenced by put_is_persistent().
void sheaf::gathered_insertion_index_space_state::clear | ( | ) |
Delete all ids.
Definition at line 506 of file gathered_insertion_index_space_state.cc.
References sheaf::explicit_index_space_state::_ct, sheaf::explicit_index_space_state::invalidate_extrema(), invariant(), sheaf::explicit_index_space_state::is_empty(), map_rep_clear(), and update_extrema_after_remove().
Referenced by capacity(), and sheaf::gathered_insertion_index_space_handle::clear().
void sheaf::gathered_insertion_index_space_state::gather | ( | ) |
Gathers this id space into a 0-based, contiguous interval.
Definition at line 413 of file gathered_insertion_index_space_state.cc.
References sheaf::explicit_index_space_state::_begin, sheaf::explicit_index_space_state::_ct, sheaf::explicit_index_space_state::_end, sheaf::explicit_index_space_state::invalidate_extrema(), invariant(), sheaf::explicit_index_space_state::is_gathered(), map_rep_gather(), and update_extrema().
Referenced by sheaf::gathered_insertion_index_space_handle::gather(), and remove().
|
virtual |
Class invariant.
Reimplemented from sheaf::explicit_index_space_state.
Reimplemented in sheaf::interval_index_space_state, sheaf::list_index_space_state, sheaf::array_index_space_state, sheaf::hash_index_space_state, and sheaf::scattered_insertion_index_space_state.
Definition at line 895 of file gathered_insertion_index_space_state.cc.
References sheaf::deep_size(), sheaf::any::disable_invariant_check(), sheaf::any::enable_invariant_check(), sheaf::explicit_index_space_state::invariant(), and sheaf::any::invariant_check().
Referenced by clear(), gather(), gathered_insertion_index_space_state(), sheaf::scattered_insertion_index_space_state::invariant(), sheaf::list_index_space_state::invariant(), is_ancestor_of(), operator=(), push(), push_back(), and reserve().
|
virtual |
Conformance test; true if other conforms to this.
Reimplemented from sheaf::explicit_index_space_state.
Reimplemented in sheaf::interval_index_space_state, sheaf::list_index_space_state, sheaf::array_index_space_state, sheaf::hash_index_space_state, and sheaf::scattered_insertion_index_space_state.
Definition at line 874 of file gathered_insertion_index_space_state.cc.
References invariant().
Referenced by class_name(), operator=(), and operator==().
|
protectedpure virtual |
Removes all entrires from the map representation.
Is Abstract.
Implemented in sheaf::interval_index_space_state, sheaf::list_index_space_state, sheaf::array_index_space_state, and sheaf::hash_index_space_state.
Definition at line 720 of file gathered_insertion_index_space_state.cc.
References map_rep_gather().
Referenced by clear(), and map_rep_remove_entry().
|
protectedpure virtual |
Gathers the map representation into an interval.
Is Abstract.
Implemented in sheaf::interval_index_space_state, sheaf::list_index_space_state, sheaf::array_index_space_state, and sheaf::hash_index_space_state.
Definition at line 742 of file gathered_insertion_index_space_state.cc.
References operator==().
Referenced by gather(), and map_rep_clear().
|
protectedpure virtual |
Inserts entry (xitr.pod(), xrange_id) into the map representation. Increments all domain ids greater than xitr.pod() by one. Sets xitr to the entry at xitr.pod()+1.
Implemented in sheaf::interval_index_space_state, and sheaf::hash_index_space_state.
Definition at line 634 of file gathered_insertion_index_space_state.cc.
References sheaf::explicit_index_space_state::allocated_iterator(), sheaf::explicit_index_space_state::contains(), sheaf::explicit_index_space_state::contains_hub(), sheaf::index_space_iterator::hub_pod(), map_rep_remove_entry(), and sheaf::index_space_iterator::pod().
Referenced by map_rep_push_back(), and push().
|
protectedpure virtual |
Inserts entry (next_id(), xrange_id) into the map representation.
Implemented in sheaf::interval_index_space_state, and sheaf::hash_index_space_state.
Definition at line 609 of file gathered_insertion_index_space_state.cc.
References sheaf::explicit_index_space_state::contains(), sheaf::explicit_index_space_state::contains_hub(), map_rep_push(), and next_id().
Referenced by push_back(), and update_extrema().
|
protectedpure virtual |
Removes the entry containing range id xid (xis_range_id true) or domain id xid (xis_range_id false) from the map representation; returns the number of entries actully removed, either 0 or 1.
Is Abstract.
Implemented in sheaf::interval_index_space_state, and sheaf::hash_index_space_state.
Definition at line 663 of file gathered_insertion_index_space_state.cc.
References sheaf::explicit_index_space_state::contains(), sheaf::explicit_index_space_state::contains_hub(), sheaf::explicit_index_space_state::hub_pod(), and sheaf::explicit_index_space_state::pod().
Referenced by map_rep_push(), remove(), and remove_hub().
|
protectedpure virtual |
Removes the equivalence associated with id xitr.pod()/ Increments xitr to the next entry if any.
Implemented in sheaf::interval_index_space_state, sheaf::list_index_space_state, sheaf::array_index_space_state, and sheaf::hash_index_space_state.
Definition at line 692 of file gathered_insertion_index_space_state.cc.
References sheaf::explicit_index_space_state::allocated_iterator(), sheaf::explicit_index_space_state::contains(), sheaf::index_space_iterator::hub_pod(), sheaf::index_space_iterator::is_done(), map_rep_clear(), and sheaf::index_space_iterator::pod().
sheaf::gathered_insertion_index_space_state::pod_type sheaf::gathered_insertion_index_space_state::next_id | ( | ) | const |
The id inserted by the next call to push_back.
Definition at line 223 of file gathered_insertion_index_space_state.cc.
References sheaf::explicit_index_space_state::end(), sheaf::explicit_index_space_state::is_empty(), and remove().
Referenced by sheaf::hash_index_space_state::map_rep_push_back(), map_rep_push_back(), sheaf::array_index_space_state::map_rep_push_back(), sheaf::list_index_space_state::map_rep_push_back(), sheaf::interval_index_space_state::map_rep_push_back(), sheaf::gathered_insertion_index_space_handle::next_id(), push(), push_back(), and sheaf::interval_index_space_state::push_interval().
|
protectedvirtual |
Assignment operator.
Reimplemented from sheaf::explicit_index_space_state.
Reimplemented in sheaf::interval_index_space_state, sheaf::list_index_space_state, sheaf::array_index_space_state, sheaf::hash_index_space_state, and sheaf::scattered_insertion_index_space_state.
Definition at line 794 of file gathered_insertion_index_space_state.cc.
References invariant(), is_ancestor_of(), and put_is_persistent().
Referenced by operator==().
|
virtual |
True if this is equivalent to xother.
Reimplemented from sheaf::explicit_index_space_state.
Reimplemented in sheaf::interval_index_space_state, sheaf::list_index_space_state, sheaf::array_index_space_state, sheaf::hash_index_space_state, and sheaf::scattered_insertion_index_space_state.
Definition at line 770 of file gathered_insertion_index_space_state.cc.
References is_ancestor_of(), operator=(), and sheaf::explicit_index_space_state::operator==().
Referenced by map_rep_gather(), and sheaf::list_index_space_state::operator==().
void sheaf::gathered_insertion_index_space_state::push | ( | index_space_iterator & | xitr, |
const scoped_index & | xhub_id | ||
) |
Makes id xitr.id() in this id space equivalent to xhub_id in the hub id space. Increments all ids greater than xitr.id() by one, if any. Xitr will be set to the entry with id, xitr.id()+1. synonym for push(xitr, xhub_id.pod()).
Definition at line 143 of file gathered_insertion_index_space_state.cc.
References sheaf::scoped_index::is_scoped(), and sheaf::scoped_index::pod().
Referenced by sheaf::gathered_insertion_index_space_handle::push(), and push_back().
void sheaf::gathered_insertion_index_space_state::push | ( | index_space_iterator & | xitr, |
pod_type | xhub_id | ||
) |
Makes id xitr.id() in this id space equivalent to xhub_id in the hub id space. Increments all ids greater than xitr.id() if any by one. Xitr will be set to the entry with id xitr.id()+1.
Definition at line 165 of file gathered_insertion_index_space_state.cc.
References sheaf::explicit_index_space_state::_begin, sheaf::explicit_index_space_state::_ct, sheaf::explicit_index_space_state::_end, sheaf::explicit_index_space_state::allocated_iterator(), sheaf::explicit_index_space_state::begin(), sheaf::explicit_index_space_state::contains(), sheaf::explicit_index_space_state::contains_hub(), sheaf::explicit_index_space_state::ct(), sheaf::explicit_index_space_state::end(), sheaf::explicit_index_space_state::hub_id_space(), sheaf::index_space_iterator::hub_pod(), invariant(), sheaf::index_space_iterator::is_done(), sheaf::is_valid(), map_rep_push(), next_id(), and sheaf::index_space_iterator::pod().
void sheaf::gathered_insertion_index_space_state::push_back | ( | const scoped_index & | xhub_id | ) |
Make the next id in this space equivalent to xhub_id in the hub id space. synonym for push_back(xhub_id.hub_pod()).
Definition at line 80 of file gathered_insertion_index_space_state.cc.
References sheaf::scoped_index::hub_pod(), sheaf::scoped_index::in_scope(), and push_back().
Referenced by push_back(), sheaf::gathered_insertion_index_space_handle::push_back(), and ~gathered_insertion_index_space_state().
void sheaf::gathered_insertion_index_space_state::push_back | ( | pod_type | xid | ) |
Make the next id in this space equivalent to xhub_id in the hub id space.
Definition at line 102 of file gathered_insertion_index_space_state.cc.
References sheaf::explicit_index_space_state::_begin, sheaf::explicit_index_space_state::_ct, sheaf::explicit_index_space_state::_end, sheaf::explicit_index_space_state::begin(), sheaf::explicit_index_space_state::contains(), sheaf::explicit_index_space_state::ct(), sheaf::explicit_index_space_state::end(), invariant(), map_rep_push_back(), next_id(), push(), and update_extrema().
void sheaf::gathered_insertion_index_space_state::put_is_persistent | ( | bool | xis_persistent | ) |
Set if this id space should be written to disk.
Definition at line 825 of file gathered_insertion_index_space_state.cc.
References sheaf::explicit_index_space_state::_is_persistent, class_name(), and sheaf::explicit_index_space_state::is_persistent().
Referenced by operator=(), and sheaf::gathered_insertion_index_space_handle::put_is_persistent().
sheaf::size_type sheaf::gathered_insertion_index_space_state::remove | ( | const scoped_index & | xid, |
bool | update_extrema | ||
) |
Removes the equivalence associated with xid.hub_pod(). synonym for remove_hub(xid.hub_pod(), xupdate_extrema). Returns the number of entries actually removed, either 0 or 1.
Definition at line 245 of file gathered_insertion_index_space_state.cc.
References sheaf::scoped_index::hub_pod(), sheaf::scoped_index::in_scope(), and remove_hub().
Referenced by next_id(), sheaf::gathered_insertion_index_space_handle::remove(), and remove_hub().
sheaf::size_type sheaf::gathered_insertion_index_space_state::remove | ( | pod_type | xid, |
bool | update_extrema | ||
) |
Removes the equivalence associated with id xid. Returns the number of entries actually removed, either 0 or 1.
Definition at line 267 of file gathered_insertion_index_space_state.cc.
References sheaf::explicit_index_space_state::_begin, sheaf::explicit_index_space_state::_ct, sheaf::explicit_index_space_state::_end, sheaf::explicit_index_space_state::begin(), sheaf::explicit_index_space_state::contains(), sheaf::explicit_index_space_state::ct(), sheaf::explicit_index_space_state::end(), sheaf::explicit_index_space_state::hub_pod(), sheaf::explicit_index_space_state::is_empty(), sheaf::is_valid(), map_rep_remove_entry(), remove_hub(), and update_extrema_after_remove().
void sheaf::gathered_insertion_index_space_state::remove | ( | index_space_iterator & | xitr, |
bool | update_extrema | ||
) |
Removes the equivalence associated with id xitr.pod(). Increments xitr to the next entry if any.
Definition at line 363 of file gathered_insertion_index_space_state.cc.
References sheaf::explicit_index_space_state::_begin, sheaf::explicit_index_space_state::_ct, sheaf::explicit_index_space_state::_end, sheaf::explicit_index_space_state::allocated_iterator(), sheaf::explicit_index_space_state::begin(), sheaf::explicit_index_space_state::contains(), sheaf::explicit_index_space_state::contains_hub(), sheaf::explicit_index_space_state::ct(), sheaf::explicit_index_space_state::end(), gather(), sheaf::index_space_iterator::hub_pod(), sheaf::index_space_iterator::is_done(), sheaf::explicit_index_space_state::is_empty(), sheaf::is_valid(), map_rep_remove_entry(), sheaf::index_space_iterator::pod(), and update_extrema_after_remove().
sheaf::size_type sheaf::gathered_insertion_index_space_state::remove_hub | ( | pod_type | xhub_id, |
bool | update_extrema | ||
) |
Removes the equivalence associated with hub id xhub_id. Returns the number of entries actually removed, either 0 or 1.
Definition at line 315 of file gathered_insertion_index_space_state.cc.
References sheaf::explicit_index_space_state::_begin, sheaf::explicit_index_space_state::_ct, sheaf::explicit_index_space_state::_end, sheaf::explicit_index_space_state::begin(), sheaf::explicit_index_space_state::contains_hub(), sheaf::explicit_index_space_state::ct(), sheaf::explicit_index_space_state::end(), sheaf::explicit_index_space_state::is_empty(), sheaf::is_valid(), map_rep_remove_entry(), sheaf::explicit_index_space_state::pod(), remove(), and update_extrema_after_remove().
Referenced by remove(), and sheaf::gathered_insertion_index_space_handle::remove_hub().
|
pure virtual |
Reserve enough memory for xcapacity number of ids.
Is Abstract.
Implemented in sheaf::interval_index_space_state, sheaf::list_index_space_state, sheaf::array_index_space_state, and sheaf::hash_index_space_state.
Definition at line 464 of file gathered_insertion_index_space_state.cc.
References capacity(), and invariant().
Referenced by sheaf::gathered_insertion_index_space_handle::reserve(), and update_extrema().
|
pure virtual |
Update the id extrema.
Is Abstract.
Implemented in sheaf::interval_index_space_state, sheaf::list_index_space_state, sheaf::array_index_space_state, and sheaf::hash_index_space_state.
Definition at line 447 of file gathered_insertion_index_space_state.cc.
References reserve().
Referenced by sheaf::array_index_space_state::array_index_space_state(), gather(), sheaf::hash_index_space_state::hash_index_space_state(), sheaf::scattered_insertion_index_space_state::insert(), sheaf::interval_index_space_state::interval_index_space_state(), sheaf::list_index_space_state::list_index_space_state(), push_back(), sheaf::gathered_insertion_index_space_handle::update_extrema(), and update_extrema_after_remove().
|
protected |
Update the extrema for the inserted id xid.
Definition at line 552 of file gathered_insertion_index_space_state.cc.
References sheaf::explicit_index_space_state::_begin, sheaf::explicit_index_space_state::_ct, sheaf::explicit_index_space_state::_end, sheaf::invalid_pod_index(), sheaf::explicit_index_space_state::is_empty(), and map_rep_push_back().
|
protectedvirtual |
Update the id extrema after a remove operation.
Reimplemented in sheaf::array_index_space_state.
Definition at line 532 of file gathered_insertion_index_space_state.cc.
References update_extrema().
Referenced by clear(), remove(), remove_hub(), sheaf::interval_index_space_state::remove_hub_interval(), and sheaf::interval_index_space_state::remove_interval().