SpatialOps
SpatialOps::IndexTriplet< i1, i2, i3 > Struct Template Reference

Used for specifying field type traits. More...

#include <IndexTriplet.h>

Public Types

enum  Component { X =i1, Y =i2, Z =i3 }
 
typedef IndexTriplet< Abs< i1 >::result, Abs< i2 >::result, Abs< i3 >::result > Abs
 The absolute value of this IndexTriplet.
 
typedef IndexTriplet< Max< 0, i1 >::result, Max< 0, i2 >::result, Max< 0, i3 >::result > PositiveOrZero
 Preserves positive elements, zeros others.
 
typedef IndexTriplet< -i1, -i2, -i3 > Negate
 Negates this IndexTriplet Example: More...
 

Static Public Member Functions

static std::string print ()
 Writes the IndexTriplet to a string. More...
 

Detailed Description

template<int i1, int i2, int i3>
struct SpatialOps::IndexTriplet< i1, i2, i3 >

Used for specifying field type traits.

Key Definitions
Examples:
typedef IndexTriplet<1,2,3> T;
assert( T::X == 1 );
assert( T::Y == 2 );
assert( T::Z == 3 );
typedef typename IndexTriplet<-1,2,0>::Abs T2
assert( T2::X==1 );
assert( T2::Y==2 );
assert( T2::Z==0 );

Definition at line 121 of file IndexTriplet.h.

Member Typedef Documentation

◆ Negate

template<int i1, int i2, int i3>
SpatialOps::IndexTriplet< i1, i2, i3 >::Negate

Negates this IndexTriplet Example:

typedef IndexTriplet< 1,-1, 1> T1;
typedef IndexTriplet<-1, 1,-1> T2;
typedef Negate<T1>::result T3; // same as T2
typedef Negate<T3>::result T4; // same as T1
typedef Negate< Negate<T1>::result >::result T5; // same as T1 and T3

Definition at line 153 of file IndexTriplet.h.

Member Enumeration Documentation

◆ Component

template<int i1, int i2, int i3>
enum SpatialOps::IndexTriplet::Component
Enumerator

The "x" component of the IndexTriplet.

The "y" component of the IndexTriplet.

The "z" component of the IndexTriplet.

Definition at line 123 of file IndexTriplet.h.

Member Function Documentation

◆ print()

template<int i1, int i2, int i3>
static std::string SpatialOps::IndexTriplet< i1, i2, i3 >::print ( )
inlinestatic

Writes the IndexTriplet to a string.

Returns
a string value representing the IndexTriplet.

Definition at line 159 of file IndexTriplet.h.


The documentation for this struct was generated from the following file: