SheafSystem  0.0.0.0
sheaf::ij_product_structure Class Reference

A 2D implementation of abstract_product_structure. More...

#include <ij_product_structure.h>

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

IJ_PRODUCT_STRUCTURE FACET

size_type _i_ub
 The upper bound in the i-direction. More...
 
size_type _j_ub
 The upper bound in the j-direction. More...
 
 ij_product_structure (size_type xi_ub, size_type xj_ub)
 Constructor: Set ub(0) == xi_ub and ub(1) == xj_ub. More...
 
 ij_product_structure (const ij_product_structure &xother)
 Copy constructor. More...
 
ij_product_structureoperator= (const ij_product_structure &xother)
 Assignment operator. More...
 
virtual ~ij_product_structure ()
 Destructor. More...
 
 ij_product_structure ()
 Default constructor; disabled. More...
 

ABSTRACT_PRODUCT_STRUCTURE FACET

virtual ij_product_structureclone () const
 Virtual constructor, makes a new instance of the same type as this. More...
 
virtual ij_product_structureoperator= (const abstract_product_structure &xother)
 Assignment operator. More...
 
virtual bool operator== (const abstract_product_structure &xother) const
 True if this is equivalent to xother. More...
 

PRODUCT FACET

virtual size_type d () const
 The product dimension. More...
 
virtual size_type ub (pod_type xi) const
 The upper-bound for the dimension xi. More...
 
size_type i_ub () const
 The upper bound in the i-direction. More...
 
size_type j_ub () const
 The upper bound in the j-direction. More...
 
void ordinal (pod_type xi, pod_type xj, pod_type &xordinal) const
 2-tuple to ordinal conversion. More...
 
virtual void ordinal (pod_type *xtuple, pod_type &xordinal) const
 Tuple to ordinal conversion. More...
 
void tuple (pod_type xordinal, pod_type &xi, pod_type &xj) const
 Ordinal to 2-tuple conversion. More...
 
virtual void tuple (pod_type xordinal, pod_type *xtuple) const
 Ordinal to tuple conversion. More...
 
void put_ubs (size_type xi_ub, size_type xj_ub)
 Set the upper-bounds for this product structure. More...
 
virtual void put_ubs (size_type *xubs)
 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 Types inherited from sheaf::abstract_product_structure
typedef pod_index_type pod_type
 The "plain old data" index type for this. More...
 
- Public Member Functions inherited from sheaf::abstract_product_structure
virtual ~abstract_product_structure ()
 Destructor. More...
 
size_type ordinal_ub () const
 The upper-bound of the ordinal. 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 Member Functions inherited from sheaf::abstract_product_structure
 abstract_product_structure ()
 Default constructor; disabled. More...
 
 abstract_product_structure (const abstract_product_structure &xother)
 Copy constructor; disabled. More...
 
- Protected Member Functions inherited from sheaf::any
 any ()
 default constructor More...
 

Detailed Description

A 2D implementation of abstract_product_structure.

Definition at line 42 of file ij_product_structure.h.

Constructor & Destructor Documentation

◆ ij_product_structure() [1/3]

sheaf::ij_product_structure::ij_product_structure ( size_type  xi_ub,
size_type  xj_ub 
)

Constructor: Set ub(0) == xi_ub and ub(1) == xj_ub.

Precondition
  • xi_ub > 0
  • xj_ub > 0
Postcondition
  • ub(0) == xi_ub
  • ub(1) == xj_ub

Definition at line 32 of file ij_product_structure.cc.

References ij_product_structure(), invariant(), sheaf::abstract_product_structure::ordinal_ub(), and ub().

◆ ij_product_structure() [2/3]

sheaf::ij_product_structure::ij_product_structure ( const ij_product_structure xother)

Copy constructor.

Postcondition
  • (*this) == xother

Definition at line 56 of file ij_product_structure.cc.

References invariant(), and operator=().

◆ ~ij_product_structure()

sheaf::ij_product_structure::~ij_product_structure ( )
virtual

Destructor.

Definition at line 96 of file ij_product_structure.cc.

References clone().

Referenced by operator=().

◆ ij_product_structure() [3/3]

sheaf::ij_product_structure::ij_product_structure ( )
inlineprotected

Default constructor; disabled.

Definition at line 77 of file ij_product_structure.h.

Referenced by clone(), and ij_product_structure().

Member Function Documentation

◆ clone()

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

◆ d()

sheaf::size_type sheaf::ij_product_structure::d ( ) const
virtual

The product dimension.

Postcondition
  • result > 1

Implements sheaf::abstract_product_structure.

Definition at line 208 of file ij_product_structure.cc.

References ub().

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

◆ i_ub()

sheaf::size_type sheaf::ij_product_structure::i_ub ( ) const

The upper bound in the i-direction.

Postcondition
  • is_basic_query

Definition at line 248 of file ij_product_structure.cc.

References _i_ub, and j_ub().

Referenced by ub().

◆ invariant()

◆ is_ancestor_of()

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

Conformance test; true if other conforms to this.

Precondition
  • other != 0

Reimplemented from sheaf::abstract_product_structure.

Definition at line 430 of file ij_product_structure.cc.

References invariant().

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

◆ j_ub()

sheaf::size_type sheaf::ij_product_structure::j_ub ( ) const

The upper bound in the j-direction.

Postcondition
  • is_basic_query

Definition at line 265 of file ij_product_structure.cc.

References _j_ub, and ordinal().

Referenced by i_ub().

◆ operator=() [1/2]

sheaf::ij_product_structure & sheaf::ij_product_structure::operator= ( const ij_product_structure xother)

Assignment operator.

Postcondition
  • (*this) == xother

Definition at line 76 of file ij_product_structure.cc.

References _i_ub, _j_ub, invariant(), and ~ij_product_structure().

Referenced by clone(), and ij_product_structure().

◆ operator=() [2/2]

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

Assignment operator.

Precondition
  • is_ancestor_of(&xother)
Postcondition
  • (*this) == xother

Implements sheaf::abstract_product_structure.

Definition at line 146 of file ij_product_structure.cc.

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

◆ operator==()

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

True if this is equivalent to xother.

Precondition
  • is_ancestor_of(&xother)
Postcondition
  • is_basic_query

Implements sheaf::abstract_product_structure.

Definition at line 172 of file ij_product_structure.cc.

References _i_ub, _j_ub, d(), and is_ancestor_of().

Referenced by operator=().

◆ ordinal() [1/2]

◆ ordinal() [2/2]

void sheaf::ij_product_structure::ordinal ( pod_type xtuple,
pod_type xordinal 
) const
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))
Postcondition

Implements sheaf::abstract_product_structure.

Definition at line 304 of file ij_product_structure.cc.

References _j_ub, d(), sheaf::ordinal(), sheaf::abstract_product_structure::ordinal_ub(), tuple(), and ub().

◆ put_ubs() [1/2]

void sheaf::ij_product_structure::put_ubs ( size_type  xi_ub,
size_type  xj_ub 
)

Set the upper-bounds for this product structure.

Precondition
  • xi_ub > 0
  • xj_ub > 0
Postcondition
  • ub(0) == xi_ub
  • ub(1) == xj_ub

Definition at line 372 of file ij_product_structure.cc.

References _i_ub, _j_ub, and ub().

Referenced by tuple(), and fiber_bundle::section_space_schema_jims_index_space_state::update().

◆ put_ubs() [2/2]

void sheaf::ij_product_structure::put_ubs ( size_type xubs)
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
Postcondition
  • for( pod_type i=0 ; i<d() ; ++i ) ub(i) == xubs[i]

Implements sheaf::abstract_product_structure.

Definition at line 396 of file ij_product_structure.cc.

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

◆ tuple() [1/2]

◆ tuple() [2/2]

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

Ordinal to tuple conversion.

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

Implements sheaf::abstract_product_structure.

Definition at line 349 of file ij_product_structure.cc.

References _j_ub, d(), sheaf::abstract_product_structure::ordinal_ub(), put_ubs(), sheaf::tuple(), and ub().

◆ ub()

sheaf::size_type sheaf::ij_product_structure::ub ( pod_type  xi) const
virtual

The upper-bound for the dimension xi.

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

Implements sheaf::abstract_product_structure.

Definition at line 227 of file ij_product_structure.cc.

References _i_ub, _j_ub, d(), and i_ub().

Referenced by d(), ij_product_structure(), ordinal(), put_ubs(), and tuple().

Member Data Documentation

◆ _i_ub

size_type sheaf::ij_product_structure::_i_ub
protected

The upper bound in the i-direction.

Definition at line 77 of file ij_product_structure.h.

Referenced by clone(), i_ub(), operator=(), operator==(), put_ubs(), and ub().

◆ _j_ub

size_type sheaf::ij_product_structure::_j_ub
protected

The upper bound in the j-direction.

Definition at line 87 of file ij_product_structure.h.

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


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