SheafSystem  0.0.0.0
sheaf::abstract_product_structure Class Referenceabstract

An abstract class that defines the product structure for an id space. More...

#include <abstract_product_structure.h>

Inheritance diagram for sheaf::abstract_product_structure:
sheaf::any sheaf::ij_product_structure sheaf::ijk_product_structure

ABSTRACT_PRODUCT_STRUCTURE FACET

typedef pod_index_type pod_type
 The "plain old data" index type for this. More...
 
virtual ~abstract_product_structure ()
 Destructor. More...
 
virtual abstract_product_structureclone () const =0
 Virtual constructor, makes a new instance of the same type as this. More...
 
virtual abstract_product_structureoperator= (const abstract_product_structure &xother)=0
 Assignment operator. More...
 
virtual bool operator== (const abstract_product_structure &xother) const =0
 True if this is equivalent to xother. More...
 
 abstract_product_structure ()
 Default constructor; disabled. More...
 
 abstract_product_structure (const abstract_product_structure &xother)
 Copy constructor; disabled. More...
 

PRODUCT FACET

virtual size_type d () const =0
 The product dimension. More...
 
virtual size_type ub (pod_type xi) const =0
 The upper-bound for the dimension xi. More...
 
virtual void ordinal (pod_type *xtuple, pod_type &xordinal) const =0
 Tuple to ordinal conversion. More...
 
virtual void tuple (pod_type xordinal, pod_type *xtuple) const =0
 Ordinal to tuple conversion. More...
 
size_type ordinal_ub () const
 The upper-bound of the ordinal. More...
 
virtual void put_ubs (size_type *xubs)=0
 Set the upper-bounds for this product structure. More...
 

ANY FACET

virtual bool is_ancestor_of (const any *other) const
 Conformance test; true if other conforms to 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

An abstract class that defines the product structure for an id space.

Definition at line 42 of file abstract_product_structure.h.

Member Typedef Documentation

◆ pod_type

The "plain old data" index type for this.

Definition at line 55 of file abstract_product_structure.h.

Constructor & Destructor Documentation

◆ ~abstract_product_structure()

sheaf::abstract_product_structure::~abstract_product_structure ( )
virtual

Destructor.

Definition at line 32 of file abstract_product_structure.cc.

References clone().

◆ abstract_product_structure() [1/2]

sheaf::abstract_product_structure::abstract_product_structure ( )
inlineprotected

Default constructor; disabled.

Definition at line 83 of file abstract_product_structure.h.

◆ abstract_product_structure() [2/2]

sheaf::abstract_product_structure::abstract_product_structure ( const abstract_product_structure xother)
inlineprotected

Copy constructor; disabled.

Definition at line 88 of file abstract_product_structure.h.

References sheaf::ordinal(), and sheaf::tuple().

Member Function Documentation

◆ clone()

sheaf::abstract_product_structure * sheaf::abstract_product_structure::clone ( ) const
pure virtual

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

Is Abstract.

Postcondition
  • result != 0
  • is_same_type(result)

Reimplemented from sheaf::any.

Implemented in sheaf::ijk_product_structure, and sheaf::ij_product_structure.

Definition at line 49 of file abstract_product_structure.cc.

References sheaf::any::is_same_type(), and operator=().

Referenced by sheaf::explicit_index_space_state::new_product_structure(), sheaf::explicit_index_space_state::operator=(), and ~abstract_product_structure().

◆ d()

sheaf::size_type sheaf::abstract_product_structure::d ( ) const
pure virtual

The product dimension.

Is Abstract.

Postcondition
  • result > 1

Implemented in sheaf::ijk_product_structure, and sheaf::ij_product_structure.

Definition at line 127 of file abstract_product_structure.cc.

References ub().

Referenced by operator==(), ordinal(), ordinal_ub(), put_ubs(), tuple(), and ub().

◆ invariant()

◆ is_ancestor_of()

bool sheaf::abstract_product_structure::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::ijk_product_structure, and sheaf::ij_product_structure.

Definition at line 274 of file abstract_product_structure.cc.

References invariant().

Referenced by operator=(), operator==(), and put_ubs().

◆ operator=()

sheaf::abstract_product_structure & sheaf::abstract_product_structure::operator= ( const abstract_product_structure xother)
pure virtual

Assignment operator.

Precondition
  • is_ancestor_of(&xother)
Is Abstract.
Postcondition
  • (*this) == xother

Implemented in sheaf::ijk_product_structure, and sheaf::ij_product_structure.

Definition at line 71 of file abstract_product_structure.cc.

References invariant(), is_ancestor_of(), and operator==().

Referenced by clone().

◆ operator==()

bool sheaf::abstract_product_structure::operator== ( const abstract_product_structure xother) const
pure virtual

True if this is equivalent to xother.

Precondition
  • is_ancestor_of(&xother)
Is Abstract.
Postcondition
  • is_basic_query

Implemented in sheaf::ijk_product_structure, and sheaf::ij_product_structure.

Definition at line 93 of file abstract_product_structure.cc.

References d(), and is_ancestor_of().

Referenced by operator=().

◆ ordinal()

void sheaf::abstract_product_structure::ordinal ( pod_type xtuple,
pod_type xordinal 
) const
pure virtual

Tuple to ordinal conversion.

Precondition
  • -unexecutable( "length of xtuple equals d()" )
  • for( pod_type i=0 ; i<d() ; ++i ) (0 <= xtuple[i]) && (xtuple[i] < ub(i))
Is Abstract.
Postcondition

Implemented in sheaf::ijk_product_structure, and sheaf::ij_product_structure.

Definition at line 171 of file abstract_product_structure.cc.

References d(), ordinal_ub(), tuple(), and ub().

Referenced by ub().

◆ ordinal_ub()

◆ put_ubs()

void sheaf::abstract_product_structure::put_ubs ( size_type xubs)
pure virtual

Set the upper-bounds for this product structure.

Precondition
  • -unexecutable( "xubs.length >= d()" )
  • for( pod_type i=0 ; i<d() ; ++i ) xubs[i] > 0
Is Abstract.
Postcondition
  • for( pod_type i=0 ; i<d() ; ++i ) ub(i) == xubs[i]

Implemented in sheaf::ijk_product_structure, and sheaf::ij_product_structure.

Definition at line 241 of file abstract_product_structure.cc.

References d(), is_ancestor_of(), and ub().

Referenced by ordinal_ub().

◆ tuple()

void sheaf::abstract_product_structure::tuple ( pod_type  xordinal,
pod_type xtuple 
) const
pure virtual

Ordinal to tuple conversion.

Precondition
  • -unexecutable( "length of xtuple equals d()" )
Is Abstract.
Postcondition
  • for( pod_type i=0 ; i<d() ; ++i ) (0 <= xtuple[i]) && (xtuple[i] < ub(i))

Implemented in sheaf::ijk_product_structure, and sheaf::ij_product_structure.

Definition at line 194 of file abstract_product_structure.cc.

References d(), ordinal_ub(), and ub().

Referenced by ordinal().

◆ ub()

sheaf::size_type sheaf::abstract_product_structure::ub ( pod_type  xi) const
pure virtual

The upper-bound for the dimension xi.

Precondition
  • (0 <= xi) && (xi < d())
Is Abstract.
Postcondition
  • result > 0

Implemented in sheaf::ijk_product_structure, and sheaf::ij_product_structure.

Definition at line 148 of file abstract_product_structure.cc.

References d(), and ordinal().

Referenced by d(), fiber_bundle::section_space_schema_jims_index_space_state::is_consistent(), ordinal(), ordinal_ub(), put_ubs(), and tuple().


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