21 #include "SheafSystem/sum_index_space_state.h" 22 #include "SheafSystem/assert_contract.h" 23 #include "SheafSystem/deep_size.h" 24 #include "SheafSystem/index_space_family.h" 25 #include "SheafSystem/scoped_index.h" 26 #include "SheafSystem/std_limits.h" 115 result.push_back(lrep_id);
119 typedef rem_inv_type::const_iterator itr_type;
120 pair<itr_type, itr_type> lrange =
_rem_inv.equal_range(lrep_id);
122 for(itr_type litr = lrange.first; litr != lrange.second; ++litr)
124 result.push_back(litr->second);
129 ensure(!result.empty());
226 ensure(is_basic_query);
270 ensure(is_basic_query);
291 ensure(is_basic_query);
312 ensure(is_basic_query);
333 ensure(is_basic_query);
354 ensure(is_basic_query);
376 ensure(is_basic_query);
400 ensure(is_basic_query);
421 ensure(is_basic_query);
442 ensure(is_basic_query);
463 ensure(is_basic_query);
484 ensure(is_basic_query);
674 (void) explicit_index_space_state::operator=(xother);
679 ensure((*
this) == xother);
710 static const std::string result(
"sum_index_space_state");
792 size_t result = xinclude_shallow ?
sizeof(xn) : 0;
802 result += deep_size<pod_index_type, pod_index_type, rem_inv_policy_type>(xn.
_rem_inv,
false);
822 result += deep_size<pod_index_type, pod_index_type, sum_to_term_policy_type>(xn.
_sum_to_term_map,
false);
pod_type term_begin(pod_type xi) const
Beginning id of the xi-th term.
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...
virtual sum_index_space_state & operator=(const explicit_index_space_state &xother)
Assignment operator.
index_type ub() const
The upper bound on the storage array. The number of items current allocated in the storage array...
bool in_scope() const
True if and only if scope() contains an entry for pod().
pod_type term_id(pod_type xid) const
The id of the term containing id xid.
void release_id_space(index_space_handle &xid_space) const
Returns the id space handle xid_space to the handle pool.
virtual bool contains_term_id(pod_type xi) const =0
True if this map contains the xi-th term.
virtual bool operator==(const explicit_index_space_state &xother) const
True if this is equivalent to xother.
virtual bool invariant() const
Class invariant.
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
const index_space_family & id_spaces() const
The id space family for this (const version).
block< pod_type > _term_end
The end of the interval in the sum id space for each term.
virtual bool operator==(const explicit_index_space_state &xother) const
True if this is equivalent to xother.
virtual pod_type host_rep(pod_type xhub_id) const =0
The host id associated with the representative member of the equivalence class of hub id xhub_id...
virtual const std::string & class_name() const
The name of this class.
const index_space_handle & term(pod_type xi) const
The xi-th term.
virtual pod_type term_id_end() const =0
Ending index of the terms in this sum.
Abstract base class with useful features for all objects.
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.
virtual pod_type pod(pod_type xid) const =0
The pod index in this space equivalent to xid in the unglued hub id space.
An immutable abstract state for a space of alternate integer identifiers (aliases) for a subset of th...
std::list< pod_type > equivalence_class_type
The type used to represent an equivalence class.
sum_index_space_state()
Default constructor.
Do not call deep_size on either the key or value.
An index within the external ("client") scope of a given id space.
An abstract id space of alternate integer identifiers which is the sum (disjoint union) of two or mor...
const index_space_handle & term_of(pod_type xid) const
The term containing id xid.
void invalidate_extrema()
Invalidate the extrema.
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.
terms_type _terms
The terms of this sum.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
pod_type term_hub_end(pod_type xi) const
Ending hub id of the xi-th term.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
const index_space_handle & last_term() const
The last term.
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.
friend SHEAF_DLL_SPEC size_t deep_size(const sum_index_space_state &xn, bool xinclude_shallow)
The deep size of sum_index_space_state& xn.
pod_type term_end(pod_type xi) const
Ending id of the xi-th term.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
SHEAF_DLL_SPEC void max(const vd &x0, vd_value_type &xresult, bool xauto_access)
Maximum component of x0, pre-allocated version.
virtual bool contains_rep(pod_type xhub_id) const =0
True if and only if hub id xhub_id is the representative member of its equivalence class...
void equivalence_class(pod_type xhub_id, equivalence_class_type &result) const
The equivalence class associated with the hub id xhub_id.
pod_type term_hub_begin(pod_type xi) const
Beginning hub id of the xi-th term.
virtual ~sum_index_space_state()
Destructor.
size_type _ct
The number of members.
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.
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 pod_type rep(pod_type xhub_id) const =0
The representative member of the equivalence class of hub id xhub_id.
block< pod_type > _term_begin
The beginning of the interval in the sum id space for each term.
virtual pod_type term_id_begin() const =0
Beginning index of the terms in this sum.
sum_to_term_type _sum_to_term_map
The term id corresponding to each sum id.
virtual bool invariant() const
Class invariant.
virtual void clear()
Deletes all entries.
bool is_empty() const
True if there are no ids in the space.
void clear()
Remove all items.
rem_inv_type _rem_inv
The inverse rem map.
SHEAF_DLL_SPEC bool is_valid(pod_index_type xpod_index)
True if an only if xpod_index is valid.
SHEAF_DLL_SPEC pod_index_type invalid_pod_index()
The invalid pod index value.
void enable_invariant_check() const
Enable invariant checking.
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...
size_type equivalence_ct(pod_type xhub_id) const
The number of members of the equivalence class of hub id xhub_id.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.