21 #ifndef INTERVAL_SET_H 22 #define INTERVAL_SET_H 24 #ifndef SHEAF_DLL_SPEC_H 25 #include "SheafSystem/sheaf_dll_spec.h" 29 #include "SheafSystem/any.h" 33 #include "SheafSystem/std_map.h" 37 #include "SheafSystem/pod_types.h" 43 class interval_set_iterator;
111 void insert_interval(pod_type xbegin, pod_type xend);
116 void insert_member(pod_type xmbr);
121 void remove_interval(pod_type xbegin, pod_type xend);
126 void remove_member(pod_type xmbr);
131 bool contains_member(pod_type xmbr)
const;
136 size_type member_ct(pod_type xbegin, pod_type xend)
const;
142 bool interval_is_empty(pod_type xbegin, pod_type xend)
const;
148 bool interval_is_full(pod_type xbegin, pod_type xend)
const;
153 pod_type begin()
const;
158 pod_type end()
const;
168 bool is_empty()
const;
183 void put_interval(pod_type xbegin, pod_type xend,
bool xvalue);
208 const map_type& interval_map()
const;
213 bool first_map_entry()
const;
218 bool last_map_entry()
const;
227 map_type _interval_map;
241 virtual bool is_ancestor_of(
const any* other)
const;
257 virtual bool invariant()
const;
285 #endif // ifndef INTERVAL_SET_H An iterator over the integers in an interval_set.
Set of integers optimized for when the integers are concentrated in closed intervals.
pod_index_type pod_type
The "plain old data" index type for this.
pod_index_type pod_type
The "plain old data" index type for this set.
std::map< pod_type, bool > map_type
The type of the interval map.
pod_type _end
End of the interval.
Abstract base class with useful features for all objects.
Struct representing the closed interval [_begin, _end].
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.
bool operator==(const singly_linked_list< T, Alloc > &lhs, const singly_linked_list< T, Alloc > &rhs)
Checks if the contents of lhs and rhs are equal, that is, whether lhs.size() == rhs.size() and each element in lhs compares equal with the element in rhs at the same position.
int_type pod_index_type
The plain old data index type.
SHEAF_DLL_SPEC std::ostream & operator<<(std::ostream &os, const dof_descriptor_array &p)
Insert dof_descriptor_array& p into ostream& os.
Namespace for the sheaves component of the sheaf system.
pod_type _begin
Beginning of the interval.
map_type::const_iterator map_iterator_type
The type of the interval map iterator.