LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Types | Public Member Functions | Public Attributes | Private Types | List of all members
ndarray::detail::BinaryOpExpression< Operand1, Operand2, BinaryFunction, N > Class Template Reference

#include <BinaryOp.h>

Inheritance diagram for ndarray::detail::BinaryOpExpression< Operand1, Operand2, BinaryFunction, N >:
ndarray::ExpressionBase< BinaryOpExpression< Operand1, Operand2, BinaryFunction, N > >

Public Types

typedef ExpressionTraits< Self >
::Element 
Element
 
typedef ExpressionTraits< Self >
::ND 
ND
 
typedef ExpressionTraits< Self >
::Iterator 
Iterator
 
typedef ExpressionTraits< Self >
::Value 
Value
 
typedef ExpressionTraits< Self >
::Reference 
Reference
 
typedef Vector< int, N > Index
 
- Public Types inherited from ndarray::ExpressionBase< BinaryOpExpression< Operand1, Operand2, BinaryFunction, N > >
typedef ExpressionTraits
< BinaryOpExpression< Operand1,
Operand2, BinaryFunction, N >
>::Element 
Element
 Data type of expression elements. More...
 
typedef ExpressionTraits
< BinaryOpExpression< Operand1,
Operand2, BinaryFunction, N >
>::ND 
ND
 Number of dimensions (boost::mpl::int_). More...
 
typedef ExpressionTraits
< BinaryOpExpression< Operand1,
Operand2, BinaryFunction, N >
>::Iterator 
Iterator
 Nested expression or element iterator. More...
 
typedef ExpressionTraits
< BinaryOpExpression< Operand1,
Operand2, BinaryFunction, N >
>::Reference 
Reference
 Nested expression or element reference. More...
 
typedef ExpressionTraits
< BinaryOpExpression< Operand1,
Operand2, BinaryFunction, N >
>::Value 
Value
 Nested expression or element value type. More...
 
typedef Vector< int, ND::value > Index
 Vector type for N-dimensional indices. More...
 
typedef BinaryOpExpression
< Operand1, Operand2,
BinaryFunction, N > 
Self
 CRTP derived type. More...
 
typedef Value value_type
 
typedef Iterator iterator
 
typedef Iterator const_iterator
 
typedef Reference reference
 
typedef Reference const_reference
 
typedef Iterator pointer
 
typedef int difference_type
 
typedef int size_type
 

Public Member Functions

 BinaryOpExpression (Operand1 const &operand1, Operand2 const &operand2, BinaryFunction const &functor)
 
Reference operator[] (int n) const
 
Iterator begin () const
 
Iterator end () const
 
template<int P>
int getSize () const
 
Index getShape () const
 
- Public Member Functions inherited from ndarray::ExpressionBase< BinaryOpExpression< Operand1, Operand2, BinaryFunction, N > >
Reference operator[] (int n) const
 Return a single nested expression or element. More...
 
Reference front () const
 Return the first nested expression or element. More...
 
Reference back () const
 Return the last nested expression or element. More...
 
Iterator begin () const
 Return an Iterator to the beginning of the expression. More...
 
Iterator end () const
 Return an Iterator to one past the end of the expression. More...
 
int getSize () const
 Return the size of a specific dimension. More...
 
Index getShape () const
 Return a Vector of the sizes of all dimensions. More...
 
int getNumElements () const
 Return the total number of elements in the expression. More...
 
size_type size () const
 Return the size of the first dimension. More...
 
bool empty () const
 Return true if the first dimension has no elements. More...
 

Public Attributes

Operand1 _operand1
 
Operand2 _operand2
 
BinaryFunction _functor
 

Private Types

typedef BinaryOpExpression
< Operand1, Operand2,
BinaryFunction, N > 
Self
 

Additional Inherited Members

- Protected Member Functions inherited from ndarray::ExpressionBase< BinaryOpExpression< Operand1, Operand2, BinaryFunction, N > >
SelfgetSelf ()
 
Self const & getSelf () const
 

Detailed Description

template<typename Operand1, typename Operand2, typename BinaryFunction, int N>
class ndarray::detail::BinaryOpExpression< Operand1, Operand2, BinaryFunction, N >

Definition at line 103 of file BinaryOp.h.

Member Typedef Documentation

template<typename Operand1 , typename Operand2 , typename BinaryFunction , int N>
typedef ExpressionTraits<Self>::Element ndarray::detail::BinaryOpExpression< Operand1, Operand2, BinaryFunction, N >::Element

Definition at line 106 of file BinaryOp.h.

template<typename Operand1 , typename Operand2 , typename BinaryFunction , int N>
typedef Vector<int,N> ndarray::detail::BinaryOpExpression< Operand1, Operand2, BinaryFunction, N >::Index

Definition at line 111 of file BinaryOp.h.

template<typename Operand1 , typename Operand2 , typename BinaryFunction , int N>
typedef ExpressionTraits<Self>::Iterator ndarray::detail::BinaryOpExpression< Operand1, Operand2, BinaryFunction, N >::Iterator

Definition at line 108 of file BinaryOp.h.

template<typename Operand1 , typename Operand2 , typename BinaryFunction , int N>
typedef ExpressionTraits<Self>::ND ndarray::detail::BinaryOpExpression< Operand1, Operand2, BinaryFunction, N >::ND

Definition at line 107 of file BinaryOp.h.

template<typename Operand1 , typename Operand2 , typename BinaryFunction , int N>
typedef ExpressionTraits<Self>::Reference ndarray::detail::BinaryOpExpression< Operand1, Operand2, BinaryFunction, N >::Reference

Definition at line 110 of file BinaryOp.h.

template<typename Operand1 , typename Operand2 , typename BinaryFunction , int N>
typedef BinaryOpExpression<Operand1,Operand2,BinaryFunction,N> ndarray::detail::BinaryOpExpression< Operand1, Operand2, BinaryFunction, N >::Self
private

Definition at line 104 of file BinaryOp.h.

template<typename Operand1 , typename Operand2 , typename BinaryFunction , int N>
typedef ExpressionTraits<Self>::Value ndarray::detail::BinaryOpExpression< Operand1, Operand2, BinaryFunction, N >::Value

Definition at line 109 of file BinaryOp.h.

Constructor & Destructor Documentation

template<typename Operand1 , typename Operand2 , typename BinaryFunction , int N>
ndarray::detail::BinaryOpExpression< Operand1, Operand2, BinaryFunction, N >::BinaryOpExpression ( Operand1 const &  operand1,
Operand2 const &  operand2,
BinaryFunction const &  functor 
)
inline

Definition at line 113 of file BinaryOp.h.

117  :
118  _operand1(operand1), _operand2(operand2), _functor(functor) {
119  NDARRAY_ASSERT(_operand1.getShape() == _operand2.getShape());
120  }
#define NDARRAY_ASSERT(ARG)
Definition: ndarray_fwd.h:51

Member Function Documentation

template<typename Operand1 , typename Operand2 , typename BinaryFunction , int N>
Iterator ndarray::detail::BinaryOpExpression< Operand1, Operand2, BinaryFunction, N >::begin ( ) const
inline

Definition at line 126 of file BinaryOp.h.

126  {
127  return Iterator(_operand1.begin(),_operand2.begin(),_functor);
128  }
ExpressionTraits< Self >::Iterator Iterator
Definition: BinaryOp.h:108
template<typename Operand1 , typename Operand2 , typename BinaryFunction , int N>
Iterator ndarray::detail::BinaryOpExpression< Operand1, Operand2, BinaryFunction, N >::end ( ) const
inline

Definition at line 130 of file BinaryOp.h.

130  {
131  return Iterator(_operand1.end(),_operand2.end(),_functor);
132  }
ExpressionTraits< Self >::Iterator Iterator
Definition: BinaryOp.h:108
template<typename Operand1 , typename Operand2 , typename BinaryFunction , int N>
Index ndarray::detail::BinaryOpExpression< Operand1, Operand2, BinaryFunction, N >::getShape ( ) const
inline

Definition at line 138 of file BinaryOp.h.

138  {
139  return _operand1.getShape();
140  }
template<typename Operand1 , typename Operand2 , typename BinaryFunction , int N>
template<int P>
int ndarray::detail::BinaryOpExpression< Operand1, Operand2, BinaryFunction, N >::getSize ( ) const
inline

Definition at line 134 of file BinaryOp.h.

134  {
135  return _operand1.template getSize<P>();
136  }
template<typename Operand1 , typename Operand2 , typename BinaryFunction , int N>
Reference ndarray::detail::BinaryOpExpression< Operand1, Operand2, BinaryFunction, N >::operator[] ( int  n) const
inline

Definition at line 122 of file BinaryOp.h.

122  {
123  return Reference(_operand1[n],_operand2[n],_functor);
124  }
ExpressionTraits< Self >::Reference Reference
Definition: BinaryOp.h:110

Member Data Documentation

template<typename Operand1 , typename Operand2 , typename BinaryFunction , int N>
BinaryFunction ndarray::detail::BinaryOpExpression< Operand1, Operand2, BinaryFunction, N >::_functor

Definition at line 144 of file BinaryOp.h.

template<typename Operand1 , typename Operand2 , typename BinaryFunction , int N>
Operand1 ndarray::detail::BinaryOpExpression< Operand1, Operand2, BinaryFunction, N >::_operand1

Definition at line 142 of file BinaryOp.h.

template<typename Operand1 , typename Operand2 , typename BinaryFunction , int N>
Operand2 ndarray::detail::BinaryOpExpression< Operand1, Operand2, BinaryFunction, N >::_operand2

Definition at line 143 of file BinaryOp.h.


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