21 #include "SheafSystem/section_space_schema_table_dof_crg_range.h" 22 #include "SheafSystem/assert_contract.h" 23 #include "SheafSystem/factory.h" 24 #include "SheafSystem/cover_set_iterator.h" 25 #include "SheafSystem/ij_product_structure.h" 26 #include "SheafSystem/index_space_iterator.h" 27 #include "SheafSystem/product_section_space_schema_crg_range.h" 28 #include "SheafSystem/product_section_space_schema_poset.h" 79 ensure(is_basic_query);
128 xbase_space_id == BOTTOM_INDEX &&
133 ensure(is_basic_query);
148 require(local_id_space().contains_hub(xindex));
154 xbase_space_id = BOTTOM_INDEX;
180 xindex = _local_id_space.hub_pod(xindex);
184 ensure(local_id_space().contains_hub(xindex));
232 sheaf::cover_set_iterator
240 list_cover_set* lcover =
new list_cover_set(0);
241 lcover->put_is_implicit(
true);
248 lcover->push_back(_local_id_space.hub_pod(litr.
pod()));
254 cover_set_iterator result(lcover);
277 sheaf::cover_set_iterator
287 list_cover_set* lcover =
new list_cover_set(0);
288 lcover->put_is_implicit(
true);
292 lcover->push_back(BOTTOM_INDEX);
297 tuple(xmbr_index, lbase_space_id, lfiber_schema_id);
299 cover_set_iterator litr =
_base_space->cover_iterator(
false, BOTTOM_INDEX);
300 while(!litr.is_done())
303 lcover->push_back(lid);
309 cover_set_iterator result(lcover);
332 ensure(is_basic_query);
362 ensure(is_basic_query);
387 result = (xother_index == BOTTOM_INDEX);
392 tuple(xmbr_index, lbase_space_id, lfiber_schema_id);
401 result = (lother_base_space_id == BOTTOM_INDEX) && (lother_fiber_schema_id == lfiber_schema_id);
413 ensure(is_basic_query);
427 require(!cover_is_empty(xlower, xmbr_index));
435 result = BOTTOM_INDEX;
444 ensure(is_basic_query);
474 ensure(is_basic_query);
528 ensure(is_basic_query);
588 require(dynamic_cast<product_section_space_schema_poset*>(&xhost) != 0);
614 xhost.append_cover(
atoms(),
UPPER, BOTTOM_INDEX);
616 implicit_crg_range::finalize(xhost);
620 lhost.put_table_dof_range(*
this);
652 implicit_crg_range::is_initialized() &&
657 ensure(is_basic_query);
672 static const string result(
"section_space_schema_table_dof_crg_range");
686 fiber_bundle::section_space_schema_table_dof_crg_range::
696 range_factory().insert_prototype(lproto);
747 ensure(is_same_type(result));
760 if(invariant_check())
764 disable_invariant_check();
768 invariance(implicit_crg_range::invariant());
774 enable_invariant_check();
virtual size_type implicit_cover_size(bool xlower, pod_index_type xmbr_index) const
The number of members in the lower (xlower true) or upper (xlower false) cover set.
virtual cover_set_iterator implicit_cover_iterator(bool xlower, pod_index_type xmbr_index) const
Iterator for lower (xlower true) or upper (xlower false) cover set of the member with index xmbr_inde...
virtual pod_index_type implicit_first_cover_member(bool xlower, pod_index_type xmbr_index) const
The first member of the lower (xlower true) or upper (xlower false) cover.
bool is_valid() const
True if this is a valid id.
size_type ct() const
The number of items currently in use.
static void get_size(const product_section_space_schema_poset &xhost, size_type &result)
The size for an instance created with parameter xhost.
virtual size_type cover_ct(bool xlower, pod_index_type xmbr_hub_id) const
The number of members in the lower cover (xlower true) or upper cover (xlower false) of the member wi...
void initialize_fiber_schema(poset_state_handle &xfiber_schema)
Sets the fiber schema for section spaces on this schema to xfiber_schema.
An abstract iterator over the ids of an id space.
virtual bool contains_member(pod_index_type xbase_space_id, pod_index_type xfiber_schema_id) const
True if this range contains the member with base space id xbase_space_id and fiber schema id xfiber_s...
virtual bool is_initialized() const
True if fully initialized.
virtual void tuple(pod_index_type xindex, pod_index_type &xbase_space_id, pod_index_type &xfiber_schema_id) const
The tuple conversion from section space schema id xindex to the base space id xbase_space_id and fibe...
pod_type pod() const
The current id in the iteration.
bool state_is_read_accessible() const
True if this is attached and if the state is accessible for read or access control is disabled...
virtual cover_set_iterator atoms() const
An iterator over the atoms in this range.
A client handle for a general, abstract partially order set.
virtual void finalize(poset_state_handle &xhost)
Finialize the initialization of this crg range in the host xhost.
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 bool is_atom(pod_index_type xmbr_hub_id) const
True if the member with hub id xmbr_hub_id covers the bottom.
virtual bool contains_member(pod_index_type xbase_space_id, pod_index_type xfiber_schema_id) const
True if this range contains the member with base space id xbase_space_id and fiber schema id xfiber_s...
virtual const scoped_index & dof_tuple_id(bool xauto_access) const
An id in the dof tuple hub id space; intended for copying to initialize ids to the dof tuple id space...
virtual void next()=0
Makes id() the next id in the iteration.
virtual void ordinal(pod_index_type xbase_space_id, pod_index_type xfiber_schema_id, pod_index_type &xindex) const
The ordinal conversion from base space id xbase_space_id and fiber schema id xfiber_schema_id to sect...
virtual index_space_iterator & get_iterator() const
Allocates an id space iterator from the iterator pool.
void initialize_base_space(base_space_poset &xbase_space)
Sets the base space for section spaces on this schema to xbase_space.
An schema poset for a section space represented by a Cartesian product subspace of the tensor product...
const product_section_space_schema_crg_range * _product_range
The product crg range.
virtual pod_type pod(pod_type xid) const
The pod index in this space equivalent to xid in the hub id space.
void initialize_product_range(product_section_space_schema_crg_range &xproduct_range)
Sets the product crg range.
virtual ~section_space_schema_table_dof_crg_range()
Destructor.
Abstract base class with useful features for all objects.
Abstract emulator for a range of implicit section space schema members.
bool is_done() const
True if iteration is finished.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
virtual void ordinal(pod_index_type xbase_space_id, pod_index_type xfiber_schema_id, pod_index_type &xindex) const
The ordinal conversion from base space id xbase_space_id and fiber schema id xfiber_schema_id to sect...
An index within the external ("client") scope of a given id space.
virtual void put_implicit_private_data(const block< pod_index_type > &xdata)
Initializes this using private data xdata.
virtual bool implicit_cover_contains_member(bool xlower, pod_index_type xmbr_index, pod_index_type xother_index) const
True if and only if the lower (xlower true) or upper (xlower false) cover set contains xindex...
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
section_space_schema_table_dof_crg_range()
Default constructor.
const bool UPPER
Selector for upper cover.
virtual size_type implicit_private_data_size() const
The size of the private data.
virtual const std::string & class_name() const
The name of this class; provided to satisfy factory template.
bool product_range_initialized() const
True if the product range has been initialized.
const scattered_insertion_index_space_handle & id_space() const
The id space for the members of with this (const version).
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...
virtual bool invariant() const
Class invariant.
virtual const scoped_index & dof_tuple_id(pod_index_type xmbr_index) const
The dof tuple id of the member with index xmbr_index.
poset_state_handle & fiber_schema()
The fiber schema for section spaces on this schema (mutable version).
virtual bool implicit_cover_is_empty(bool xlower, pod_index_type xmbr_index) const
True if and only if the lower (xlower true) or upper (xlower false) cover set of the member with inde...
Emulator for a range of implicit section space schema members representing the Cartesian product the ...
subposet & table_dof_subposet()
The table dof subposet when this poset is used as a schema (mutable version).
int_type pod_index_type
The plain old data index type.
virtual void get_implicit_private_data(block< pod_index_type > &xdata) const
The private data for this instance.
base_space_poset * _base_space
The base space for section spaces on this schema.
virtual size_type ct() const
The number of members.
virtual void release_iterator(index_space_iterator &xitr) const
Returns the id space iterator xitr to the iterator pool.
pod_index_type first_cover_member(bool xlower, pod_index_type xmbr_hub_id) const
Hub id of the first member of the lower (xlower true) or upper (xlower false) cover of the member wit...
poset_state_handle * _fiber_schema
The fiber schema for section spaces on this schema.
virtual bool is_jim(pod_index_type xmbr_index) const
True if and only if the member with index xmbr_index is join-irreducible.
virtual void tuple(pod_index_type xindex, pod_index_type &xbase_space_id, pod_index_type &xfiber_schema_id) const
The tuple conversion from section space schema id xindex to the base space id xbase_space_id and fibe...
virtual section_space_schema_table_dof_crg_range * clone() const
Virtual constructor, makes a new instance of the same type as this.