21 #include "SheafSystem/scattered_insertion_index_space_state.h" 22 #include "SheafSystem/assert_contract.h" 23 #include "SheafSystem/index_space_iterator.h" 24 #include "SheafSystem/scattered_insertion_index_space_handle.h" 25 #include "SheafSystem/scoped_index.h" 85 require(precondition_of(insert_entry(xid, xhub_id.
hub_pod())));
93 ensure(postcondition_of(insert_entry(xid, xhub_id.
hub_pod())));
134 ensure(
ct() == old_ct + 1);
135 ensure(
ct() > 1 ?
begin() <= old_begin :
true);
136 ensure(
begin() <= xid);
137 ensure(
ct() > 1 ?
end() >= old_end :
true);
185 ensure(
contains(xdomain_id, xrange_id));
235 (void) explicit_index_space_state::operator=(xother);
240 ensure((*
this) == xother);
271 static const std::string result(
"scattered_insertion_index_space_state");
353 size_t result = xinclude_shallow ?
sizeof(xn) : 0;
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...
size_type ct() const
The number of members.
bool in_scope() const
True if and only if scope() contains an entry for pod().
pod_type end() const
Ending id of this space.
virtual size_type deep_size(bool xinclude_shallow) const
The deep size of this.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
virtual bool operator==(const explicit_index_space_state &xother) const
True if this is equivalent to xother.
virtual void map_rep_insert_entry(pod_type xdomain_id, pod_type xrange_id)=0
Inserts entry (xdomain_id, xrange_id) into the map representation.
An implementation of class explicit_index_space_state that supports either gathered or scattered inse...
virtual void update_extrema()=0
Update the id extrema.
pod_type _end
Ending id of this space.
virtual bool invariant() const
Class invariant.
Abstract base class with useful features for all objects.
virtual ~scattered_insertion_index_space_state()
Destructor.
An immutable abstract state for a space of alternate integer identifiers (aliases) for a subset of th...
pod_type begin() const
Beginning id of this space.
An index within the external ("client") scope of a given id space.
SHEAF_DLL_SPEC size_t deep_size(const dof_descriptor_array &xp, bool xinclude_shallow=true)
The deep size of the referenced object of type dof_descriptor_array.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
const hub_index_space_handle & hub_id_space() const
The hub id space.
virtual bool invariant() const
Class invariant.
void insert(pod_type xid, const scoped_index &xhub_id)
Make id xid in this id space equivalent to xhub_id in the hub id space. synonym for insert(xid...
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
virtual bool operator==(const explicit_index_space_state &xother) const
True if this is equivalent to xother.
size_type _ct
The number of members.
bool invariant_check() const
True if invariant checking is enabled.
virtual bool contains(pod_type xid) const =0
True if this space contains id xid.
pod_index_type pod_type
The "plain old data" index type for this.
virtual scattered_insertion_index_space_state & operator=(const explicit_index_space_state &xother)
Assignment operator.
bool is_empty() const
True if there are no ids in the space.
An implementation of class explicit_index_space_state that supports gathered insertion of new members...
SHEAF_DLL_SPEC bool is_valid(pod_index_type xpod_index)
True if an only if xpod_index is valid.
pod_type _begin
Beginning id of this space.
void enable_invariant_check() const
Enable invariant checking.
virtual const std::string & class_name() const
The name of this class.
scattered_insertion_index_space_state()
Default constructor.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.