20 #include "SheafSystem/poset_bounds.h" 22 #include "SheafSystem/assert_contract.h" 93 bool result =
dynamic_cast<const poset_bounds*
>(other) != 0;
140 case poset_bounds_descriptor::MEMBER_MEMBER:
153 case poset_bounds_descriptor::MEMBER_SUBPOSET:
165 case poset_bounds_descriptor::SUBPOSET_MEMBER:
177 case poset_bounds_descriptor::SUBPOSET_SUBPOSET:
189 post_fatal_error_message(
"unrecognized specification mode");
209 case poset_bounds_descriptor::MEMBER_MEMBER:
222 case poset_bounds_descriptor::MEMBER_SUBPOSET:
234 case poset_bounds_descriptor::SUBPOSET_MEMBER:
246 case poset_bounds_descriptor::SUBPOSET_SUBPOSET:
258 post_fatal_error_message(
"unrecognized specification mode");
321 ensure(
lb_id() == xlb_id);
401 ensure(
ub_id() == xub_id);
virtual bool invariant() const
Class invariant, intended to be redefined in each descendant. See below for template for invariant in...
bool _bounded_below
True if the lower bound is not the bottom.
pod_index_type ub_id() const
The index of the upper bound member, if the upper bound contains a single member. ...
bool lb_is_singleton() const
True if the lower bound contains a single member.
bool bounded_below() const
True if the lower bound is not the bottom.
bool _bounded_above
True if the upper bound is not the top.
void put_lb_id(pod_index_type xlb_id)
Sets the index of the lower bound member to xlb_ib, if the lower bound contains a single member...
pod_index_type ub_id() const
The index of the upper bound member, if the upper bound contains a single member. ...
A (lower, upper) bounds pair for a poset. Specifies a portion of a poset for a bounded i/o operation...
void put_lb_id(pod_index_type xlb_id)
Sets the index of the lower bound to xlb_id.
poset_bounds_descriptor::specification_mode mode() const
The specification mode.
void put_ub_id(pod_index_type xub_id)
Sets the index of the upper bound member to xub_ib, if the upper bound contains a single member...
Abstract base class with useful features for all objects.
A map from Zn (the integers mod n) to bools. A characteristic function used to represent subsets of Z...
specification_mode
Enumeration for mode of specifying the lower and upper bounds.
virtual ~poset_bounds()
Destructor.
bool _ub_is_singleton
True if the upper bound contains a single member.
An index within the external ("client") scope of a given id space.
bool _lb_is_singleton
True if the lower bound contains a single member.
pod_index_type lb_id() const
The index of the lower bound.
bool ub_is_decomposition() const
True if the join of the members of the upper bound is equal to the external schema.
bool ub_is_singleton() const
True if the upper bound contains a single member.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
zn_to_bool * _lb
The lower bound.
zn_to_bool * _ub
The upper bound.
A description of a (lower, upper) bounds pair for a poset. Specifies a portion of a poset for a bound...
bool bounded_above() const
True if the upper bound is not the top.
bool invariant_check() const
True if invariant checking is enabled.
int_type pod_index_type
The plain old data index type.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
pod_index_type lb_id() const
The index of the lower bound member, if the lower bound contains a single member. ...
poset_bounds()
Default constructor.
virtual poset_bounds_descriptor descriptor() const
A descriptor for this.
poset_bounds_descriptor _descriptor
A descriptor for this.
void enable_invariant_check() const
Enable invariant checking.
void put_ub_id(pod_index_type xub_id)
Sets the index of the upper bound to xub_id.
virtual poset_bounds * clone() const
Virtual constructor; makes a new instance of the same type as this.
specification_mode mode() const
Specification mode for this.
virtual bool invariant() const
Class invariant.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.