SheafSystem  0.0.0.0
sheaf::poset_crg_state Class Reference

The data structure representing the cover relation graph of a poset. More...

#include <poset_crg_state.h>

Inheritance diagram for sheaf::poset_crg_state:
sheaf::any

Friends

class poset_state_handle
 
class poset_state
 
class crg_interval
 
class member_record_set
 
SHEAF_DLL_SPEC size_t deep_size (const poset_crg_state &xp, bool xinclude_shallow, size_t xresults[2])
 The deep size of the referenced object of type poset_crg_state; if xinclude_shallow, add the sizeof xp to the result. More...
 

POSET_CRG_STATE FACET

 poset_crg_state ()
 Creates an instance. More...
 
 ~poset_crg_state ()
 Destructor. More...
 

MEMBERSHIP (NODES) FACET

pod_index_type new_member ()
 Create a new member with explicit lower and upper cover. More...
 
void new_member (pod_index_type xid)
 Create a new member with id xid and explicit lower and upper cover. More...
 
void new_standard_member_hack (standard_member_index xid)
 Create a new bottom or top member. More...
 
pod_index_type new_member_interval (const std::string &xinterval_type, size_type xsize)
 Create an implicit interval of type xinterval_type with size xsize. More...
 
void new_member_interval (pod_index_type xid, const std::string &xinterval_type, size_type xsize)
 Create an implicit interval beginning at xid, of type xinterval_type, and with size xsize. More...
 
void delete_member (pod_index_type xid)
 Delete member with index xid. More...
 
void delete_interval (pod_index_type xid)
 Delete the entire implicit interval that contains the implicit member with index xid. More...
 
size_type member_ct () const
 The number of members. More...
 
size_type standard_member_ct ()
 The number of standard members automatically allocated by the poset handle constructor (mutable version). More...
 
size_type standard_member_ct () const
 The number of standard members automatically allocated by the poset handle constructor (const version). More...
 
void put_standard_member_ct (size_type xct)
 Put the number of standard members automatically allocated by the poset handle constructor. More...
 
const scoped_indexbegin () const
 The beginning of the member interval; members have indices in the interval [begin(), end()). More...
 
const scoped_indexend () const
 The end of the member interval; members have indices in the interval [begin(), end()). More...
 
bool contains_member (pod_index_type xid) const
 True if and only if there exists a member with index xid. More...
 
bool contains_implicit_member (pod_index_type xid) const
 True if and only if there exists an implicit member with index xid. A member is implicit if it has implicit covers. Note that an implicit member may also have explicit covers. More...
 
bool contains_explicit_member (pod_index_type xid) const
 True if and only if there exists an fully explicit member with index xid. A member is fully explicit if it is not implicit, that is, it does not have implicit covers. More...
 
const crg_intervalinterval (pod_index_type xid) const
 The interval for the member with index xid (const version). More...
 
crg_intervalinterval (pod_index_type xid)
 The interval for the member with index xid (mutable version). More...
 
implicit_crg_intervalimplicit_member (pod_index_type xid) const
 The implicit interval for the member with index xid. Returns null, if no implicit interval exists. More...
 
void initialize_member_covers (pod_index_type xid, bool xstandard_member_hack=false)
 Initialize the upper and lower covers for member with index xid. More...
 

ID SPACE FACET

const index_space_familyid_spaces () const
 Collection of id spaces for this poset. More...
 
const hub_index_space_handlehub_id_space () const
 Hub id space for this poset. More...
 
const scoped_indexhub_id () const
 A id in the hub id space; intended for copying to initialize ids to the hub id space. More...
 
scoped_index hub_id (pod_index_type xid) const
 A id in the hub id space with pod xid. More...
 
const index_space_handlenew_gathered_hub_id_space (bool xexclude_bottom)
 Create a new gathered id space from the hub id space. If xexclude_bottom, construct the id space without BOTTOM_INDEX. More...
 
void update_gathered_hub_id_space ()
 Updates the gathered hub id space. More...
 
const index_space_handlegathered_hub_id_space () const
 The gathered hub id space. More...
 
bool has_gathered_hub_id_space () const
 True if there is a gathered hub id space. More...
 
bool gathered_hub_id_space_excludes_bottom () const
 True, if the gathered hub id space excludes BOTTOM_INDEX. More...
 

MEMBER NAME FACET

typedef name_multimap member_name_map_type
 The type of the member_name_map. More...
 
member_name_map_typemember_name_map ()
 Bi-directional map between member names and indices. More...
 
const member_name_map_typemember_name_map () const
 Bi-directional map between member names and indices; const version. More...
 

EDIT MODE FACET

bool jim_edit_mode () const
 True if jim editing is enabled. More...
 
void request_jim_edit_mode ()
 Request jim editing be enabled. More...
 
void release_jim_edit_mode ()
 Request jim editing be disabled. More...
 
int jim_edit_depth () const
 Jim edit mode depth counter. More...
 

COVER SET (LINKS) FACET

bool cover_is_explicit (bool xlower, pod_index_type xmbr_index) const
 True if and only if the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index is explicit. More...
 
bool cover_is_implicit (bool xlower, pod_index_type xmbr_index) const
 True if and only if the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index is implicit. Note that a cover can be both explict and implicit. More...
 
pod_index_type cover_id_space_id (bool xlower, pod_index_type xmbr_index) const
 The id for the lower (xlower true) or upper (xlower false) cover id space with index xmbr_index. More...
 
index_space_handleget_cover_id_space (bool xlower, pod_index_type xmbr_index) const
 Allocates an handle for the lower (xlower true) or upper (xlower false) cover of member with index xmbr_index from the pool of id spaces. More...
 
template<typename handle_type >
handle_type & get_cover_id_space (bool xlower, pod_index_type xmbr_index) const
 Allocates an handle of type handle_type for the lower (xlower true) or upper (xlower false) cover of member with index xmbr_index from the pool of id spaces. More...
 
template<typename handle_type >
bool cover_id_space_handle_conforms_to (bool xlower, pod_index_type xmbr_index) const
 True if a handle for the lower (xlower true) or upper (xlower false) cover id space of the member with hub id xmbr_index conforms to a handle of type handle_type. More...
 
void release_cover_id_space (index_space_handle &xcover_id_space) const
 Returns cover handle xcover_id_space to the pool of id spaces. More...
 
index_space_iteratorget_cover_id_space_iterator (bool xlower, pod_index_type xmbr_index) const
 Allocates an iterator for for the lower (xlower true) or upper (xlower false) cover of member with index xmbr_index from the pool of id spaces. More...
 
void release_cover_id_space_iterator (index_space_iterator &xcover_itr) const
 Returns cover iterator xcover_itr to the pool of id spaces. More...
 
bool cover_contains_iterator (bool xlower, pod_index_type xmbr_index, const index_space_iterator &xitr) const
 True if and only if the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index is the domain of iterator xitr. More...
 
bool 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 of the member with index xmbr_index is empty. More...
 
bool cover_is_singleton (bool xlower, pod_index_type xmbr_index) const
 True if and only if the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index contains exactly one member. More...
 
size_type cover_ct (bool xlower, pod_index_type xmbr_index) const
 The number of members in the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index. More...
 
bool cover_contains_member (bool xlower, pod_index_type xmbr_index, pod_index_type xother_mbr_index) const
 True if and only if the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index contains xother_mbr_index. More...
 
bool cover_is_equal (bool xlower, pod_index_type xmbr_index, pod_index_type xother_mbr_index) const
 True if and only if the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index contains the same members as the lower or upper cover, respectively, of the member with index xother_mbr_index. More...
 
pod_index_type first_cover_member (bool xlower, pod_index_type xmbr_index) const
 The first member of the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index. More...
 
void insert_cover_member (pod_index_type xother_mbr_index, bool xlower, pod_index_type xmbr_index)
 Inserts xother_mbr_index in the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index. More...
 
void insert_cover_member (pod_index_type xother_mbr_index, bool xlower, pod_index_type xmbr_index, index_space_iterator &xitr)
 Inserts xother_mbr_index in the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index, at a position just before xitr. Increments xitr to the position after the inserted entry. More...
 
void remove_cover_member (pod_index_type xother_mbr_index, bool xlower, pod_index_type xmbr_index)
 Removes xother_mbr_index from the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index. More...
 
void remove_cover_member (index_space_iterator &xitr, bool xlower, pod_index_type xmbr_index)
 Removes the current item of xitr from the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index. If xitr is at the end, forces xitr.is_done(). Otherwise, increments xitr to the next position. More...
 
template<typename filter_type >
void remove_cover_members (const filter_type &xfilter, bool xlower, pod_index_type xmbr_index)
 Removes all members for which functor xfilter(xmbr.index().top_pod()) is true from the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index. More...
 
void replace_cover_member (pod_index_type xold_other_mbr_index, pod_index_type xnew_other_mbr_index, bool xlower, pod_index_type xmbr_index)
 Replaces xold_other_mbr_index with xnew_other_mbr_index in the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index. More...
 
void clear_cover (bool xlower, pod_index_type xmbr_index)
 Clears the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index. More...
 
void copy_cover (bool xlower, pod_index_type xmbr_index, pod_index_type xother_mbr_index)
 Copies the lower (xlower true) or upper (xlower false) cover from the member with index xmbr_index to the member with index xother_mbr_index. More...
 
void append_upper_cover_of_bottom (pod_index_type xmbr_begin, pod_index_type xmbr_end)
 Appends the interval of ids [xbegin, xend) to the upper cover of bottom. This function is intended to use by block members that store there vertices in a gathered id space. More...
 
pod_index_type force_explicit_cover (bool xlower, pod_index_type xmbr_index, bool xinitialize=true)
 The explicit lower (xlower true) or upper (xlower false) cover id space of the member with index xmbr_index; creates an explict cover id space if the cover id space is not already explicit and, if xinitialize, initializes it with the contents of the implicit cover id space, if any. Returns the space id of the explicit cover. More...
 

DOF_TUPLE_ID FACET

pod_index_type member_dof_tuple_id (pod_index_type xmbr_index) const
 The dof tuple index of the member with index xmbr_index; invalid if xmbr_index has not dof tuple. More...
 
void put_member_dof_tuple_id (pod_index_type xmbr_index, pod_index_type xdof_tuple_id)
 Sets the dof tuple index of the member with index xmbr_index to xdof_tuple_id. More...
 

I/O SUPPORT FACET

void clean_cover (bool xlower, pod_index_type xmbr_index)
 Removes members of the cover that are no longer members of the crg. More...
 
void explicit_down_set_members (const implicit_crg_interval &xinterval, std::set< pod_index_type > &result) const
 The explicit members in the downset of the interval xinterval. More...
 
void explicit_down_set_members (pod_index_type xmbr_index, std::set< pod_index_type > &result) const
 The explicit members in the downset of member with index xmbr_index. More...
 

ANY FACET

virtual bool is_ancestor_of (const any *other) const
 True if other conforms to current. More...
 
virtual poset_crg_stateclone () const
 Make a new instance of the same type as this. More...
 
virtual bool invariant () const
 Class invariant. More...
 

Additional Inherited Members

- 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 Member Functions inherited from sheaf::any
 any ()
 default constructor More...
 

Detailed Description

The data structure representing the cover relation graph of a poset.

Definition at line 78 of file poset_crg_state.h.

Member Typedef Documentation

◆ member_name_map_type

The type of the member_name_map.

Definition at line 348 of file poset_crg_state.h.

Constructor & Destructor Documentation

◆ poset_crg_state()

sheaf::poset_crg_state::poset_crg_state ( )

Creates an instance.

Postcondition

Definition at line 49 of file poset_crg_state.cc.

References ~poset_crg_state().

◆ ~poset_crg_state()

sheaf::poset_crg_state::~poset_crg_state ( )

Destructor.

Definition at line 80 of file poset_crg_state.cc.

References new_member().

Referenced by poset_crg_state().

Member Function Documentation

◆ append_upper_cover_of_bottom()

void sheaf::poset_crg_state::append_upper_cover_of_bottom ( pod_index_type  xmbr_begin,
pod_index_type  xmbr_end 
)

Appends the interval of ids [xbegin, xend) to the upper cover of bottom. This function is intended to use by block members that store there vertices in a gathered id space.

Precondition
  • xmbr_end > xmbr_begin
  • cover_is_empty(UPPER, BOTTOM_INDEX) || id_spaces().handle_conforms_to_state<interval_index_space_handle>(cover_id_space_id(UPPER, BOTTOM_INDEX))
  • for( pod_index_type i=xmbr_begin ; i<xmbr_end ; ++i ) contains_member(i)
Hack:
This function is only a temporary fix to avoid a problem size id space for the upper cover of bottom and will be replaced by a templatized get_cover_id_space in the future.
Postcondition
  • id_spaces().handle_conforms_to_state<interval_index_space_handle>(cover_id_space_id(UPPER, BOTTOM_INDEX))
  • for( pod_index_type i=xmbr_begin ; i<xmbr_end ; ++i ) cover_contains_member(UPPER, BOTTOM_INDEX, i)

Definition at line 1559 of file poset_crg_state.cc.

References force_explicit_cover(), sheaf::explicit_index_space_handle::get_id_space(), sheaf::interval_index_space_handle::push_interval(), and sheaf::UPPER.

Referenced by copy_cover().

◆ begin()

const sheaf::scoped_index & sheaf::poset_crg_state::begin ( ) const

The beginning of the member interval; members have indices in the interval [begin(), end()).

Definition at line 527 of file poset_crg_state.cc.

References end().

Referenced by sheaf::operator<<(), and put_standard_member_ct().

◆ clean_cover()

void sheaf::poset_crg_state::clean_cover ( bool  xlower,
pod_index_type  xmbr_index 
)

Removes members of the cover that are no longer members of the crg.

Precondition
  • contains_member(xmbr_index)
Todo:
Reimplement or design out of the io system.

Definition at line 1712 of file poset_crg_state.cc.

References explicit_down_set_members().

Referenced by sheaf::member_record_set::make_internal_dataspace(), and put_member_dof_tuple_id().

◆ clear_cover()

void sheaf::poset_crg_state::clear_cover ( bool  xlower,
pod_index_type  xmbr_index 
)

Clears the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index.

Deprecated:
Should use get_cover_id_space.
Precondition
  • contains_member(xmbr_index)
Postcondition
  • cover_is_empty(xlower, xmbr_index)

Definition at line 1497 of file poset_crg_state.cc.

References sheaf::gathered_insertion_index_space_handle::clear(), copy_cover(), and sheaf::explicit_index_space_handle::get_id_space().

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

◆ clone()

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

Make a new instance of the same type as this.

Not Implemented.

Postcondition
  • result != 0

Reimplemented from sheaf::any.

Definition at line 1849 of file poset_crg_state.cc.

References invariant().

Referenced by is_ancestor_of().

◆ contains_explicit_member()

bool sheaf::poset_crg_state::contains_explicit_member ( pod_index_type  xid) const

True if and only if there exists an fully explicit member with index xid. A member is fully explicit if it is not implicit, that is, it does not have implicit covers.

Definition at line 565 of file poset_crg_state.cc.

References interval().

Referenced by contains_implicit_member().

◆ contains_implicit_member()

bool sheaf::poset_crg_state::contains_implicit_member ( pod_index_type  xid) const

True if and only if there exists an implicit member with index xid. A member is implicit if it has implicit covers. Note that an implicit member may also have explicit covers.

Definition at line 558 of file poset_crg_state.cc.

References contains_explicit_member().

Referenced by contains_member().

◆ contains_member()

bool sheaf::poset_crg_state::contains_member ( pod_index_type  xid) const

True if and only if there exists a member with index xid.

Definition at line 541 of file poset_crg_state.cc.

References contains_implicit_member().

Referenced by end(), sheaf::member_record::internalize(), and sheaf::operator<<().

◆ copy_cover()

void sheaf::poset_crg_state::copy_cover ( bool  xlower,
pod_index_type  xmbr_index,
pod_index_type  xother_mbr_index 
)

Copies the lower (xlower true) or upper (xlower false) cover from the member with index xmbr_index to the member with index xother_mbr_index.

Deprecated:
Should use get_cover_id_space.
Precondition
  • contains_member(xmbr_index)
  • contains_member(xother_mbr_index)
Postcondition
  • cover_is_equal(xlower, xmbr_index, xother_mbr_index)

Definition at line 1524 of file poset_crg_state.cc.

References append_upper_cover_of_bottom(), sheaf::gathered_insertion_index_space_handle::clear(), sheaf::explicit_index_space_handle::get_id_space(), sheaf::index_space_iterator::hub_pod(), sheaf::index_space_iterator::is_done(), sheaf::index_space_iterator::next(), and sheaf::gathered_insertion_index_space_handle::push_back().

Referenced by clear_cover().

◆ cover_contains_iterator()

bool sheaf::poset_crg_state::cover_contains_iterator ( bool  xlower,
pod_index_type  xmbr_index,
const index_space_iterator xitr 
) const

True if and only if the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index is the domain of iterator xitr.

Deprecated:
Should use get_cover_id_space.
Precondition
  • contains_member(xmbr_index)

Definition at line 1122 of file poset_crg_state.cc.

References sheaf::index_space_handle::allocated_iterator(), and cover_is_empty().

Referenced by release_cover_id_space_iterator().

◆ cover_contains_member()

bool sheaf::poset_crg_state::cover_contains_member ( bool  xlower,
pod_index_type  xmbr_index,
pod_index_type  xother_mbr_index 
) const

True if and only if the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index contains xother_mbr_index.

Deprecated:
Should use get_cover_id_space.
Precondition
  • contains_member(xmbr_index)

Definition at line 1210 of file poset_crg_state.cc.

References cover_is_equal().

Referenced by cover_ct().

◆ cover_ct()

sheaf::size_type sheaf::poset_crg_state::cover_ct ( bool  xlower,
pod_index_type  xmbr_index 
) const

The number of members in the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index.

Deprecated:
Should use get_cover_id_space.
Precondition
  • contains_member(xmbr_index)

Definition at line 1189 of file poset_crg_state.cc.

References cover_contains_member().

Referenced by cover_is_singleton(), sheaf::member_record::external_size(), and sheaf::operator<<().

◆ cover_id_space_handle_conforms_to()

template<typename handle_type >
bool sheaf::poset_crg_state::cover_id_space_handle_conforms_to ( bool  xlower,
pod_index_type  xmbr_index 
) const

True if a handle for the lower (xlower true) or upper (xlower false) cover id space of the member with hub id xmbr_index conforms to a handle of type handle_type.

Precondition
  • contains_member(xmbr_index)

Definition at line 78 of file poset_crg_state.impl.h.

References remove_cover_members().

Referenced by sheaf::poset_state_handle::cover_id_space_handle_conforms_to(), and get_cover_id_space().

◆ cover_id_space_id()

sheaf::pod_index_type sheaf::poset_crg_state::cover_id_space_id ( bool  xlower,
pod_index_type  xmbr_index 
) const

The id for the lower (xlower true) or upper (xlower false) cover id space with index xmbr_index.

Precondition
  • contains_member(xmbr_index)
Postcondition
  • is_valid(result)

Definition at line 1060 of file poset_crg_state.cc.

References get_cover_id_space_iterator(), and sheaf::is_valid().

Referenced by release_cover_id_space().

◆ cover_is_empty()

bool sheaf::poset_crg_state::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 of the member with index xmbr_index is empty.

Deprecated:
Should use get_cover_id_space.
Precondition
  • contains_member(xmbr_index)

Definition at line 1147 of file poset_crg_state.cc.

References cover_is_singleton().

Referenced by cover_contains_iterator().

◆ cover_is_equal()

bool sheaf::poset_crg_state::cover_is_equal ( bool  xlower,
pod_index_type  xmbr_index,
pod_index_type  xother_mbr_index 
) const

True if and only if the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index contains the same members as the lower or upper cover, respectively, of the member with index xother_mbr_index.

Deprecated:
Should use get_cover_id_space.
Precondition
  • contains_member(xmbr_index)
  • contains_member(xother_mbr_index)

Definition at line 1233 of file poset_crg_state.cc.

References first_cover_member(), sheaf::index_space_iterator::hub_pod(), sheaf::index_space_iterator::is_done(), and sheaf::index_space_iterator::next().

Referenced by cover_contains_member().

◆ cover_is_explicit()

bool sheaf::poset_crg_state::cover_is_explicit ( bool  xlower,
pod_index_type  xmbr_index 
) const

True if and only if the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index is explicit.

Precondition
  • contains_member(xmbr_index)

Definition at line 995 of file poset_crg_state.cc.

References cover_is_implicit().

Referenced by sheaf::member_record::external_size(), sheaf::member_record::externalize(), and jim_edit_depth().

◆ cover_is_implicit()

bool sheaf::poset_crg_state::cover_is_implicit ( bool  xlower,
pod_index_type  xmbr_index 
) const

True if and only if the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index is implicit. Note that a cover can be both explict and implicit.

Definition at line 1008 of file poset_crg_state.cc.

References get_cover_id_space().

Referenced by cover_is_explicit().

◆ cover_is_singleton()

bool sheaf::poset_crg_state::cover_is_singleton ( bool  xlower,
pod_index_type  xmbr_index 
) const

True if and only if the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index contains exactly one member.

Deprecated:
Should use get_cover_id_space.
Precondition
  • contains_member(xmbr_index)

Definition at line 1168 of file poset_crg_state.cc.

References cover_ct().

Referenced by cover_is_empty().

◆ delete_interval()

void sheaf::poset_crg_state::delete_interval ( pod_index_type  xid)

Delete the entire implicit interval that contains the implicit member with index xid.

Precondition
  • contains_member(xid)
Postcondition
  • for( pod_index_type i = old_interval_begin ; i < old_interval_end ; ++i ) !contains_member(i)

Definition at line 434 of file poset_crg_state.cc.

References sheaf::crg_interval::begin(), sheaf::crg_interval::cover_id_space_id(), sheaf::crg_interval::end(), sheaf::LOWER, member_ct(), sheaf::crg_interval::size(), and sheaf::UPPER.

Referenced by delete_member().

◆ delete_member()

void sheaf::poset_crg_state::delete_member ( pod_index_type  xid)

Delete member with index xid.

Precondition
  • contains_member(xid)
Postcondition
  • !contains_member(xid)

Definition at line 377 of file poset_crg_state.cc.

References sheaf::crg_interval::cover_id_space_id(), sheaf::crg_interval::cover_is_explicit(), delete_interval(), sheaf::LOWER, and sheaf::UPPER.

Referenced by new_member_interval().

◆ end()

const sheaf::scoped_index & sheaf::poset_crg_state::end ( ) const

The end of the member interval; members have indices in the interval [begin(), end()).

Definition at line 534 of file poset_crg_state.cc.

References contains_member().

Referenced by begin(), sheaf::poset_state::invariant(), sheaf::operator<<(), and sheaf::poset_state::poset_state().

◆ explicit_down_set_members() [1/2]

void sheaf::poset_crg_state::explicit_down_set_members ( const implicit_crg_interval xinterval,
std::set< pod_index_type > &  result 
) const

◆ explicit_down_set_members() [2/2]

void sheaf::poset_crg_state::explicit_down_set_members ( pod_index_type  xmbr_index,
std::set< pod_index_type > &  result 
) const
protected

The explicit members in the downset of member with index xmbr_index.

Precondition
  • contains_member(xmbr_index)

Definition at line 1781 of file poset_crg_state.cc.

References sheaf::crg_interval::cover_is_explicit(), sheaf::index_space_iterator::hub_pod(), is_ancestor_of(), sheaf::index_space_iterator::is_done(), sheaf::LOWER, and sheaf::index_space_iterator::next().

◆ first_cover_member()

sheaf::pod_index_type sheaf::poset_crg_state::first_cover_member ( bool  xlower,
pod_index_type  xmbr_index 
) const

The first member of the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index.

Deprecated:
Should use get_cover_id_space.
Precondition
  • contains_member(xmbr_index)
  • !cover_is_empty(xlower, xmbr_index)

Definition at line 1283 of file poset_crg_state.cc.

References insert_cover_member().

Referenced by cover_is_equal().

◆ force_explicit_cover()

sheaf::pod_index_type sheaf::poset_crg_state::force_explicit_cover ( bool  xlower,
pod_index_type  xmbr_index,
bool  xinitialize = true 
)
protected

The explicit lower (xlower true) or upper (xlower false) cover id space of the member with index xmbr_index; creates an explict cover id space if the cover id space is not already explicit and, if xinitialize, initializes it with the contents of the implicit cover id space, if any. Returns the space id of the explicit cover.

Precondition
  • contains_member(xmbr_index)
Postcondition
  • id_spaces().handle_conforms_to_state<list_index_space_handle>(result)

Definition at line 1620 of file poset_crg_state.cc.

References member_dof_tuple_id().

Referenced by append_upper_cover_of_bottom().

◆ gathered_hub_id_space()

const sheaf::index_space_handle & sheaf::poset_crg_state::gathered_hub_id_space ( ) const

The gathered hub id space.

Precondition
Postcondition
  • is_basic_query

Definition at line 827 of file poset_crg_state.cc.

References has_gathered_hub_id_space().

Referenced by update_gathered_hub_id_space().

◆ gathered_hub_id_space_excludes_bottom()

bool sheaf::poset_crg_state::gathered_hub_id_space_excludes_bottom ( ) const

True, if the gathered hub id space excludes BOTTOM_INDEX.

Postcondition
  • is_basic_query

Definition at line 867 of file poset_crg_state.cc.

References member_name_map().

Referenced by has_gathered_hub_id_space().

◆ get_cover_id_space() [1/2]

sheaf::index_space_handle & sheaf::poset_crg_state::get_cover_id_space ( bool  xlower,
pod_index_type  xmbr_index 
) const

Allocates an handle for the lower (xlower true) or upper (xlower false) cover of member with index xmbr_index from the pool of id spaces.

Precondition
  • contains_member(xmbr_index)
Postcondition
  • result.is_attached()

Definition at line 1018 of file poset_crg_state.cc.

References sheaf::index_space_handle::get_id_space(), sheaf::index_space_handle::is_attached(), and release_cover_id_space().

Referenced by cover_is_implicit(), and sheaf::poset_state_handle::get_cover_id_space().

◆ get_cover_id_space() [2/2]

template<typename handle_type >
handle_type & sheaf::poset_crg_state::get_cover_id_space ( bool  xlower,
pod_index_type  xmbr_index 
) const

Allocates an handle of type handle_type for the lower (xlower true) or upper (xlower false) cover of member with index xmbr_index from the pool of id spaces.

Precondition
  • contains_member(xmbr_index)
  • cover_id_space_handle_conforms_to<handle_type>(xlower, xmbr_index)
Postcondition
  • result.is_attached()

Definition at line 54 of file poset_crg_state.impl.h.

References cover_id_space_handle_conforms_to().

◆ get_cover_id_space_iterator()

sheaf::index_space_iterator & sheaf::poset_crg_state::get_cover_id_space_iterator ( bool  xlower,
pod_index_type  xmbr_index 
) const

Allocates an iterator for for the lower (xlower true) or upper (xlower false) cover of member with index xmbr_index from the pool of id spaces.

Precondition
  • contains_member(xmbr_index)
Postcondition
  • result.is_attached()

Definition at line 1081 of file poset_crg_state.cc.

References sheaf::index_space_iterator::is_attached(), and release_cover_id_space_iterator().

Referenced by cover_id_space_id(), and sheaf::operator<<().

◆ has_gathered_hub_id_space()

bool sheaf::poset_crg_state::has_gathered_hub_id_space ( ) const

True if there is a gathered hub id space.

Postcondition
  • is_basic_query

Definition at line 848 of file poset_crg_state.cc.

References gathered_hub_id_space_excludes_bottom().

Referenced by gathered_hub_id_space().

◆ hub_id() [1/2]

const sheaf::scoped_index & sheaf::poset_crg_state::hub_id ( ) const

A id in the hub id space; intended for copying to initialize ids to the hub id space.

Postcondition
  • result.is_hub_scope()

Definition at line 742 of file poset_crg_state.cc.

References sheaf::scoped_index::is_hub_scope().

Referenced by hub_id_space().

◆ hub_id() [2/2]

sheaf::scoped_index sheaf::poset_crg_state::hub_id ( pod_index_type  xid) const

A id in the hub id space with pod xid.

Postcondition
  • result.is_hub_scope()
  • result.pod() == xid

Definition at line 761 of file poset_crg_state.cc.

References sheaf::scoped_index::is_hub_scope(), new_gathered_hub_id_space(), and sheaf::scoped_index::pod().

◆ hub_id_space()

const sheaf::hub_index_space_handle & sheaf::poset_crg_state::hub_id_space ( ) const

Hub id space for this poset.

Definition at line 735 of file poset_crg_state.cc.

References hub_id(), and sheaf::index_space_handle::hub_id_space().

Referenced by id_spaces().

◆ id_spaces()

const sheaf::index_space_family & sheaf::poset_crg_state::id_spaces ( ) const

Collection of id spaces for this poset.

Definition at line 728 of file poset_crg_state.cc.

References hub_id_space().

Referenced by initialize_member_covers(), and sheaf::operator<<().

◆ implicit_member()

sheaf::implicit_crg_interval * sheaf::poset_crg_state::implicit_member ( pod_index_type  xid) const

◆ initialize_member_covers()

void sheaf::poset_crg_state::initialize_member_covers ( pod_index_type  xid,
bool  xstandard_member_hack = false 
)
protected

Initialize the upper and lower covers for member with index xid.

Hack:
Cartesian product subspace hack; xstandard_member_hack argument is intended only for use by section_space_schema_poset constructor If xstandard_member_hack is true, only support covers for top and bottom.
Precondition
  • contains_member(xid)
Hack:
Cartesian product subspace hack; xstandard_member_hack argument is intended only for use by section_space_schema_poset constructor.
Postcondition
  • cover_is_empty(LOWER, xid)
  • cover_is_empty(UPPER, xid)

Definition at line 637 of file poset_crg_state.cc.

References sheaf::crg_interval::begin(), sheaf::crg_interval::cover_id_space_id(), sheaf::crg_interval::end(), id_spaces(), sheaf::crg_interval::initialize_covers(), sheaf::crg_interval::initialize_id_spaces(), sheaf::crg_interval::initialize_local_id_space(), sheaf::LOWER, and sheaf::UPPER.

Referenced by implicit_member().

◆ insert_cover_member() [1/2]

void sheaf::poset_crg_state::insert_cover_member ( pod_index_type  xother_mbr_index,
bool  xlower,
pod_index_type  xmbr_index 
)

Inserts xother_mbr_index in the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index.

Deprecated:
Should use get_cover_id_space.
Precondition
  • contains_member(xmbr_index)
  • !cover_contains_member(xlower, xmbr_index, xother_mbr_index)
Postcondition
  • cover_contains_member(xlower, xmbr_index, xother_mbr_index)

Definition at line 1305 of file poset_crg_state.cc.

References sheaf::explicit_index_space_handle::get_id_space(), and sheaf::gathered_insertion_index_space_handle::push_back().

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

◆ insert_cover_member() [2/2]

void sheaf::poset_crg_state::insert_cover_member ( pod_index_type  xother_mbr_index,
bool  xlower,
pod_index_type  xmbr_index,
index_space_iterator xitr 
)

Inserts xother_mbr_index in the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index, at a position just before xitr. Increments xitr to the position after the inserted entry.

Deprecated:
Should use get_cover_id_space.
Precondition
  • !xitr.is_done()
  • contains_member(xmbr_index)
  • !cover_contains_member(xlower, xmbr_index, xother_mbr_index)
Postcondition
  • cover_contains_member(xlower, xmbr_index, xother_mbr_index)
  • xitr.pod() == old_itr_pod + 1
  • xitr.hub_pod() == old_itr_hub_pod

Definition at line 1335 of file poset_crg_state.cc.

References sheaf::explicit_index_space_handle::get_id_space(), sheaf::index_space_iterator::hub_pod(), sheaf::index_space_iterator::is_done(), sheaf::index_space_iterator::pod(), sheaf::gathered_insertion_index_space_handle::push(), and remove_cover_member().

◆ interval() [1/2]

const sheaf::crg_interval & sheaf::poset_crg_state::interval ( pod_index_type  xid) const

The interval for the member with index xid (const version).

Precondition
  • contains_member(xid)

Definition at line 574 of file poset_crg_state.cc.

Referenced by contains_explicit_member().

◆ interval() [2/2]

sheaf::crg_interval & sheaf::poset_crg_state::interval ( pod_index_type  xid)

The interval for the member with index xid (mutable version).

Precondition
  • contains_member(xid)

Definition at line 592 of file poset_crg_state.cc.

References implicit_member().

◆ invariant()

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

Class invariant.

Invariant

Reimplemented from sheaf::any.

Definition at line 1870 of file poset_crg_state.cc.

References sheaf::operator<<().

Referenced by clone(), and sheaf::poset_state::invariant().

◆ is_ancestor_of()

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

True if other conforms to current.

Reimplemented from sheaf::any.

Definition at line 1830 of file poset_crg_state.cc.

References clone().

Referenced by explicit_down_set_members().

◆ jim_edit_depth()

int sheaf::poset_crg_state::jim_edit_depth ( ) const

Jim edit mode depth counter.

Definition at line 977 of file poset_crg_state.cc.

References cover_is_explicit().

Referenced by release_jim_edit_mode().

◆ jim_edit_mode()

bool sheaf::poset_crg_state::jim_edit_mode ( ) const

True if jim editing is enabled.

Definition at line 922 of file poset_crg_state.cc.

References request_jim_edit_mode().

Referenced by member_name_map().

◆ member_ct()

sheaf::size_type sheaf::poset_crg_state::member_ct ( ) const

The number of members.

Definition at line 487 of file poset_crg_state.cc.

References standard_member_ct().

Referenced by delete_interval(), and sheaf::operator<<().

◆ member_dof_tuple_id()

sheaf::pod_index_type sheaf::poset_crg_state::member_dof_tuple_id ( pod_index_type  xmbr_index) const

The dof tuple index of the member with index xmbr_index; invalid if xmbr_index has not dof tuple.

Precondition
  • contains_member(xmbr_index)

Definition at line 1652 of file poset_crg_state.cc.

References sheaf::implicit_crg_interval::dof_tuple_id(), sheaf::invalid_pod_index(), and put_member_dof_tuple_id().

Referenced by force_explicit_cover(), and sheaf::operator<<().

◆ member_name_map() [1/2]

sheaf::poset_crg_state::member_name_map_type & sheaf::poset_crg_state::member_name_map ( )

Bi-directional map between member names and indices.

Definition at line 897 of file poset_crg_state.cc.

Referenced by gathered_hub_id_space_excludes_bottom(), and sheaf::operator<<().

◆ member_name_map() [2/2]

const sheaf::poset_crg_state::member_name_map_type & sheaf::poset_crg_state::member_name_map ( ) const

Bi-directional map between member names and indices; const version.

Definition at line 904 of file poset_crg_state.cc.

References jim_edit_mode().

◆ new_gathered_hub_id_space()

const sheaf::index_space_handle & sheaf::poset_crg_state::new_gathered_hub_id_space ( bool  xexclude_bottom)

Create a new gathered id space from the hub id space. If xexclude_bottom, construct the id space without BOTTOM_INDEX.

Precondition
  • !has_gathered_hub_id_space()
Postcondition

Definition at line 782 of file poset_crg_state.cc.

References update_gathered_hub_id_space().

Referenced by hub_id().

◆ new_member() [1/2]

sheaf::pod_index_type sheaf::poset_crg_state::new_member ( )

Create a new member with explicit lower and upper cover.

Postcondition
  • contains_explicit_member(result)
  • cover_is_empty(LOWER, result)
  • cover_is_empty(UPPER, result)

Definition at line 122 of file poset_crg_state.cc.

References sheaf::LOWER, and sheaf::UPPER.

Referenced by ~poset_crg_state().

◆ new_member() [2/2]

void sheaf::poset_crg_state::new_member ( pod_index_type  xid)

Create a new member with id xid and explicit lower and upper cover.

Precondition
  • !contains_member(xid)
Postcondition
  • contains_explicit_member(xid)
  • cover_is_empty(LOWER, xid)
  • cover_is_empty(UPPER, xid)

Definition at line 162 of file poset_crg_state.cc.

References sheaf::LOWER, new_standard_member_hack(), and sheaf::UPPER.

◆ new_member_interval() [1/2]

sheaf::pod_index_type sheaf::poset_crg_state::new_member_interval ( const std::string &  xinterval_type,
size_type  xsize 
)

Create an implicit interval of type xinterval_type with size xsize.

Precondition
  • xsize > 0
Postcondition
  • end() >= old_end + xsize
  • interval(result).id_spaces_initialized()
  • interval(result).local_id_space_initialized()
  • for( pod_index_type i = result ; i < end().pod() ; ++i ) contains_member(i)
  • -unexecutable( "atoms not in upper cover of bottom" )

Definition at line 241 of file poset_crg_state.cc.

References sheaf::crg_interval::begin(), sheaf::crg_interval::initialize_id_spaces(), sheaf::crg_interval::initialize_local_id_space(), and sheaf::primary_index_space_handle::offset().

Referenced by new_standard_member_hack().

◆ new_member_interval() [2/2]

void sheaf::poset_crg_state::new_member_interval ( pod_index_type  xid,
const std::string &  xinterval_type,
size_type  xsize 
)

Create an implicit interval beginning at xid, of type xinterval_type, and with size xsize.

Precondition
  • is_valid(xid)
  • for( pod_index_type i=0 ; i<xsize ; ++i ) !contains_member(xid + i)
  • xsize > 0
Postcondition
  • interval(xid).id_spaces_initialized()
  • interval(xid).local_id_space_initialized()
  • for( pod_index_type i=0 ; i<xsize ; ++i ) contains_member(xid + i)
  • -unexecutable( "atoms not in upper cover of bottom" )

Definition at line 313 of file poset_crg_state.cc.

References delete_member(), sheaf::crg_interval::initialize_id_spaces(), sheaf::crg_interval::initialize_local_id_space(), and sheaf::is_valid().

◆ new_standard_member_hack()

void sheaf::poset_crg_state::new_standard_member_hack ( standard_member_index  xid)

Create a new bottom or top member.

Hack:
Cartesian product subspace hack; intended only for use by section_space_schema_poset constructor.
Precondition
  • (xid == BOTTOM_INDEX) || (xid == TOP_INDEX)
Postcondition
  • contains_explicit_member(xid)
  • cover_is_empty(LOWER, xid)
  • cover_is_empty(UPPER, xid)

Definition at line 204 of file poset_crg_state.cc.

References sheaf::LOWER, new_member_interval(), and sheaf::UPPER.

Referenced by new_member(), and fiber_bundle::section_space_schema_poset::new_standard_member_hack().

◆ put_member_dof_tuple_id()

void sheaf::poset_crg_state::put_member_dof_tuple_id ( pod_index_type  xmbr_index,
pod_index_type  xdof_tuple_id 
)

Sets the dof tuple index of the member with index xmbr_index to xdof_tuple_id.

Precondition
  • contains_member(xmbr_index)
Postcondition
  • member_dof_tuple_id(xmbr_index) == xdof_tuple_id

Definition at line 1683 of file poset_crg_state.cc.

References clean_cover().

Referenced by member_dof_tuple_id().

◆ put_standard_member_ct()

void sheaf::poset_crg_state::put_standard_member_ct ( size_type  xct)

Put the number of standard members automatically allocated by the poset handle constructor.

Postcondition

Definition at line 508 of file poset_crg_state.cc.

References begin().

Referenced by standard_member_ct().

◆ release_cover_id_space()

void sheaf::poset_crg_state::release_cover_id_space ( index_space_handle xcover_id_space) const

Returns cover handle xcover_id_space to the pool of id spaces.

Postcondition
  • !xcover_id_space.is_attached()

Definition at line 1041 of file poset_crg_state.cc.

References cover_id_space_id(), and sheaf::index_space_handle::is_attached().

Referenced by get_cover_id_space().

◆ release_cover_id_space_iterator()

void sheaf::poset_crg_state::release_cover_id_space_iterator ( index_space_iterator xcover_itr) const

Returns cover iterator xcover_itr to the pool of id spaces.

Postcondition
  • !xcover_itr.is_attached()

Definition at line 1103 of file poset_crg_state.cc.

References cover_contains_iterator(), and sheaf::index_space_iterator::is_attached().

Referenced by get_cover_id_space_iterator(), and sheaf::operator<<().

◆ release_jim_edit_mode()

void sheaf::poset_crg_state::release_jim_edit_mode ( )

Request jim editing be disabled.

Precondition
Postcondition

Definition at line 951 of file poset_crg_state.cc.

References jim_edit_depth().

Referenced by request_jim_edit_mode().

◆ remove_cover_member() [1/2]

void sheaf::poset_crg_state::remove_cover_member ( pod_index_type  xother_mbr_index,
bool  xlower,
pod_index_type  xmbr_index 
)

Removes xother_mbr_index from the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index.

Deprecated:
Should use get_cover_id_space.
Precondition
  • contains_member(xmbr_index)
Postcondition
  • !cover_contains_member(xlower, xmbr_index, xother_mbr_index)

Definition at line 1372 of file poset_crg_state.cc.

References sheaf::explicit_index_space_handle::get_id_space(), and sheaf::gathered_insertion_index_space_handle::remove_hub().

Referenced by insert_cover_member().

◆ remove_cover_member() [2/2]

void sheaf::poset_crg_state::remove_cover_member ( index_space_iterator xitr,
bool  xlower,
pod_index_type  xmbr_index 
)

Removes the current item of xitr from the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index. If xitr is at the end, forces xitr.is_done(). Otherwise, increments xitr to the next position.

Deprecated:
Should use get_cover_id_space.
Precondition
  • !xitr.is_done()
  • contains_member(xmbr_index)
Postcondition
  • !cover_contains_member(xlower, xmbr_index, old_itr_hub_pod)
  • -unexecutable( "xitr.hub_pod() == old_next_itr_hub_pod" )

Definition at line 1401 of file poset_crg_state.cc.

References sheaf::explicit_index_space_handle::get_id_space(), sheaf::index_space_iterator::hub_pod(), sheaf::index_space_iterator::is_done(), sheaf::index_space_iterator::pod(), sheaf::gathered_insertion_index_space_handle::remove(), and replace_cover_member().

◆ remove_cover_members()

template<typename filter_type >
void sheaf::poset_crg_state::remove_cover_members ( const filter_type &  xfilter,
bool  xlower,
pod_index_type  xmbr_index 
)

Removes all members for which functor xfilter(xmbr.index().top_pod()) is true from the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index.

Deprecated:
Should use get_cover_id_space.
Precondition
  • contains_member(xmbr_index)
Todo:
Review. Is this the most efficient way to do this? Probably should move this functionality to scattered_insertion_index_space_state and allow the given implementations to do as efficiently as possible.

Definition at line 105 of file poset_crg_state.impl.h.

References sheaf::explicit_index_space_handle::get_id_space(), sheaf::index_space_iterator::hub_pod(), sheaf::index_space_iterator::is_done(), sheaf::index_space_iterator::next(), sheaf::explicit_index_space_handle::release_id_space(), sheaf::gathered_insertion_index_space_handle::remove_hub(), and sheaf::gathered_insertion_index_space_handle::update_extrema().

Referenced by cover_id_space_handle_conforms_to(), and sheaf::poset_state_handle::remove_cover_members().

◆ replace_cover_member()

void sheaf::poset_crg_state::replace_cover_member ( pod_index_type  xold_other_mbr_index,
pod_index_type  xnew_other_mbr_index,
bool  xlower,
pod_index_type  xmbr_index 
)

Replaces xold_other_mbr_index with xnew_other_mbr_index in the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index.

Deprecated:
Should use get_cover_id_space.
Precondition
  • contains_member(xmbr_index)
  • (xnew_other_mbr_index != xold_other_mbr_index) ? !cover_contains_member(xlower, xmbr_index, xnew_other_mbr_index) : true
Postcondition
  • (xnew_other_mbr_index != xold_other_mbr_index) ? !cover_contains_member(xlower, xmbr_index, xold_other_mbr_index) : true
  • old_cover_contains_old_other_mbr_index ? cover_contains_member(xlower, xmbr_index, xnew_other_mbr_index) : true

Definition at line 1444 of file poset_crg_state.cc.

References clear_cover(), sheaf::explicit_index_space_handle::get_id_space(), and sheaf::list_index_space_handle::replace_range_id().

Referenced by remove_cover_member().

◆ request_jim_edit_mode()

void sheaf::poset_crg_state::request_jim_edit_mode ( )

Request jim editing be enabled.

Postcondition

Definition at line 929 of file poset_crg_state.cc.

References release_jim_edit_mode().

Referenced by jim_edit_mode().

◆ standard_member_ct() [1/2]

sheaf::size_type sheaf::poset_crg_state::standard_member_ct ( )

The number of standard members automatically allocated by the poset handle constructor (mutable version).

Definition at line 494 of file poset_crg_state.cc.

Referenced by member_ct().

◆ standard_member_ct() [2/2]

sheaf::size_type sheaf::poset_crg_state::standard_member_ct ( ) const

The number of standard members automatically allocated by the poset handle constructor (const version).

Definition at line 501 of file poset_crg_state.cc.

References put_standard_member_ct().

◆ update_gathered_hub_id_space()

void sheaf::poset_crg_state::update_gathered_hub_id_space ( )

Updates the gathered hub id space.

Precondition
Postcondition

Definition at line 806 of file poset_crg_state.cc.

References gathered_hub_id_space().

Referenced by new_gathered_hub_id_space().

Friends And Related Function Documentation

◆ deep_size

SHEAF_DLL_SPEC size_t deep_size ( const poset_crg_state xp,
bool  xinclude_shallow,
size_t  xresults[2] 
)
friend

The deep size of the referenced object of type poset_crg_state; if xinclude_shallow, add the sizeof xp to the result.


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