21 #include "SheafSystem/abstract_product_structure.h" 22 #include "SheafSystem/assert_contract.h" 84 ensure((*
this) == xother);
107 ensure(is_basic_query);
152 require((0 <= xi) && (xi <
d()));
175 require(unexecutable(
"length of xtuple equals d()"));
176 require_for_range(
pod_type i=0, i<
d(), ++i,
177 (0 <= xtuple[i]) && (xtuple[i] <
ub(i)));
185 ensure((0 <= xordinal) && (xordinal <
ordinal_ub()));
198 require((0 <= xordinal) && (xordinal <
ordinal_ub()));
199 require(unexecutable(
"length of xtuple equals d()"));
207 ensure_for_range(
pod_type i=0, i<
d(), ++i,
208 (0 <= xtuple[i]) && (xtuple[i] <
ub(i)));
232 ensure(is_basic_query);
245 require(unexecutable(
"xubs.length >= d()"));
246 require_for_range(
pod_type i=0, i<
d(), ++i, xubs[i] > 0);
254 ensure_for_range(
pod_type i=0, i<
d(), ++i,
ub(i) == xubs[i]);
virtual bool invariant() const
Class invariant, intended to be redefined in each descendant. See below for template for invariant in...
virtual size_type d() const =0
The product dimension.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
An abstract class that defines the product structure for an id space.
virtual size_type ub(pod_type xi) const =0
The upper-bound for the dimension xi.
virtual void tuple(pod_type xordinal, pod_type *xtuple) const =0
Ordinal to tuple conversion.
virtual bool operator==(const abstract_product_structure &xother) const =0
True if this is equivalent to xother.
size_type ordinal_ub() const
The upper-bound of the ordinal.
virtual abstract_product_structure & operator=(const abstract_product_structure &xother)=0
Assignment operator.
Abstract base class with useful features for all objects.
virtual void ordinal(pod_type *xtuple, pod_type &xordinal) const =0
Tuple to ordinal conversion.
virtual bool invariant() const
Class invariant.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
pod_index_type pod_type
The "plain old data" index type for this.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
virtual ~abstract_product_structure()
Destructor.
bool invariant_check() const
True if invariant checking is enabled.
virtual void put_ubs(size_type *xubs)=0
Set the upper-bounds for this product structure.
bool is_same_type(const any *other) const
True if other is the same type as this.
void enable_invariant_check() const
Enable invariant checking.
virtual abstract_product_structure * clone() const =0
Virtual constructor, makes a new instance of the same type as this.