SheafSystem  0.0.0.0
sheaf::poset_bounds Class Reference

A (lower, upper) bounds pair for a poset. Specifies a portion of a poset for a bounded i/o operation. More...

#include <poset_bounds.h>

Inheritance diagram for sheaf::poset_bounds:
sheaf::any sheaf::member_member_poset_bounds

Public Member Functions

virtual poset_boundsclone () const
 Virtual constructor; makes a new instance of the same type as this. More...
 
virtual bool invariant () const
 Class invariant. More...
 
virtual bool is_ancestor_of (const any *other) const
 Conformance test; true if other conforms to this. More...
 
 poset_bounds ()
 Default constructor. More...
 
 poset_bounds (const poset_bounds &xother)
 Copy constructor. More...
 
 poset_bounds (const poset_bounds_descriptor &xdesc)
 Creates an instance to math descriptor xdesc. More...
 
virtual ~poset_bounds ()
 Destructor. More...
 
virtual poset_bounds_descriptor descriptor () const
 A descriptor for this. More...
 
poset_bounds_descriptor::specification_mode mode () const
 The specification mode. More...
 
pod_index_type lb_id () const
 The index of the lower bound member, if the lower bound contains a single member. More...
 
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. More...
 
void put_lb_id (const scoped_index &xlb_id)
 Sets the index of the lower bound member to xlb_ib, if the lower bound contains a single member. More...
 
bool lb_is_singleton () const
 True if the lower bound contains a single member. More...
 
bool bounded_below () const
 True if the lower bound is not the bottom. More...
 
pod_index_type ub_id () const
 The index of the upper bound member, if the upper bound contains a single member. More...
 
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. More...
 
void put_ub_id (const scoped_index &xub_id)
 Sets the index of the upper bound member to xub_ib, if the upper bound contains a single member. More...
 
bool ub_is_singleton () const
 True if the upper bound contains a single member. More...
 
bool ub_is_decomposition () const
 True if the join of the members of the upper bound is equal to the external schema. More...
 
bool bounded_above () const
 True if the upper bound is not the top. More...
 
- Public Member Functions inherited from sheaf::any
bool is_same_type (const any *other) const
 True if other is the same type as this. More...
 
virtual ~any ()
 Destructor. More...
 
bool invariant_check () const
 True if invariant checking is enabled. More...
 
void enable_invariant_check () const
 Enable invariant checking. More...
 
void disable_invariant_check () const
 Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More...
 
int disable_invariance_check_request_depth () const
 Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More...
 

Protected Attributes

poset_bounds_descriptor _descriptor
 A descriptor for this. More...
 
zn_to_bool_lb
 The lower bound. More...
 
bool _lb_is_singleton
 True if the lower bound contains a single member. More...
 
bool _bounded_below
 True if the lower bound is not the bottom. More...
 
zn_to_bool_ub
 The upper bound. More...
 
bool _ub_is_singleton
 True if the upper bound contains a single member. More...
 
bool _bounded_above
 True if the upper bound is not the top. More...
 

Additional Inherited Members

- Protected Member Functions inherited from sheaf::any
 any ()
 default constructor More...
 

Detailed Description

A (lower, upper) bounds pair for a poset. Specifies a portion of a poset for a bounded i/o operation.

Definition at line 50 of file poset_bounds.h.

Constructor & Destructor Documentation

◆ poset_bounds() [1/3]

sheaf::poset_bounds::poset_bounds ( )

Default constructor.

Hack:
the interface to this class has become a kluge due to two influences: (i) the product subposet hack, and (ii) an unsuccessful attempt to deal efficiently with singleton subposets.
Postcondition

Definition at line 106 of file poset_bounds.cc.

References _bounded_above, _bounded_below, _lb, _lb_is_singleton, _ub, _ub_is_singleton, and invariant().

Referenced by clone(), is_ancestor_of(), and poset_bounds().

◆ poset_bounds() [2/3]

sheaf::poset_bounds::poset_bounds ( const poset_bounds xother)

◆ poset_bounds() [3/3]

sheaf::poset_bounds::poset_bounds ( const poset_bounds_descriptor xdesc)

Creates an instance to math descriptor xdesc.

Definition at line 199 of file poset_bounds.cc.

References _bounded_above, _bounded_below, _descriptor, _lb, _lb_is_singleton, _ub, _ub_is_singleton, lb_id(), sheaf::poset_bounds_descriptor::mode(), ub_id(), and ~poset_bounds().

◆ ~poset_bounds()

sheaf::poset_bounds::~poset_bounds ( )
virtual

Destructor.

Definition at line 270 of file poset_bounds.cc.

References descriptor().

Referenced by poset_bounds().

Member Function Documentation

◆ bounded_above()

bool sheaf::poset_bounds::bounded_above ( ) const

True if the upper bound is not the top.

Definition at line 469 of file poset_bounds.cc.

References _bounded_above.

Referenced by ub_is_decomposition().

◆ bounded_below()

bool sheaf::poset_bounds::bounded_below ( ) const

True if the lower bound is not the bottom.

Definition at line 367 of file poset_bounds.cc.

References _bounded_below, and ub_id().

Referenced by sheaf::member_record::internalize(), and lb_is_singleton().

◆ clone()

sheaf::poset_bounds * sheaf::poset_bounds::clone ( ) const
virtual

Virtual constructor; makes a new instance of the same type as this.

Reimplemented from sheaf::any.

Reimplemented in sheaf::member_member_poset_bounds.

Definition at line 30 of file poset_bounds.cc.

References invariant(), and poset_bounds().

Referenced by sheaf::poset_scaffold::evaluate_toc_alias().

◆ descriptor()

sheaf::poset_bounds_descriptor sheaf::poset_bounds::descriptor ( ) const
virtual

A descriptor for this.

Definition at line 287 of file poset_bounds.cc.

References _descriptor, and mode().

Referenced by sheaf::poset_state_handle::bound_contains_member(), and ~poset_bounds().

◆ invariant()

bool sheaf::poset_bounds::invariant ( ) const
virtual

◆ is_ancestor_of()

bool sheaf::poset_bounds::is_ancestor_of ( const any other) const
virtual

Conformance test; true if other conforms to this.

Precondition
  • other != 0

Reimplemented from sheaf::any.

Reimplemented in sheaf::member_member_poset_bounds.

Definition at line 82 of file poset_bounds.cc.

References poset_bounds().

Referenced by invariant().

◆ lb_id()

◆ lb_is_singleton()

◆ mode()

sheaf::poset_bounds_descriptor::specification_mode sheaf::poset_bounds::mode ( ) const

The specification mode.

Definition at line 294 of file poset_bounds.cc.

References _descriptor, lb_id(), and sheaf::poset_bounds_descriptor::mode().

Referenced by descriptor().

◆ put_lb_id() [1/2]

void sheaf::poset_bounds::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.

Precondition
Postcondition

Definition at line 309 of file poset_bounds.cc.

References _descriptor, lb_id(), lb_is_singleton(), and sheaf::poset_bounds_descriptor::put_lb_id().

Referenced by lb_id().

◆ put_lb_id() [2/2]

void sheaf::poset_bounds::put_lb_id ( const scoped_index xlb_id)

Sets the index of the lower bound member to xlb_ib, if the lower bound contains a single member.

Precondition
Postcondition

Definition at line 330 of file poset_bounds.cc.

References _descriptor, sheaf::scoped_index::hub_pod(), lb_id(), lb_is_singleton(), and sheaf::poset_bounds_descriptor::put_lb_id().

◆ put_ub_id() [1/2]

void sheaf::poset_bounds::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.

Precondition
Postcondition

Definition at line 389 of file poset_bounds.cc.

References _descriptor, sheaf::poset_bounds_descriptor::put_ub_id(), ub_id(), and ub_is_singleton().

Referenced by sheaf::poset_scaffold::initialize_schema_for_read(), sheaf::poset_scaffold::put_member_names_to_poset(), and ub_id().

◆ put_ub_id() [2/2]

void sheaf::poset_bounds::put_ub_id ( const scoped_index xub_id)

Sets the index of the upper bound member to xub_ib, if the upper bound contains a single member.

Precondition
Postcondition

Definition at line 410 of file poset_bounds.cc.

References _descriptor, sheaf::scoped_index::hub_pod(), sheaf::poset_bounds_descriptor::put_ub_id(), ub_id(), and ub_is_singleton().

◆ ub_id()

◆ ub_is_decomposition()

bool sheaf::poset_bounds::ub_is_decomposition ( ) const

True if the join of the members of the upper bound is equal to the external schema.

Hack:
avoid expense of computing join by assuming if bound is subposet then join is external schema.

Definition at line 447 of file poset_bounds.cc.

References _ub_is_singleton, and bounded_above().

Referenced by sheaf::poset_scaffold::initialize_schema_for_read(), sheaf::poset_scaffold::put_member_names_to_poset(), and ub_is_singleton().

◆ ub_is_singleton()

Member Data Documentation

◆ _bounded_above

bool sheaf::poset_bounds::_bounded_above
protected

True if the upper bound is not the top.

Definition at line 217 of file poset_bounds.h.

Referenced by bounded_above(), sheaf::member_member_poset_bounds::member_member_poset_bounds(), and poset_bounds().

◆ _bounded_below

bool sheaf::poset_bounds::_bounded_below
protected

True if the lower bound is not the bottom.

Definition at line 202 of file poset_bounds.h.

Referenced by bounded_below(), sheaf::member_member_poset_bounds::member_member_poset_bounds(), and poset_bounds().

◆ _descriptor

poset_bounds_descriptor sheaf::poset_bounds::_descriptor
protected

A descriptor for this.

Definition at line 187 of file poset_bounds.h.

Referenced by descriptor(), lb_id(), mode(), poset_bounds(), put_lb_id(), put_ub_id(), and ub_id().

◆ _lb

zn_to_bool* sheaf::poset_bounds::_lb
protected

The lower bound.

Definition at line 192 of file poset_bounds.h.

Referenced by poset_bounds().

◆ _lb_is_singleton

bool sheaf::poset_bounds::_lb_is_singleton
protected

True if the lower bound contains a single member.

Definition at line 197 of file poset_bounds.h.

Referenced by lb_is_singleton(), sheaf::member_member_poset_bounds::member_member_poset_bounds(), and poset_bounds().

◆ _ub

zn_to_bool* sheaf::poset_bounds::_ub
protected

The upper bound.

Definition at line 207 of file poset_bounds.h.

Referenced by poset_bounds().

◆ _ub_is_singleton

bool sheaf::poset_bounds::_ub_is_singleton
protected

True if the upper bound contains a single member.

Definition at line 212 of file poset_bounds.h.

Referenced by sheaf::member_member_poset_bounds::member_member_poset_bounds(), poset_bounds(), ub_is_decomposition(), and ub_is_singleton().


The documentation for this class was generated from the following files: