SheafSystem  0.0.0.0
sheaf::ijk_product_structure Class Reference

A 3D implementation of abstract_product_structure. More...

#include <ijk_product_structure.h>

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

IJK_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...
 
size_type _k_ub
 The upper bound in the k-direction. More...
 
 ijk_product_structure (size_type xi_ub, size_type xj_ub, size_type xk_ub)
 Constructor: Set ub(0) == xi_ub, ub(1) == xj_ub, and ub(2) == xk_ub. More...
 
 ijk_product_structure (const ijk_product_structure &xother)
 Copy constructor. More...
 
ijk_product_structureoperator= (const ijk_product_structure &xother)
 Assignment operator. More...
 
virtual ~ijk_product_structure ()
 Destructor. More...
 
virtual ijk_product_structureclone () const
 Virtual constructor, makes a new instance of the same type as this. More...
 
virtual ijk_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...
 
 ijk_product_structure ()
 Default constructor; disabled. 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...
 
size_type k_ub () const
 The upper bound in the k-direction. More...
 
void ordinal (pod_type xi, pod_type xj, pod_type xk, pod_type &xordinal) const
 3-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, pod_type &xk) const
 Ordinal to 3-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, size_type xk_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 3D implementation of abstract_product_structure.

Definition at line 42 of file ijk_product_structure.h.

Constructor & Destructor Documentation

◆ ijk_product_structure() [1/3]

sheaf::ijk_product_structure::ijk_product_structure ( size_type  xi_ub,
size_type  xj_ub,
size_type  xk_ub 
)

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

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

Definition at line 32 of file ijk_product_structure.cc.

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

◆ ijk_product_structure() [2/3]

sheaf::ijk_product_structure::ijk_product_structure ( const ijk_product_structure xother)

Copy constructor.

Postcondition
  • (*this) == xother

Definition at line 59 of file ijk_product_structure.cc.

References invariant(), and operator=().

◆ ~ijk_product_structure()

sheaf::ijk_product_structure::~ijk_product_structure ( )
virtual

Destructor.

Definition at line 100 of file ijk_product_structure.cc.

References clone().

Referenced by operator=().

◆ ijk_product_structure() [3/3]

sheaf::ijk_product_structure::ijk_product_structure ( )
inlineprotected

Default constructor; disabled.

Definition at line 77 of file ijk_product_structure.h.

Referenced by clone(), and ijk_product_structure().

Member Function Documentation

◆ clone()

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

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

Postcondition
  • result != 0
  • is_same_type(result)

Implements sheaf::abstract_product_structure.

Definition at line 128 of file ijk_product_structure.cc.

References _i_ub, _j_ub, _k_ub, ijk_product_structure(), sheaf::any::is_same_type(), and operator=().

Referenced by ~ijk_product_structure().

◆ d()

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

The product dimension.

Postcondition
  • result > 1

Implements sheaf::abstract_product_structure.

Definition at line 214 of file ijk_product_structure.cc.

References ub().

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

◆ i_ub()

sheaf::size_type sheaf::ijk_product_structure::i_ub ( ) const

The upper bound in the i-direction.

Postcondition
  • is_basic_query

Definition at line 269 of file ijk_product_structure.cc.

References _i_ub, and j_ub().

Referenced by ub().

◆ invariant()

◆ is_ancestor_of()

bool sheaf::ijk_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 474 of file ijk_product_structure.cc.

References invariant().

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

◆ j_ub()

sheaf::size_type sheaf::ijk_product_structure::j_ub ( ) const

The upper bound in the j-direction.

Postcondition
  • is_basic_query

Definition at line 286 of file ijk_product_structure.cc.

References _j_ub, and k_ub().

Referenced by i_ub().

◆ k_ub()

sheaf::size_type sheaf::ijk_product_structure::k_ub ( ) const

The upper bound in the k-direction.

Postcondition
  • is_basic_query

Definition at line 303 of file ijk_product_structure.cc.

References _k_ub, and ordinal().

Referenced by j_ub().

◆ operator=() [1/2]

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

Assignment operator.

Postcondition
  • (*this) == xother

Definition at line 79 of file ijk_product_structure.cc.

References _i_ub, _j_ub, _k_ub, invariant(), and ~ijk_product_structure().

Referenced by clone(), and ijk_product_structure().

◆ operator=() [2/2]

sheaf::ijk_product_structure & sheaf::ijk_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 150 of file ijk_product_structure.cc.

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

◆ operator==()

bool sheaf::ijk_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 177 of file ijk_product_structure.cc.

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

Referenced by operator=().

◆ ordinal() [1/2]

void sheaf::ijk_product_structure::ordinal ( pod_type  xi,
pod_type  xj,
pod_type  xk,
pod_type xordinal 
) const

3-tuple to ordinal conversion.

Precondition
  • (0 <= xi) && (xi < ub(0))
  • (0 <= xj) && (xj < ub(1))
  • (0 <= xk) && (xk < ub(2))
Postcondition

Definition at line 320 of file ijk_product_structure.cc.

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

Referenced by k_ub().

◆ ordinal() [2/2]

void sheaf::ijk_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 343 of file ijk_product_structure.cc.

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

◆ put_ubs() [1/2]

void sheaf::ijk_product_structure::put_ubs ( size_type  xi_ub,
size_type  xj_ub,
size_type  xk_ub 
)

Set the upper-bounds for this product structure.

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

Definition at line 412 of file ijk_product_structure.cc.

References _i_ub, _j_ub, _k_ub, and ub().

Referenced by tuple().

◆ put_ubs() [2/2]

void sheaf::ijk_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 439 of file ijk_product_structure.cc.

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

◆ tuple() [1/2]

void sheaf::ijk_product_structure::tuple ( pod_type  xordinal,
pod_type xi,
pod_type xj,
pod_type xk 
) const

Ordinal to 3-tuple conversion.

Precondition
Postcondition
  • (0 <= xi) && (xi < ub(0))
  • (0 <= xj) && (xj < ub(1))
  • (0 <= xk) && (xk < ub(2))

Definition at line 366 of file ijk_product_structure.cc.

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

Referenced by ordinal().

◆ tuple() [2/2]

void sheaf::ijk_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 389 of file ijk_product_structure.cc.

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

◆ ub()

sheaf::size_type sheaf::ijk_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 233 of file ijk_product_structure.cc.

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

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

Member Data Documentation

◆ _i_ub

size_type sheaf::ijk_product_structure::_i_ub
protected

The upper bound in the i-direction.

Definition at line 77 of file ijk_product_structure.h.

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

◆ _j_ub

size_type sheaf::ijk_product_structure::_j_ub
protected

The upper bound in the j-direction.

Definition at line 87 of file ijk_product_structure.h.

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

◆ _k_ub

size_type sheaf::ijk_product_structure::_k_ub
protected

The upper bound in the k-direction.

Definition at line 92 of file ijk_product_structure.h.

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


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