SheafSystem
0.0.0.0
|
An implementation of class sum_index_space_handle that has a primary sum id space state. More...
#include <hub_index_space_handle.h>
Friends | |
class | primary_sum_index_space_state |
HUB_INDEX_SPACE_HANDLE FACET | |
hub_index_space_handle () | |
Default constructor. More... | |
hub_index_space_handle (const hub_index_space_handle &xother) | |
Copy constructor. More... | |
hub_index_space_handle (const index_space_family &xid_spaces, pod_type xindex) | |
Constructor: Attach to state with index xindex in the family xid_spaces. More... | |
hub_index_space_handle (const index_space_family &xid_spaces, const std::string &xname) | |
Constructor: Attach to state with name xname in the family xid_spaces. More... | |
hub_index_space_handle & | operator= (const hub_index_space_handle &xother) |
Assignment operator; attach this handle to the state of xother. synonym for attach_to(xother). More... | |
virtual | ~hub_index_space_handle () |
Destructor. More... | |
hub_index_space_handle (primary_sum_index_space_state &xstate) | |
Constructor: Attach to state xstate. More... | |
primary_sum_index_space_state & | state () |
The primary sum id space state (mutable version). More... | |
const primary_sum_index_space_state & | state () const |
The primary sum id space state (const version). More... | |
PRIMARY SUM INDEX SPACE FACET | |
pod_type | new_id () |
Allocate the next available id in this space. More... | |
pod_type | new_id (pod_type xid) |
Allocate an xid in this space. More... | |
void | delete_id (pod_type xid) |
Deallocate the id xid in this space. More... | |
bool | is_valid_reserved_id (pod_type xid) const |
True if and only if the reserved term containing xid is already a reserved term or is available for allocation. More... | |
pod_type | next_id () const |
The next available id. More... | |
pod_type | new_primary_term (size_type xct) |
Create a new primary term [next_id(), next_id()+xct). Returns the index of the term created. More... | |
pod_type | new_primary_term (pod_type xid, size_type xct) |
Create a new primary term [xid, xid+xct). Returns the index of the term created. More... | |
void | remove_term (pod_type xi) |
Remove xi-th term of this sum. More... | |
void | extend_last_term (size_type xct) |
Extends the last term to ct() == xct. More... | |
bool | interval_is_full (pod_type xbegin, pod_type xend) const |
True if all ids in the interval [xbegin, xend) are in this space. More... | |
bool | interval_is_empty (pod_type xbegin, pod_type xend) const |
True if all ids in the interval [xbegin, xend) are not in this space. More... | |
bool | interval_is_available (pod_type xbegin, pod_type xend) const |
True if the ids in the internal [xbegin, xend) are available in this space. More... | |
GLUING FACET | |
void | glue (pod_type xid, pod_type xrep) |
Glues xid to xrep; adds xid to the equivalence class with representative member xrep. More... | |
void | unglue (pod_type xid) |
Unglues xid; makes xid its own representative. More... | |
void | unglue_all (pod_type xrep_id) |
Unglue all ids glued to representative xrep_id; makes each id in the equivalence class of xrep_id its own representative. More... | |
bool | has_gluing () const |
Ture if there is any gluing. More... | |
GATHERED ID SPACE FACET | |
const index_space_handle & | new_gathered_id_space (bool xexclude_bottom) |
Construct a gathered id space from this id space. If xexclude_bottom, construct the id space without BOTTOM_INDEX. More... | |
void | update_gathered_id_space () |
Update the gathered id space. More... | |
const index_space_handle & | gathered_id_space () const |
The gathered id space. More... | |
bool | gathered_id_space_excludes_bottom () const |
True, if the gathered id space excludes BOTTOM_INDEX. More... | |
bool | has_gathered_id_space () const |
True, if the gathered id space exists. More... | |
STANDARD IDS FACET | |
void | update_standard_ids () |
Make end() the standard id end. More... | |
bool | has_only_standard_ids () const |
True if and only if there are only standard ids. More... | |
void | clear_ids () |
Deallocate all non-standard ids. More... | |
INDEX_SPACE_HANDLE FACET | |
virtual hub_index_space_handle & | operator= (const index_space_handle &xother) |
Assignment operator; attach this handle to the state of xother. synonym for attach_to(xother). More... | |
virtual hub_index_space_handle * | clone () const |
Virtual constructor, makes a new instance of the same type as this. If the handle is attached, attach to the same state. More... | |
HANDLE FACET | |
virtual bool | conforms_to_state (const index_space_collection &xhost, pod_type xlocal_id) const |
True if this conforms to the handle type required by the state with local scope id xlocal_id in the host id space collection xhost. 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::sum_index_space_handle | |
typedef std::list< pod_type > | equivalence_class_type |
The type used to represent an equivalence class. More... | |
Public Types inherited from sheaf::index_space_handle | |
typedef pod_index_type | pod_type |
The "plain old data" index type for this. More... | |
Public Member Functions inherited from sheaf::sum_index_space_handle | |
void | equivalence_class (pod_type xhub_id, equivalence_class_type &result) const |
The equivalence class associated with the hub id xhub_id. More... | |
size_type | equivalence_ct (pod_type xhub_id) const |
The number of members of the equivalence class of hub id xhub_id. More... | |
bool | contains_rep (pod_type xhub_id) const |
True if and only if hub id xhub_id is the representative member of its equivalence class. More... | |
bool | contains_unique_rep (pod_type xhub_id) const |
True if and only if hub id xhub_id is the only member of its equivalence class. More... | |
pod_type | rep (pod_type xhub_id) const |
The representative member of the equivalence class of hub id xhub_id. More... | |
pod_type | host_rep (pod_type xhub_id) const |
The host id associated with the representative member of the equivalence class of hub id xhub_id. More... | |
pod_type | term_id_begin () const |
Beginning index of the terms in this sum. More... | |
pod_type | term_id_end () const |
Ending index of the terms in this sum. More... | |
bool | contains_term_id (pod_type xi) const |
True if this map contains the xi-th term. More... | |
const index_space_handle & | term (pod_type xi) const |
The xi-th term. More... | |
const index_space_handle & | term_of (pod_type xid) const |
The term containing id xid. More... | |
const index_space_handle & | term_of (const scoped_index &xid) const |
The term contains id xid. More... | |
const index_space_handle & | last_term () const |
The last term. More... | |
pod_type | term_begin (pod_type xi) const |
Beginning id of the xi-th term. More... | |
pod_type | term_end (pod_type xi) const |
Ending id of the xi-th term. More... | |
pod_type | term_hub_begin (pod_type xi) const |
Beginning hub id of the xi-th term. More... | |
pod_type | term_hub_end (pod_type xi) const |
Ending hub id of the xi-th term. More... | |
pod_type | term_id (pod_type xid) const |
The id of the term containing id xid. More... | |
void | binary (pod_type xindex, pod_type &xterm_id, pod_type &xlocal) const |
Converts simple index xindex to its binary components xterm_id and xlocal_id. More... | |
void | simple (pod_type xterm_id, pod_type xlocal_id, pod_type &xindex) const |
Converts binary components xterm_id, xlocal_id to simple index xindex. More... | |
void | clear () |
Deletes all entries. More... | |
sum_index_space_handle () | |
Default constructor. More... | |
sum_index_space_handle (const sum_index_space_handle &xother) | |
Copy constructor. More... | |
sum_index_space_handle (const index_space_family &xid_spaces, pod_type xindex) | |
Constructor: Attach to state with index xindex in the family xid_spaces. More... | |
sum_index_space_handle (const index_space_family &xid_spaces, const std::string &xname) | |
Constructor: Attach to state with name xname in the family xid_spaces. More... | |
sum_index_space_handle & | operator= (const sum_index_space_handle &xother) |
Assignment operator; attach this handle to the state of xother. synonym for attach_to(xother). More... | |
virtual | ~sum_index_space_handle () |
Destructor. More... | |
Public Member Functions inherited from sheaf::explicit_index_space_handle | |
explicit_index_space_handle () | |
Default constructor. More... | |
explicit_index_space_handle (const explicit_index_space_handle &xother) | |
Copy constructor. More... | |
explicit_index_space_handle (const index_space_family &xid_spaces, pod_type xindex) | |
Constructor: Attach to state with index xindex in the family xid_spaces. More... | |
explicit_index_space_handle (const index_space_family &xid_spaces, const std::string &xname) | |
Constructor: Attach to state with name xname in the family xid_spaces. More... | |
explicit_index_space_handle & | operator= (const explicit_index_space_handle &xother) |
Assignment operator; attach this handle to the state of xother. synonym for attach_to(xother). More... | |
virtual | ~explicit_index_space_handle () |
Destructor. More... | |
virtual const index_space_family & | id_spaces () const |
The id space family for this (const version). More... | |
virtual index_space_family & | id_spaces () |
The id space family for this (mutable version). More... | |
virtual size_type | ct () const |
The number of members. More... | |
virtual pod_type | begin () const |
Beginning id of this space. More... | |
virtual pod_type | end () const |
Ending id of this space. More... | |
virtual bool | contains (pod_type xid) const |
True if this space contains id xid. More... | |
virtual bool | contains_unglued_hub (pod_type xid) const |
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 glued hub id space. 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 |
The pod index in this space equivalent to xid in the hub id space. More... | |
virtual pod_type | unglued_hub_pod (pod_type xid) const |
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 hub id space equivalent to xid in this id space. synonym for unglued_hub_pod(xid). More... | |
virtual 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... | |
virtual const abstract_product_structure & | product_structure () const |
The product structure for this id space (const version). More... | |
virtual abstract_product_structure & | product_structure () |
The product structure for this id space (mutable version). More... | |
virtual bool | has_product_structure () const |
True if this id space has a product structure. More... | |
virtual const index_space_collection & | host () const |
The host collection. More... | |
virtual pod_type | index () const |
Index of this space. More... | |
virtual bool | is_attached () const |
True if this handle is attached to a state. More... | |
virtual void | attach_to (pod_type xindex) |
Attach to the state with index xindex in the id space family id_spaces(). More... | |
virtual void | attach_to (const index_space_collection &xhost, pod_type xlocal_id) |
Attach to the state with local scope id, xlocal_id in the host id space collection xhost. More... | |
virtual void | detach () |
Detach this handle form its state, if any. More... | |
virtual index_space_handle & | get_id_space () const |
Allocates an id space handle from the handle pool. More... | |
virtual void | release_id_space () const |
Returns this id space handle to the handle pool. More... | |
virtual bool | allocated_id_space () const |
True if and only if this id space handle was allocated by the handle pool. More... | |
virtual index_space_iterator & | get_iterator () const |
Allocates an id space iterator from the iterator pool. More... | |
virtual void | release_iterator (index_space_iterator &xitr) const |
Returns the id space iterator xitr to the iterator pool. More... | |
virtual bool | allocated_iterator (const index_space_iterator &xitr) const |
True if and only if id space iterator xitr was allocated by the iterator pool. More... | |
Public Member Functions inherited from sheaf::index_space_handle | |
virtual | ~index_space_handle () |
Destructor. More... | |
bool | operator== (const index_space_handle &xother) const |
True if this is a handle has the same state as xother. More... | |
const hub_index_space_handle & | hub_id_space () const |
The hub id space. More... | |
bool | is_empty () const |
True if there are no ids in the space. More... | |
bool | is_gathered () const |
True if begin() == 0 and end() == ct(). 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... | |
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... | |
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(pod_type). More... | |
template<typename T > | |
const T & | product_structure () const |
The product structure of type T for this id space (const version). More... | |
template<typename T > | |
T & | product_structure () |
The product structure of type T for this id space (mutable version). More... | |
template<typename T > | |
bool | product_structure_conforms_to () const |
True if the product structure for this id space conforms to type T. More... | |
std::string | name () const |
Name of this space. More... | |
void | put_name (const std::string &xname) |
Associate name xname with this id space. More... | |
void | attach_to (const index_space_family &xid_spaces, pod_type xindex) |
Attach to the state with index xindex in the id space family xid_spaces. More... | |
void | attach_to (const index_space_family &xid_spaces, const std::string &xname) |
Attach to the state with name xname in the id space family xid_spaces. More... | |
void | attach_to (const std::string &xname) |
Attach to the state with name xname in the id space family id_spaces(). More... | |
void | attach_to (const index_space_handle &xother) |
Attach to the state of the id space xother. More... | |
bool | conforms_to_state (const index_space_family &xid_spaces, pod_type xindex) const |
True if this conforms to the handle type required by the state with index xindex in the id space family, xid_spaces. More... | |
bool | conforms_to_state (const index_space_family &xid_spaces, const std::string &xname) const |
True if this conforms to the handle type required by the state with name xname in the id space family, xid_spaces. More... | |
bool | conforms_to_state (pod_type xid) const |
True if this conforms to the handle type required by the state with id xid. More... | |
bool | conforms_to_state (const std::string &xname) const |
True if this conforms to the handle type required by the state with name xname. More... | |
bool | conforms_to_state (const index_space_handle &xother) const |
True if this conforms to the handle type required by the state of xother. 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... | |
Protected Member Functions inherited from sheaf::sum_index_space_handle | |
sum_index_space_state & | state () |
The sum id space state (mutable version). More... | |
const sum_index_space_state & | state () const |
The sum id space state (const version). More... | |
Protected Member Functions inherited from sheaf::explicit_index_space_handle | |
explicit_index_space_state & | state () |
The explicit state (mutable version). More... | |
const explicit_index_space_state & | state () const |
The explicit state (const version). More... | |
void | attach_to (explicit_index_space_state *xstate) |
Attach to the explicit id space state xstate. More... | |
virtual bool | conforms_to_state (explicit_index_space_state *xstate) const |
True if this conforms to the iterator type required by the explicit id space state xstate. More... | |
explicit_index_space_state * | state (pod_type xindex) const |
The explicit id space state at id xindex in id space family id_spaces(). Returns null if no id space stae is available at index xindex. More... | |
explicit_index_space_state * | state (const index_space_collection &xhost, pod_type xlocal_id) const |
The explicit id space state with local scope id xlocal_id in the host id space collection xhost. More... | |
Protected Member Functions inherited from sheaf::index_space_handle | |
index_space_handle () | |
Default constructor. More... | |
index_space_handle (const index_space_handle &xother) | |
Copy constructor; disabled. More... | |
Protected Member Functions inherited from sheaf::any | |
any () | |
default constructor More... | |
Protected Attributes inherited from sheaf::explicit_index_space_handle | |
explicit_index_space_state * | _state |
The explicit state. More... | |
An implementation of class sum_index_space_handle that has a primary sum id space state.
Definition at line 41 of file hub_index_space_handle.h.
sheaf::hub_index_space_handle::hub_index_space_handle | ( | ) |
Default constructor.
Definition at line 33 of file hub_index_space_handle.cc.
References invariant().
Referenced by clone(), hub_index_space_handle(), and ~hub_index_space_handle().
sheaf::hub_index_space_handle::hub_index_space_handle | ( | const hub_index_space_handle & | xother | ) |
Copy constructor.
Definition at line 50 of file hub_index_space_handle.cc.
References hub_index_space_handle(), and invariant().
sheaf::hub_index_space_handle::hub_index_space_handle | ( | const index_space_family & | xid_spaces, |
pod_type | xindex | ||
) |
Constructor: Attach to state with index xindex in the family xid_spaces.
Definition at line 69 of file hub_index_space_handle.cc.
References sheaf::explicit_index_space_handle::attach_to(), conforms_to_state(), sheaf::index_space_family::contains(), hub_index_space_handle(), sheaf::explicit_index_space_handle::id_spaces(), sheaf::explicit_index_space_handle::index(), invariant(), and sheaf::explicit_index_space_handle::is_attached().
sheaf::hub_index_space_handle::hub_index_space_handle | ( | const index_space_family & | xid_spaces, |
const std::string & | xname | ||
) |
Constructor: Attach to state with name xname in the family xid_spaces.
Definition at line 94 of file hub_index_space_handle.cc.
References sheaf::explicit_index_space_handle::attach_to(), conforms_to_state(), sheaf::index_space_family::contains(), sheaf::explicit_index_space_handle::id_spaces(), invariant(), sheaf::explicit_index_space_handle::is_attached(), sheaf::index_space_handle::name(), and operator=().
|
virtual |
Destructor.
Definition at line 141 of file hub_index_space_handle.cc.
References hub_index_space_handle().
Referenced by operator=().
|
protected |
Constructor: Attach to state xstate.
Definition at line 159 of file hub_index_space_handle.cc.
References sheaf::explicit_index_space_handle::attach_to(), invariant(), sheaf::explicit_index_space_handle::is_attached(), and state().
void sheaf::hub_index_space_handle::clear_ids | ( | ) |
Deallocate all non-standard ids.
Definition at line 774 of file hub_index_space_handle.cc.
References sheaf::primary_sum_index_space_state::clear_ids(), has_only_standard_ids(), operator=(), and state().
Referenced by sheaf::index_space_family::clear_id_spaces(), and has_only_standard_ids().
|
virtual |
Virtual constructor, makes a new instance of the same type as this. If the handle is attached, attach to the same state.
Reimplemented from sheaf::sum_index_space_handle.
Definition at line 848 of file hub_index_space_handle.cc.
References conforms_to_state(), hub_index_space_handle(), and sheaf::any::is_same_type().
Referenced by operator=().
|
virtual |
True if this conforms to the handle type required by the state with local scope id xlocal_id in the host id space collection xhost.
Reimplemented from sheaf::sum_index_space_handle.
Definition at line 881 of file hub_index_space_handle.cc.
References sheaf::index_space_collection::contains(), is_ancestor_of(), and state().
Referenced by clone(), hub_index_space_handle(), sheaf::primary_sum_index_space_state::new_space(), and operator=().
void sheaf::hub_index_space_handle::delete_id | ( | pod_type | xid | ) |
Deallocate the id xid in this space.
Definition at line 273 of file hub_index_space_handle.cc.
References sheaf::explicit_index_space_handle::contains(), sheaf::primary_sum_index_space_state::delete_id(), is_valid_reserved_id(), and state().
Referenced by sheaf::index_space_family::delete_id(), and new_id().
void sheaf::hub_index_space_handle::extend_last_term | ( | size_type | xct | ) |
Extends the last term to ct() == xct.
Definition at line 420 of file hub_index_space_handle.cc.
References sheaf::explicit_index_space_handle::ct(), sheaf::primary_sum_index_space_state::extend_last_term(), interval_is_full(), invariant(), sheaf::sum_index_space_handle::last_term(), state(), sheaf::sum_index_space_handle::term_begin(), and sheaf::sum_index_space_handle::term_id_end().
Referenced by sheaf::index_space_family::extend_last_term(), and remove_term().
const sheaf::index_space_handle & sheaf::hub_index_space_handle::gathered_id_space | ( | ) | const |
The gathered id space.
Definition at line 666 of file hub_index_space_handle.cc.
References sheaf::primary_sum_index_space_state::gathered_id_space(), gathered_id_space_excludes_bottom(), has_gathered_id_space(), and state().
Referenced by sheaf::index_space_family::gathered_hub_id_space(), new_gathered_id_space(), and update_gathered_id_space().
bool sheaf::hub_index_space_handle::gathered_id_space_excludes_bottom | ( | ) | const |
True, if the gathered id space excludes BOTTOM_INDEX.
Definition at line 687 of file hub_index_space_handle.cc.
References sheaf::primary_sum_index_space_state::gathered_id_space_excludes_bottom(), has_gathered_id_space(), and state().
Referenced by sheaf::index_space_family::gathered_hub_id_space_excludes_bottom(), gathered_id_space(), and new_gathered_id_space().
Glues xid to xrep; adds xid to the equivalence class with representative member xrep.
Definition at line 521 of file hub_index_space_handle.cc.
References sheaf::sum_index_space_handle::contains_rep(), sheaf::sum_index_space_handle::contains_unique_rep(), sheaf::primary_sum_index_space_state::glue(), sheaf::explicit_index_space_handle::glued_hub_pod(), invariant(), state(), sheaf::sum_index_space_handle::term_id(), and unglue().
Referenced by sheaf::index_space_family::glue(), and interval_is_available().
bool sheaf::hub_index_space_handle::has_gathered_id_space | ( | ) | const |
True, if the gathered id space exists.
Definition at line 706 of file hub_index_space_handle.cc.
References sheaf::primary_sum_index_space_state::has_gathered_id_space(), state(), and update_standard_ids().
Referenced by gathered_id_space(), gathered_id_space_excludes_bottom(), sheaf::index_space_family::has_gathered_hub_id_space(), new_gathered_id_space(), and update_gathered_id_space().
bool sheaf::hub_index_space_handle::has_gluing | ( | ) | const |
Ture if there is any gluing.
Definition at line 591 of file hub_index_space_handle.cc.
References sheaf::primary_sum_index_space_state::has_gluing(), new_gathered_id_space(), and state().
Referenced by sheaf::index_space_family::has_gluing(), and unglue_all().
bool sheaf::hub_index_space_handle::has_only_standard_ids | ( | ) | const |
True if and only if there are only standard ids.
Definition at line 755 of file hub_index_space_handle.cc.
References clear_ids(), sheaf::primary_sum_index_space_state::has_only_standard_ids(), and state().
Referenced by clear_ids(), and update_standard_ids().
True if the ids in the internal [xbegin, xend) are available in this space.
Definition at line 489 of file hub_index_space_handle.cc.
References glue(), sheaf::primary_sum_index_space_state::interval_is_available(), and state().
Referenced by interval_is_empty(), and new_primary_term().
True if all ids in the interval [xbegin, xend) are not in this space.
Definition at line 468 of file hub_index_space_handle.cc.
References interval_is_available(), sheaf::primary_sum_index_space_state::interval_is_empty(), and state().
Referenced by interval_is_full(), and remove_term().
True if all ids in the interval [xbegin, xend) are in this space.
Definition at line 447 of file hub_index_space_handle.cc.
References interval_is_empty(), sheaf::primary_sum_index_space_state::interval_is_full(), and state().
Referenced by extend_last_term(), and new_primary_term().
|
virtual |
Class invariant.
Reimplemented from sheaf::sum_index_space_handle.
Definition at line 937 of file hub_index_space_handle.cc.
References sheaf::any::disable_invariant_check(), sheaf::any::enable_invariant_check(), sheaf::sum_index_space_handle::invariant(), and sheaf::any::invariant_check().
Referenced by extend_last_term(), glue(), hub_index_space_handle(), is_ancestor_of(), new_primary_term(), operator=(), remove_term(), unglue(), and unglue_all().
|
virtual |
Conformance test; true if other conforms to this.
Reimplemented from sheaf::sum_index_space_handle.
Definition at line 915 of file hub_index_space_handle.cc.
References invariant().
Referenced by conforms_to_state().
bool sheaf::hub_index_space_handle::is_valid_reserved_id | ( | pod_type | xid | ) | const |
True if and only if the reserved term containing xid is already a reserved term or is available for allocation.
Definition at line 292 of file hub_index_space_handle.cc.
References sheaf::primary_sum_index_space_state::is_valid_reserved_id(), next_id(), and state().
Referenced by delete_id(), sheaf::index_space_family::is_valid_reserved_id(), and new_id().
const sheaf::index_space_handle & sheaf::hub_index_space_handle::new_gathered_id_space | ( | bool | xexclude_bottom | ) |
Construct a gathered id space from this id space. If xexclude_bottom, construct the id space without BOTTOM_INDEX.
Definition at line 621 of file hub_index_space_handle.cc.
References gathered_id_space(), gathered_id_space_excludes_bottom(), has_gathered_id_space(), sheaf::index_space_handle::is_gathered(), sheaf::primary_sum_index_space_state::new_gathered_id_space(), state(), and update_gathered_id_space().
Referenced by has_gluing(), and sheaf::index_space_family::new_gathered_hub_id_space().
sheaf::hub_index_space_handle::pod_type sheaf::hub_index_space_handle::new_id | ( | ) |
Allocate the next available id in this space.
Definition at line 233 of file hub_index_space_handle.cc.
References sheaf::explicit_index_space_handle::contains(), sheaf::primary_sum_index_space_state::new_id(), and state().
Referenced by sheaf::index_space_family::new_id(), and state().
sheaf::hub_index_space_handle::pod_type sheaf::hub_index_space_handle::new_id | ( | pod_type | xid | ) |
Allocate an xid in this space.
Definition at line 252 of file hub_index_space_handle.cc.
References sheaf::explicit_index_space_handle::contains(), delete_id(), is_valid_reserved_id(), sheaf::primary_sum_index_space_state::new_id(), and state().
sheaf::hub_index_space_handle::pod_type sheaf::hub_index_space_handle::new_primary_term | ( | size_type | xct | ) |
Create a new primary term [next_id(), next_id()+xct). Returns the index of the term created.
Definition at line 330 of file hub_index_space_handle.cc.
References sheaf::explicit_index_space_handle::contains(), sheaf::explicit_index_space_handle::ct(), sheaf::explicit_index_space_handle::id_spaces(), interval_is_available(), interval_is_full(), invariant(), sheaf::primary_sum_index_space_state::new_primary_term(), next_id(), state(), and sheaf::sum_index_space_handle::term_id_end().
Referenced by sheaf::index_space_family::new_primary_state(), and next_id().
sheaf::hub_index_space_handle::pod_type sheaf::hub_index_space_handle::new_primary_term | ( | pod_type | xid, |
size_type | xct | ||
) |
Create a new primary term [xid, xid+xct). Returns the index of the term created.
Definition at line 360 of file hub_index_space_handle.cc.
References sheaf::explicit_index_space_handle::contains(), sheaf::explicit_index_space_handle::ct(), sheaf::explicit_index_space_handle::id_spaces(), interval_is_available(), interval_is_full(), invariant(), sheaf::primary_sum_index_space_state::new_primary_term(), remove_term(), state(), and sheaf::sum_index_space_handle::term_id_end().
sheaf::hub_index_space_handle::pod_type sheaf::hub_index_space_handle::next_id | ( | ) | const |
The next available id.
Definition at line 311 of file hub_index_space_handle.cc.
References new_primary_term(), sheaf::primary_sum_index_space_state::next_id(), and state().
Referenced by is_valid_reserved_id(), and new_primary_term().
sheaf::hub_index_space_handle & sheaf::hub_index_space_handle::operator= | ( | const hub_index_space_handle & | xother | ) |
Assignment operator; attach this handle to the state of xother. synonym for attach_to(xother).
Definition at line 120 of file hub_index_space_handle.cc.
References sheaf::explicit_index_space_handle::attach_to(), conforms_to_state(), invariant(), sheaf::explicit_index_space_handle::is_attached(), and ~hub_index_space_handle().
Referenced by clear_ids(), and hub_index_space_handle().
|
virtual |
Assignment operator; attach this handle to the state of xother. synonym for attach_to(xother).
Reimplemented from sheaf::sum_index_space_handle.
Definition at line 826 of file hub_index_space_handle.cc.
References sheaf::explicit_index_space_handle::attach_to(), clone(), conforms_to_state(), invariant(), and sheaf::index_space_handle::is_attached().
void sheaf::hub_index_space_handle::remove_term | ( | pod_type | xi | ) |
Remove xi-th term of this sum.
Definition at line 388 of file hub_index_space_handle.cc.
References sheaf::sum_index_space_handle::contains_term_id(), sheaf::explicit_index_space_handle::ct(), extend_last_term(), interval_is_empty(), invariant(), sheaf::primary_sum_index_space_state::remove_term(), state(), sheaf::sum_index_space_handle::term(), sheaf::sum_index_space_handle::term_begin(), sheaf::sum_index_space_handle::term_end(), sheaf::sum_index_space_handle::term_id_begin(), and sheaf::sum_index_space_handle::term_id_end().
Referenced by sheaf::index_space_family::delete_primary_state(), and new_primary_term().
|
protected |
The primary sum id space state (mutable version).
Definition at line 180 of file hub_index_space_handle.cc.
References sheaf::explicit_index_space_handle::is_attached().
Referenced by clear_ids(), conforms_to_state(), delete_id(), extend_last_term(), gathered_id_space(), gathered_id_space_excludes_bottom(), glue(), has_gathered_id_space(), has_gluing(), has_only_standard_ids(), hub_index_space_handle(), interval_is_available(), interval_is_empty(), interval_is_full(), is_valid_reserved_id(), new_gathered_id_space(), new_id(), new_primary_term(), next_id(), remove_term(), unglue(), unglue_all(), update_gathered_id_space(), and update_standard_ids().
|
protected |
The primary sum id space state (const version).
Definition at line 202 of file hub_index_space_handle.cc.
References sheaf::explicit_index_space_handle::is_attached(), and new_id().
void sheaf::hub_index_space_handle::unglue | ( | pod_type | xid | ) |
Unglues xid; makes xid its own representative.
Definition at line 546 of file hub_index_space_handle.cc.
References sheaf::explicit_index_space_handle::contains(), sheaf::sum_index_space_handle::contains_rep(), sheaf::sum_index_space_handle::contains_unique_rep(), invariant(), state(), sheaf::primary_sum_index_space_state::unglue(), and unglue_all().
Referenced by glue(), and sheaf::index_space_family::unglue().
void sheaf::hub_index_space_handle::unglue_all | ( | pod_type | xrep_id | ) |
Unglue all ids glued to representative xrep_id; makes each id in the equivalence class of xrep_id its own representative.
Definition at line 569 of file hub_index_space_handle.cc.
References sheaf::sum_index_space_handle::contains_rep(), sheaf::sum_index_space_handle::contains_unique_rep(), has_gluing(), invariant(), state(), and sheaf::primary_sum_index_space_state::unglue_all().
Referenced by unglue(), and sheaf::index_space_family::unglue_all().
void sheaf::hub_index_space_handle::update_gathered_id_space | ( | ) |
Update the gathered id space.
Definition at line 645 of file hub_index_space_handle.cc.
References gathered_id_space(), has_gathered_id_space(), sheaf::index_space_handle::is_gathered(), state(), and sheaf::primary_sum_index_space_state::update_gathered_id_space().
Referenced by new_gathered_id_space(), and sheaf::index_space_family::update_gathered_hub_id_space().
void sheaf::hub_index_space_handle::update_standard_ids | ( | ) |
Make end() the standard id end.
Definition at line 736 of file hub_index_space_handle.cc.
References has_only_standard_ids(), state(), and sheaf::primary_sum_index_space_state::update_standard_ids().
Referenced by has_gathered_id_space(), and sheaf::index_space_family::update_standard_id_spaces().