OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
point_expression_op< orig, exp1, exp2, POINT_SUB > Class Template Reference

Subtraction operation. More...

Detailed Description

template<typename orig, typename exp1, typename exp2>
class point_expression_op< orig, exp1, exp2, POINT_SUB >

Subtraction operation.

Template Parameters
exp1expression1
exp2expression2

Definition at line 313 of file Point_operators.hpp.

#include <Point_operators.hpp>

Public Types

typedef orig orig_type
 Original type.
 
typedef int has_init
 indicate that init must be called before value
 
typedef int is_expression
 indicate that this class encapsulate an expression
 
typedef orig return_type
 return type of the expression
 

Public Member Functions

 point_expression_op (const exp1 &o1, const exp2 &o2)
 constructor from 2 expressions More...
 
void init () const
 This function must be called before value. More...
 
template<typename r_type = typename std::remove_reference<decltype(o1.value(0))>::type>
r_type value (size_t k) const
 Evaluate the expression at coordinate k. More...
 
template<typename T , typename test = typename boost::disable_if_c< std::is_same<T,orig>::value || exp1::nvals != 1 || exp2::nvals != 1 >::type>
 operator T () const
 conversion of the class to double or float or ... More...
 

Static Public Attributes

static const unsigned int nvals = r_type_dim<exp1::nvals,exp2::nvals,POINT_SUB>::value
 this operation produce a vector as result of size dims
 

Private Attributes

const exp1 o1
 expression 1
 
const exp2 o2
 expression 2
 

Constructor & Destructor Documentation

template<typename orig , typename exp1 , typename exp2 >
point_expression_op< orig, exp1, exp2, POINT_SUB >::point_expression_op ( const exp1 &  o1,
const exp2 &  o2 
)
inline

constructor from 2 expressions

Parameters
o1expression1
o2expression2

Definition at line 343 of file Point_operators.hpp.

Member Function Documentation

template<typename orig , typename exp1 , typename exp2 >
void point_expression_op< orig, exp1, exp2, POINT_SUB >::init ( ) const
inline

This function must be called before value.

it calculate the scalar product before return the values

Definition at line 352 of file Point_operators.hpp.

template<typename orig , typename exp1 , typename exp2 >
template<typename T , typename test = typename boost::disable_if_c< std::is_same<T,orig>::value || exp1::nvals != 1 || exp2::nvals != 1 >::type>
point_expression_op< orig, exp1, exp2, POINT_SUB >::operator T ( ) const
inline

conversion of the class to double or float or ...

Definition at line 374 of file Point_operators.hpp.

template<typename orig , typename exp1 , typename exp2 >
template<typename r_type = typename std::remove_reference<decltype(o1.value(0))>::type>
r_type point_expression_op< orig, exp1, exp2, POINT_SUB >::value ( size_t  k) const
inline

Evaluate the expression at coordinate k.

Parameters
kcoordinate
Returns
the evaluate expression at coordinate k

Definition at line 365 of file Point_operators.hpp.


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