SheafSystem  0.0.0.0
sheaf::crg_interval Class Referenceabstract

Abstract emulator for an interval of cover relation graph members. More...

#include <crg_interval.h>

Inheritance diagram for sheaf::crg_interval:
sheaf::any sheaf::explicit_crg_interval sheaf::implicit_crg_interval sheaf::standard_member_hack_crg_interval fiber_bundle::base_space_crg_interval fiber_bundle::homogeneous_block_crg_interval fiber_bundle::point_block_crg_interval fiber_bundle::structured_block_1d_crg_interval fiber_bundle::structured_block_2d_crg_interval fiber_bundle::structured_block_3d_crg_interval fiber_bundle::zone_nodes_block_crg_interval

Friends

class poset_crg_state
 
std::ostream & operator<< (std::ostream &os, const crg_interval &m)
 Insert crg_interval& m into ostream& os. More...
 
SHEAF_DLL_SPEC size_t deep_size (const crg_interval &xp, bool xinclude_shallow)
 The deep size of the referenced object of type crg_interval; if xinclude_shallow, add the sizeof xp to the result. More...
 

CRG_INTERVAL FACET

 crg_interval ()
 Default Constructor; constructs an uninitialized interval. More...
 
virtual ~crg_interval ()
 Destructor. More...
 

INTERVAL FACET

pod_index_type begin () const
 The beginning of the member interval; this emulates members in the interval [begin(), end()), includes interval member. More...
 
void begin (scoped_index &result) const
 The beginning of the member interval; this emulates members in the interval [begin(), end()), includes interval member. More...
 
pod_index_type end () const
 The end of the member interval. More...
 
void end (scoped_index &result) const
 The end of the member interval. More...
 
size_type size () const
 The number of members in the member interval. More...
 
bool contains_member (pod_index_type xindex) const
 True if and only if the index xindex is contained in this interval. More...
 
bool contains_member (const scoped_index &xindex) const
 True if and only if the index xindex is contained in this interval. More...
 

ID SPACE FAMILY FACET

index_space_family_id_spaces
 The id space family of this interval. More...
 
bool _id_spaces_initialized
 True if the id space family has been initialized. More...
 
const index_space_familyid_spaces () const
 The id space family for this interval. More...
 
const hub_index_space_handlehub_id_space () const
 The hub id space of this interval. More...
 
void initialize_id_spaces (index_space_family &xid_spaces)
 Set the index space family to xid_spaces. More...
 
bool id_spaces_initialized () const
 True if the index space family has been initialized. More...
 

LOCAL ID SPACE FACET

primary_index_space_handle _local_id_space
 The id space of this interval. More...
 
bool _local_id_space_initialized
 True if local id space has been initialized. More...
 
const primary_index_space_handlelocal_id_space () const
 The local id space of this interval. More...
 
void initialize_local_id_space (const index_space_handle &xlocal_id_space)
 Sets the local id space to xlocal_id_space and initializes local ids. More...
 
bool local_id_space_initialized () const
 True if local id space has been initialized. More...
 
static std::string local_id_space_name (pod_index_type xindex)
 The reserved name for the local id space of the ramge member with index xindex. More...
 

COVER SET FACET

pod_index_type _lower_covers_begin
 The offset into the id space family for the interval of lower covers. More...
 
bool _lower_covers_initialized
 True if and only if the lower cover is initialized. More...
 
pod_index_type _upper_covers_begin
 The offset into the id space family for the interval of upper covers. More...
 
bool _upper_covers_initialized
 True if and only if the upper cover is initialized. 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...
 
bool covers_initialized (bool xlower) const
 True if and only if the lower (xlower true) or upper (xlower false) covers has been initialized for this interval. More...
 
void initialize_covers ()
 Initialize the upper and lower covers for this interval. More...
 
virtual void initialize_lower_covers ()=0
 Initialize the lower covers for this interval. More...
 
virtual void initialize_upper_covers ()=0
 Initialize the upper cover for this interval. More...
 

EXPLICIT COVER SET FACET

typedef unordered::unordered_map< pod_index_type, pod_index_typeexplicit_cover_map_type
 The type of the explicit cover maps.. More...
 
explicit_cover_map_type _explicit_upper_cover_map
 The map from ids to explicit upper cover id spaces. More...
 
explicit_cover_map_type _explicit_lower_cover_map
 The map from ids to explicit lower cover id spaces. More...
 
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 with index xmbr_index is explicit. 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...
 
explicit_cover_map_typeexplicit_cover_map (bool xlower)
 The lower (xlower true) or upper (xlower false) map to explicit cover id spaces. More...
 
const explicit_cover_map_typeexplicit_cover_map (bool xlower) const
 The lower (xlower true) or upper (xlower false) map to explicit cover id spaces; const version. More...
 
static std::string explicit_cover_name (bool xlower, const scoped_index &xmbr_index)
 Creates a name for the explicit cover id space for member with index, xmbr_index. More...
 
static std::string explicit_cover_name (bool xlower, pod_index_type xmbr_index)
 Creates a name for the explicit cover id space for member with index, xmbr_index. More...
 

FACTORY FACET

void initialize (const namespace_poset &xnamespace)
 Sets is_initialized() == true; dummy routine provided to satisfy factory template. More...
 
virtual bool is_initialized () const
 True if fully initialized. More...
 
virtual const std::string & class_name () const
 The name of this class; provided to satisfy factory template. More...
 
static factory< crg_interval > & interval_factory ()
 A factory for making descendants of this class. More...
 
static crg_intervalnew_interval (const std::string &xname)
 Creates a default constructed instance of the the class with name xname. More...
 

ANY FACET

virtual bool is_ancestor_of (const any *other) const
 Conformance test; true if other conforms to this. More...
 
virtual crg_intervalclone () const =0
 Virtual constructor, makes 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

Abstract emulator for an interval of cover relation graph members.

Definition at line 70 of file crg_interval.h.

Member Typedef Documentation

◆ explicit_cover_map_type

typedef unordered::unordered_map<pod_index_type, pod_index_type> sheaf::crg_interval::explicit_cover_map_type
protected

The type of the explicit cover maps..

Definition at line 344 of file crg_interval.h.

Constructor & Destructor Documentation

◆ crg_interval()

sheaf::crg_interval::crg_interval ( )

Default Constructor; constructs an uninitialized interval.

Postcondition
  • !is_initialized()

Definition at line 42 of file crg_interval.cc.

References sheaf::invalid_pod_index(), invariant(), is_initialized(), and ~crg_interval().

◆ ~crg_interval()

sheaf::crg_interval::~crg_interval ( )
virtual

Member Function Documentation

◆ begin() [1/2]

◆ begin() [2/2]

void sheaf::crg_interval::begin ( scoped_index result) const

The beginning of the member interval; this emulates members in the interval [begin(), end()), includes interval member.

Precondition
Postcondition
  • result.is_hub_scope()

Definition at line 120 of file crg_interval.cc.

References begin(), end(), hub_id_space(), sheaf::scoped_index::is_hub_scope(), local_id_space_initialized(), and sheaf::scoped_index::put().

◆ class_name()

◆ clone()

◆ contains_member() [1/2]

◆ contains_member() [2/2]

bool sheaf::crg_interval::contains_member ( const scoped_index xindex) const

True if and only if the index xindex is contained in this interval.

Precondition

Definition at line 201 of file crg_interval.cc.

References contains_member(), sheaf::scoped_index::hub_pod(), id_spaces(), and local_id_space_initialized().

◆ cover_id_space_id()

sheaf::pod_index_type sheaf::crg_interval::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)
  • covers_initialized(xlower)

Definition at line 365 of file crg_interval.cc.

References _local_id_space, _lower_covers_begin, _upper_covers_begin, contains_member(), covers_initialized(), end(), explicit_cover_map(), and sheaf::explicit_index_space_handle::pod().

Referenced by cover_is_explicit(), sheaf::poset_crg_state::delete_interval(), sheaf::poset_crg_state::delete_member(), force_explicit_cover(), sheaf::poset_crg_state::initialize_member_covers(), and local_id_space_initialized().

◆ cover_is_explicit()

bool sheaf::crg_interval::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 with index xmbr_index is explicit.

Precondition
  • contains_member(xmbr_index)

Definition at line 500 of file crg_interval.cc.

References _id_spaces, contains_member(), cover_id_space_id(), force_explicit_cover(), and sheaf::index_space_family::handle_conforms_to_state().

Referenced by sheaf::poset_crg_state::delete_member(), sheaf::poset_crg_state::explicit_down_set_members(), force_explicit_cover(), and initialize_upper_covers().

◆ covers_initialized()

bool sheaf::crg_interval::covers_initialized ( bool  xlower) const

True if and only if the lower (xlower true) or upper (xlower false) covers has been initialized for this interval.

Postcondition
  • is_basic_query

Definition at line 398 of file crg_interval.cc.

References _lower_covers_initialized, _upper_covers_initialized, and initialize_covers().

Referenced by cover_id_space_id(), initialize_covers(), sheaf::explicit_crg_interval::initialize_lower_covers(), initialize_lower_covers(), sheaf::explicit_crg_interval::initialize_upper_covers(), initialize_upper_covers(), and is_initialized().

◆ end() [1/2]

◆ end() [2/2]

void sheaf::crg_interval::end ( scoped_index result) const

The end of the member interval.

Precondition
Postcondition
  • result.is_hub_scope()

Definition at line 154 of file crg_interval.cc.

References end(), hub_id_space(), sheaf::scoped_index::is_hub_scope(), local_id_space_initialized(), sheaf::scoped_index::put(), and size().

◆ explicit_cover_map() [1/2]

explicit_cover_map_type& sheaf::crg_interval::explicit_cover_map ( bool  xlower)
inlineprotected

The lower (xlower true) or upper (xlower false) map to explicit cover id spaces.

Definition at line 359 of file crg_interval.h.

Referenced by cover_id_space_id(), sheaf::poset_crg_state::explicit_down_set_members(), force_explicit_cover(), and ~crg_interval().

◆ explicit_cover_map() [2/2]

const explicit_cover_map_type& sheaf::crg_interval::explicit_cover_map ( bool  xlower) const
inlineprotected

The lower (xlower true) or upper (xlower false) map to explicit cover id spaces; const version.

Definition at line 367 of file crg_interval.h.

◆ explicit_cover_name() [1/2]

std::string sheaf::crg_interval::explicit_cover_name ( bool  xlower,
const scoped_index xmbr_index 
)
staticprotected

Creates a name for the explicit cover id space for member with index, xmbr_index.

Definition at line 590 of file crg_interval.cc.

References sheaf::scoped_index::hub_pod(), and interval_factory().

Referenced by explicit_cover_name(), force_explicit_cover(), and sheaf::implicit_crg_interval::put_private_data().

◆ explicit_cover_name() [2/2]

std::string sheaf::crg_interval::explicit_cover_name ( bool  xlower,
pod_index_type  xmbr_index 
)
staticprotected

Creates a name for the explicit cover id space for member with index, xmbr_index.

Postcondition
  • !result.empty()

Definition at line 569 of file crg_interval.cc.

References explicit_cover_name(), and sheaf::poset_path::make_reserved_name().

◆ force_explicit_cover()

sheaf::pod_index_type sheaf::crg_interval::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.

Precondition
  • contains_member(xmbr_index)
Postcondition
  • cover_is_explicit(xlower, xmbr_index)

Definition at line 513 of file crg_interval.cc.

References _id_spaces, contains_member(), cover_id_space_id(), cover_is_explicit(), explicit_cover_map(), explicit_cover_name(), sheaf::index_space_family::get_id_space_iterator(), sheaf::index_space_family::handle_conforms_to_state(), sheaf::index_space_iterator::hub_pod(), id_spaces(), sheaf::explicit_index_space_handle::index(), sheaf::index_space_iterator::is_done(), sheaf::list_index_space_state::new_space(), sheaf::index_space_iterator::next(), sheaf::gathered_insertion_index_space_handle::push_back(), and sheaf::index_space_family::release_id_space_iterator().

Referenced by cover_is_explicit().

◆ hub_id_space()

◆ id_spaces()

◆ id_spaces_initialized()

◆ initialize()

void sheaf::crg_interval::initialize ( const namespace_poset xnamespace)

Sets is_initialized() == true; dummy routine provided to satisfy factory template.

Postcondition

Definition at line 643 of file crg_interval.cc.

References _id_spaces_initialized, _local_id_space_initialized, _lower_covers_initialized, _upper_covers_initialized, and is_initialized().

Referenced by sheaf::implicit_crg_interval::initialize(), and new_interval().

◆ initialize_covers()

void sheaf::crg_interval::initialize_covers ( )

Initialize the upper and lower covers for this interval.

Precondition
  • !covers_initialized(LOWER)
  • !covers_initialized(UPPER)
Postcondition
  • covers_initialized(LOWER)
  • covers_initialized(UPPER)

Definition at line 417 of file crg_interval.cc.

References covers_initialized(), id_spaces_initialized(), initialize_lower_covers(), initialize_upper_covers(), local_id_space_initialized(), sheaf::LOWER, and sheaf::UPPER.

Referenced by covers_initialized(), and sheaf::poset_crg_state::initialize_member_covers().

◆ initialize_id_spaces()

void sheaf::crg_interval::initialize_id_spaces ( index_space_family xid_spaces)

Set the index space family to xid_spaces.

Precondition
  • !id_spaces_initialized()
Postcondition

Definition at line 251 of file crg_interval.cc.

References _id_spaces, _id_spaces_initialized, and id_spaces_initialized().

Referenced by hub_id_space(), sheaf::poset_crg_state::initialize_member_covers(), and sheaf::poset_crg_state::new_member_interval().

◆ initialize_local_id_space()

void sheaf::crg_interval::initialize_local_id_space ( const index_space_handle xlocal_id_space)

Sets the local id space to xlocal_id_space and initializes local ids.

Precondition
  • !local_id_space_initialized()
Postcondition

Definition at line 323 of file crg_interval.cc.

References _local_id_space, _local_id_space_initialized, sheaf::explicit_index_space_handle::attach_to(), and local_id_space_initialized().

Referenced by sheaf::poset_crg_state::initialize_member_covers(), local_id_space(), and sheaf::poset_crg_state::new_member_interval().

◆ initialize_lower_covers()

void sheaf::crg_interval::initialize_lower_covers ( )
protectedpure virtual

◆ initialize_upper_covers()

◆ interval_factory()

sheaf::factory< sheaf::crg_interval > & sheaf::crg_interval::interval_factory ( )
static

A factory for making descendants of this class.

Definition at line 612 of file crg_interval.cc.

References new_interval().

Referenced by sheaf::explicit_crg_interval::class_name(), explicit_cover_name(), and new_interval().

◆ invariant()

◆ is_ancestor_of()

◆ is_initialized()

◆ local_id_space()

const sheaf::primary_index_space_handle & sheaf::crg_interval::local_id_space ( ) const

The local id space of this interval.

Precondition

Definition at line 310 of file crg_interval.cc.

References _local_id_space, initialize_local_id_space(), and local_id_space_initialized().

Referenced by sheaf::implicit_crg_interval::invariant(), invariant(), and local_id_space_name().

◆ local_id_space_initialized()

◆ local_id_space_name()

std::string sheaf::crg_interval::local_id_space_name ( pod_index_type  xindex)
static

The reserved name for the local id space of the ramge member with index xindex.

Postcondition
  • !result.empty()

Definition at line 291 of file crg_interval.cc.

References local_id_space(), and sheaf::poset_path::make_reserved_name().

Referenced by id_spaces_initialized().

◆ new_interval()

sheaf::crg_interval * sheaf::crg_interval::new_interval ( const std::string &  xname)
static

Creates a default constructed instance of the the class with name xname.

Precondition
Postcondition
  • result != 0

Definition at line 621 of file crg_interval.cc.

References class_name(), initialize(), and interval_factory().

Referenced by interval_factory().

◆ size()

Friends And Related Function Documentation

◆ deep_size

SHEAF_DLL_SPEC size_t deep_size ( const crg_interval xp,
bool  xinclude_shallow 
)
friend

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

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const crg_interval m 
)
friend

Insert crg_interval& m into ostream& os.

Member Data Documentation

◆ _explicit_lower_cover_map

explicit_cover_map_type sheaf::crg_interval::_explicit_lower_cover_map
protected

◆ _explicit_upper_cover_map

explicit_cover_map_type sheaf::crg_interval::_explicit_upper_cover_map
protected

◆ _id_spaces

◆ _id_spaces_initialized

bool sheaf::crg_interval::_id_spaces_initialized
protected

True if the id space family has been initialized.

Definition at line 191 of file crg_interval.h.

Referenced by id_spaces_initialized(), initialize(), and initialize_id_spaces().

◆ _local_id_space

◆ _local_id_space_initialized

bool sheaf::crg_interval::_local_id_space_initialized
protected

True if local id space has been initialized.

Definition at line 237 of file crg_interval.h.

Referenced by initialize(), initialize_local_id_space(), and local_id_space_initialized().

◆ _lower_covers_begin

pod_index_type sheaf::crg_interval::_lower_covers_begin
protected

The offset into the id space family for the interval of lower covers.

Definition at line 283 of file crg_interval.h.

Referenced by cover_id_space_id(), sheaf::explicit_crg_interval::initialize_lower_covers(), and sheaf::explicit_crg_interval::~explicit_crg_interval().

◆ _lower_covers_initialized

bool sheaf::crg_interval::_lower_covers_initialized
protected

True if and only if the lower cover is initialized.

Definition at line 288 of file crg_interval.h.

Referenced by covers_initialized(), initialize(), and sheaf::explicit_crg_interval::initialize_lower_covers().

◆ _upper_covers_begin

pod_index_type sheaf::crg_interval::_upper_covers_begin
protected

The offset into the id space family for the interval of upper covers.

Definition at line 293 of file crg_interval.h.

Referenced by cover_id_space_id(), sheaf::explicit_crg_interval::initialize_upper_covers(), and sheaf::explicit_crg_interval::~explicit_crg_interval().

◆ _upper_covers_initialized

bool sheaf::crg_interval::_upper_covers_initialized
protected

True if and only if the upper cover is initialized.

Definition at line 298 of file crg_interval.h.

Referenced by covers_initialized(), initialize(), and sheaf::explicit_crg_interval::initialize_upper_covers().


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