DMRITool  v0.1.1-139-g860d86b4
Diffusion MRI Tool
utlFunctors.h
Go to the documentation of this file.
1 
11 #ifndef __utlFunctors_h
12 #define __utlFunctors_h
13 
14 #include "utlCoreMacro.h"
15 #include "utlCore.h"
16 #include "utlExpression.h"
17 #include <cmath>
18 
19 
21 #define utlUnaryFunctorBaseMacro(name, realFunc) \
22 namespace Functor{ \
23 template<typename T> \
24 struct name \
25 { \
26  UTL_ALWAYS_INLINE T operator()(const T a) const \
27  { return realFunc(a); } \
28  UTL_ALWAYS_INLINE bool operator!=(const name &) const \
29  { return false; } \
30  UTL_ALWAYS_INLINE bool operator==(const name & other) const \
31  { return !( *this != other ); } \
32 }; \
33 }
34 
35 
37 #define utlUnaryFunctorMacro(name, realFunc) \
38  utlUnaryFunctorBaseMacro(name, realFunc) \
39  \
40 template<class ExprT> \
41 auto name(const ExprT& expr) -> decltype(utl::F<utl::Functor::name<typename ExprT::ValueType> >(expr)) \
42  { \
43  return utl::F<utl::Functor::name<typename ExprT::ValueType> >(expr); \
44  } \
45  \
46 namespace Functor{ \
47 template<typename T, unsigned Dim> \
48 struct name<utl::NDArray<T,Dim> > : public VectorFunctorBase<utl::NDArray<T,Dim>, utl::NDArray<T,Dim> > \
49 { \
50 public: \
51  bool operator!=(const name & other) const \
52  { return false; } \
53  bool operator==(const name & other) const \
54  { return !( *this != other ); } \
55  void operator=(const name & other) {} \
56  inline utl::NDArray<T,Dim> operator()( const utl::NDArray<T,Dim> & A ) const \
57  { \
58  return utl::name(A); \
59  } \
60  \
61  int GetOutputDimension(const int inSize) const \
62  { return inSize; } \
63 }; \
64 }
65 
66 
67 
69 #define utlBinaryFunctorBaseMacro(name, realFunc) \
70 namespace Functor{ \
71 template<typename T> \
72 struct name \
73 { \
74  UTL_ALWAYS_INLINE T operator()(const T a, const T b) const \
75  { return realFunc(a, b); } \
76  UTL_ALWAYS_INLINE bool operator!=(const name &) const \
77  { return false; } \
78  UTL_ALWAYS_INLINE bool operator==(const name & other) const \
79  { return !( *this != other ); } \
80 }; \
81 }
82 
83 
85 #define utlBinaryFunctorMacro(name, realFunc) \
86  utlBinaryFunctorBaseMacro(name, realFunc) \
87  \
88 template<class TLeft, class TRight> \
89 auto name(const TLeft& lhs, const TRight& rhs) -> decltype(utl::F<utl::Functor::name<Expr2ValueType<TLeft,TRight>> >(lhs, rhs)) \
90  { \
91  return utl::F<utl::Functor::name<Expr2ValueType<TLeft,TRight>> >(lhs, rhs); \
92  } \
93 template<class TLeft> \
94 auto name(const TLeft& lhs, const ScalarExpr& rhs) -> decltype(utl::F<utl::Functor::name<Expr2ValueType<TLeft,ScalarExpr>> >(lhs, rhs)) \
95  { \
96  return utl::F<utl::Functor::name<Expr2ValueType<TLeft,ScalarExpr>> >(lhs, rhs); \
97  } \
98 template<class TRight> \
99 auto name(const ScalarExpr& lhs, const TRight& rhs) -> decltype(utl::F<utl::Functor::name<Expr2ValueType<ScalarExpr,TRight>> >(lhs, rhs)) \
100  { \
101  return utl::F<utl::Functor::name<Expr2ValueType<ScalarExpr,TRight>> >(lhs, rhs); \
102  } \
103 
104 
106 #define utlVectorToScalarFunctorMacro(name, funcName) \
107 namespace Functor{ \
108 template< class TVector, class TOutput=double > \
109 class name : public VectorFunctorBase<TVector,TOutput> \
110 { \
111 public: \
112  bool operator!=(const name & other) const \
113  { return false; } \
114  bool operator==(const name & other) const \
115  { return !( *this != other ); } \
116  void operator=(const name & other) {} \
117  inline TOutput operator()( const TVector & A ) const \
118  { \
119  return A.funcName(); \
120  } \
121  \
122  int GetOutputDimension(const int) const \
123  { return 1; } \
124 }; \
125 }
126 
127 namespace utl
128 {
129 
130 template < class T, unsigned int Dim >
131 class NDArray;
132 
140 namespace Functor
141 {
142 template< class TVector, class TOutput=TVector >
144 {
145 public:
147  bool operator==(const Self & other) const
148  { return false; }
149  bool operator!=(const Self & other) const
150  { return ! (*this==other); }
151 
152  Self& operator=(const Self & other)
153  {
154  if (this!=&other)
155  {
156  m_LogLevel = other.m_LogLevel;
157  }
158  return *this;
159  }
160 
161  int GetOutputDimension(const int inputSize) const
162  {return -1;}
163  int GetOutputDimension(const std::vector<int>& sizeVec) const
164  {return -1;}
165 
166  void Initialize() {}
167  void VerifyInputParameters(const int inputSize=-1) const {}
168 
170 
171  void Print(std::ostream & os=std::cout) const
172  {
173  utlLogOSVar(os, m_LogLevel);
174  }
175 
176 protected:
177  int m_LogLevel=1;
178 };
179 
180 
181 template< class TFunctor, class TVector=utl::NDArray<double,1>, class TOutput=TVector >
182 class ScalarFunctorWrapper : public VectorFunctorBase<TVector, TOutput>
183 {
184 public:
186  bool operator==(const Self & other) const
187  { return false; }
188  bool operator!=(const Self & other) const
189  { return ! (*this==other); }
190  void operator=(const Self & other)
191  {m_Functor = other.m_Functor;}
192 
193  ScalarFunctorWrapper(const TFunctor& func=TFunctor())
194  {
195  m_Functor = func;
196  }
197 
198  TFunctor GetFunctor() const
199  {
200  return m_Functor;
201  }
202  void SetFunctor(const TFunctor& func)
203  {
204  m_Functor = func;
205  }
206 
207  inline TOutput operator()( const TVector & A) const
208  {
209  int inputSize = A.Size();
210  TOutput out(inputSize);
211  for ( int i = 0; i < inputSize; ++i )
212  {
213  out[i]= m_Functor(A[i]);
214  }
215  return out;
216  }
217 
218  int GetOutputDimension(const int inputSize) const
219  {
220  return inputSize;
221  }
222 protected:
223  TFunctor m_Functor;
224 };
225 
226 template< class TFunctor, class TVector=utl::NDArray<double,1>, class TOutput=TVector >
227 class VectorFunctorWrapper : public VectorFunctorBase<TVector, TOutput>
228 {
229 public:
231  bool operator==(const Self & other) const
232  { return false; }
233  bool operator!=(const Self & other) const
234  { return ! (*this==other); }
235  void operator=(const Self & other)
236  {m_Functor = other.m_Functor;}
237 
238  VectorFunctorWrapper(const TFunctor& func=TFunctor())
239  {
240  m_Functor = func;
241  }
242 
243  TFunctor GetFunctor() const
244  {
245  return m_Functor;
246  }
247  void SetFunctor(const TFunctor& func)
248  {
249  m_Functor = func;
250  }
251 
252  inline TOutput operator()( const TVector & A) const
253  {
254  int inputSize = A.Size();
255  TOutput out(inputSize);
256  out= m_Functor(A);
257  return out;
258  }
259 
260  int GetOutputDimension(const int inputSize) const
261  {
262  return inputSize;
263  }
264 protected:
265  TFunctor m_Functor;
266 };
267 
268 template< class TFunction=std::function<double(double)> , class TVector=utl::NDArray<double,1>, class TOutput=TVector >
269 class VectorUnaryFunctionWrapper : public VectorFunctorBase<TVector, TOutput>
270 {
271 public:
273  bool operator==(const Self & other) const
274  { return false; }
275  bool operator!=(const Self & other) const
276  { return ! (*this==other); }
277  void operator=(const Self & other)
278  {m_Function = other.m_Function;}
279 
280  VectorUnaryFunctionWrapper(TFunction func=nullptr)
281  {
282  m_Function = func;
283  }
284 
285  inline TOutput operator()( const TVector & A) const
286  {
287  int inputSize = A.Size();
288  TOutput out(inputSize);
289  for ( int i = 0; i < inputSize; ++i )
290  {
291  out[i]= m_Function(A[i]);
292  }
293  return out;
294  }
295 
296  int GetOutputDimension(const int inputSize) const
297  {
298  return inputSize;
299  }
300 protected:
301  TFunction m_Function;
302 };
303 
304 template< class TFunction=std::function<double(std::vector<double>)> , class TVector=utl::NDArray<double,1>, class TOutput=TVector >
306 {
307 public:
309  bool operator==(const Self & other) const
310  { return false; }
311  bool operator!=(const Self & other) const
312  { return ! (*this==other); }
313  void operator=(const Self & other)
314  {m_Function = other.m_Function;}
315 
316  VectorMultiVariableFunctionWrapper(TFunction func=nullptr)
317  {
318  m_Function = func;
319  }
320 
321  inline TOutput operator()( const std::vector<TVector>& vec) const
322  {
323  int N = vec.size();
324  utlException(N==0, "cannot be empty vector");
325  int inputSize = vec[0].Size();
326  TOutput out(inputSize);
327  std::vector<double> values;
328  for ( int i = 0; i < inputSize; ++i )
329  {
330  values.clear();
331  for ( int j = 0; j < N; ++j )
332  {
333  values.push_back(vec[j][i]);
334  }
335  out[i]= m_Function(values);
336  }
337  return out;
338  }
339 
340  int GetOutputDimension(const int inputSize) const
341  {
342  return inputSize;
343  }
344  int GetOutputDimension(const std::vector<int>& sizeVec) const
345  {
346  return sizeVec[0];
347  }
348 protected:
349  TFunction m_Function;
350 };
351 
352 }
353 
354 
370 
377 
378 // utlUnaryFunctorMacro(Real, std::real); // return type: double
379 // utlUnaryFunctorMacro(Imag, std::imag); // return type: double
381 
387 
388 
399 
400 namespace Functor
401 {
402 
403 
411 template< class TVector, class TOutput=TVector >
412 class Shred : public VectorFunctorBase<TVector, TOutput>
413 {
414 public:
415  typedef Shred Self;
417 
418  bool operator==(const Self & other) const
419  { return m_Offset==other.m_Offset && m_ChunkSize==other.m_ChunkSize && m_Space==other.m_Space; }
420  bool operator!=(const Self & other) const
421  { return ! (*this==other); }
422 
423  Self& operator=(const Self & other)
424  {
425  Superclass::operator=(other);
426  if (this!=&other)
427  {
428  m_Offset = other.m_Offset;
429  m_ChunkSize = other.m_ChunkSize;
430  m_Space = other.m_Space;
431  }
432  return *this;
433  }
434 
435  inline TOutput operator()( const TVector & A ) const
436  {
437  int inputSize = A.Size();
438  TOutput out(GetOutputDimension(inputSize));
439  int tIndex = 0;
440  for (int t = m_Offset; t < inputSize; t++)
441  {
442  if (t >= m_Offset && (t - m_Offset) % (m_ChunkSize + m_Space) < m_ChunkSize)
443  {
444  out[tIndex] = A[t];
445  tIndex++;
446  }
447  }
448  return out;
449  }
450 
451  int GetOutputDimension(const int inputSize) const
452  {
453  int outputSize = (inputSize - m_Offset) / (m_ChunkSize + m_Space) * m_ChunkSize;
454  int residual = (inputSize - m_Offset) % (m_ChunkSize + m_Space);
455  outputSize += std::min(m_ChunkSize, residual);
456  return outputSize;
457  }
458 
459  void SetArguments(const std::vector<int>& vec)
460  {
461  utlException(vec.size()!=3, "wrong size of vec");
462  m_Offset = vec[0];
463  m_ChunkSize = vec[1];
464  m_Space = vec[2];
465  }
466 
467  std::vector<int> GetArguments()
468  {
469  std::vector<int> vec(3);
470  vec[0] = m_Offset;
471  vec[1] = m_ChunkSize;
472  vec[2] = m_Space;
473  return vec;
474  }
475 
476  utlSetGetMacro(Offset, int);
477  utlSetGetMacro(ChunkSize, int);
478  utlSetGetMacro(Space, int);
479 
480  void Print(std::ostream & os=std::cout) const
481  {
482  Superclass::Print(os);
483  utlLogOSVar(os, m_Offset, m_ChunkSize, m_Space);
484  }
485 
486 protected:
487  int m_Offset;
489  int m_Space;
490 };
491 
492 
493 template< class TVector, class TOutput=TVector >
494 class DotProduct : public VectorFunctorBase<TVector, TOutput>
495 {
496 public:
497  typedef DotProduct Self;
498  bool operator==(const Self & other) const
499  { return true; }
500  bool operator!=(const Self & other) const
501  { return ! (*this==other); }
502  void operator=(const Self & other) {}
503 
504  inline TOutput operator()( const TVector & A, const TVector & B ) const
505  {
506  int inputSize = A.Size();
507  TOutput out(GetOutputDimension(inputSize));
508  out[0]=0;
509  for ( int i = 0; i < inputSize; ++i )
510  out[0] += A[i]*B[i];
511  return out;
512  }
513 
514  inline TOutput operator()(const std::vector<TVector>& vec) const
515  {
516  utlException(vec.size()!=2, "need to set only 2 vectors");
517  TVector A = vec[0];
518  TVector B = vec[1];
519  int inputSize = A.Size();
520  utlSAException(B.Size()!=inputSize)(inputSize)(B.Size()).msg("two vectors have different sizes");
521  TOutput out(GetOutputDimension(inputSize));
522  out[0]=0;
523  for ( int i = 0; i < inputSize; ++i )
524  out[0] += A[i]*B[i];
525  return out;
526  }
527 
528  int GetOutputDimension(const int inputSize) const
529  {
530  return 1;
531  }
532  int GetOutputDimension(const std::vector<int>& sizeVec) const
533  {
534  return 1;
535  }
536 };
537 
538 template< class TVector, class TOutput=TVector >
539 class Compose : public VectorFunctorBase<TVector, TOutput>
540 {
541 public:
542  typedef Compose Self;
543  bool operator==(const Self & other) const
544  { return true; }
545  bool operator!=(const Self & other) const
546  { return ! (*this==other); }
547  void operator=(const Self & other)
548  {}
549 
550  inline TOutput operator()(const std::vector<TVector>& vec) const
551  {
552  std::vector<int> sizeVec;
553  for ( int i = 0; i < vec.size(); ++i )
554  sizeVec.push_back(vec[i].Size());
555  int outDim = GetOutputDimension(sizeVec);
556 
557  TOutput out(outDim);
558  int kk=0;
559  for ( int i = 0; i < vec.size(); ++i )
560  {
561  for ( int j = 0; j < sizeVec[i]; ++j )
562  {
563  out[kk] = vec[i][j];
564  kk++;
565  }
566  }
567  return out;
568  }
569 
570  int GetOutputDimension(const std::vector<int>& sizeVec) const
571  {
572  return std::accumulate(sizeVec.begin(), sizeVec.end(), 0);
573  }
574 
575 };
576 
577 }
578 
582 }
583 
584 #endif
NDArray is a N-Dimensional array class (row-major, c version)
Definition: utlFunctors.h:131
bool operator==(const Self &other) const
Definition: utlFunctors.h:543
bool operator!=(const Self &other) const
Definition: utlFunctors.h:233
VectorFunctorWrapper(const TFunctor &func=TFunctor())
Definition: utlFunctors.h:238
Self & operator=(const Self &other)
Definition: utlFunctors.h:423
auto Round(const ExprT &expr) -> decltype(utl::F< utl::Functor::Round< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:364
auto Atan(const ExprT &expr) -> decltype(utl::F< utl::Functor::Atan< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:376
TOutput operator()(const TVector &A) const
Definition: utlFunctors.h:435
void VerifyInputParameters(const int inputSize=-1) const
Definition: utlFunctors.h:167
bool operator==(const Self &other) const
Definition: utlFunctors.h:273
TOutput operator()(const std::vector< TVector > &vec) const
Definition: utlFunctors.h:514
void operator=(const Self &other)
Definition: utlFunctors.h:547
int GetOutputDimension(const std::vector< int > &sizeVec) const
Definition: utlFunctors.h:163
auto Conj(const ExprT &expr) -> decltype(utl::F< utl::Functor::Conj< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:380
VectorFunctorBase< TVector, TOutput > Superclass
Definition: utlFunctors.h:416
void operator=(const Self &other)
Definition: utlFunctors.h:235
VectorUnaryFunctionWrapper Self
Definition: utlFunctors.h:272
auto Pow(const TLeft &lhs, const TRight &rhs) -> decltype(utl::F< utl::Functor::Pow< Expr2ValueType< TLeft, TRight >> >(lhs, rhs))
Definition: utlFunctors.h:385
auto Exp(const ExprT &expr) -> decltype(utl::F< utl::Functor::Exp< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:357
int GetOutputDimension(const int inputSize) const
Definition: utlFunctors.h:260
bool operator==(const Self &other) const
Definition: utlFunctors.h:309
bool operator==(const Self &other) const
Definition: utlFunctors.h:498
auto Exp2(const ExprT &expr) -> decltype(utl::F< utl::Functor::Exp2< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:358
#define utlLogOSVar(os,...)
Definition: utlCoreMacro.h:285
void Print(Args...args)
Definition: utlCore11.h:87
TOutput operator()(const std::vector< TVector > &vec) const
Definition: utlFunctors.h:550
auto Sign(const ExprT &expr) -> decltype(utl::F< utl::Functor::Sign< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:367
bool operator!=(const Self &other) const
Definition: utlFunctors.h:275
int GetOutputDimension(const int inputSize) const
Definition: utlFunctors.h:296
int GetOutputDimension(const std::vector< int > &sizeVec) const
Definition: utlFunctors.h:570
auto Log(const ExprT &expr) -> decltype(utl::F< utl::Functor::Log< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:359
#define utlException(cond, expout)
Definition: utlCoreMacro.h:548
auto Log2(const ExprT &expr) -> decltype(utl::F< utl::Functor::Log2< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:361
TOutput operator()(const std::vector< TVector > &vec) const
Definition: utlFunctors.h:321
bool operator!=(const Self &other) const
Definition: utlFunctors.h:545
void Print(std::ostream &os=std::cout) const
Definition: utlFunctors.h:480
auto Acos(const ExprT &expr) -> decltype(utl::F< utl::Functor::Acos< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:375
int GetOutputDimension(const int inputSize) const
Definition: utlFunctors.h:451
Self & operator=(const Self &other)
Definition: utlFunctors.h:152
TOutput operator()(const TVector &A) const
Definition: utlFunctors.h:252
auto LRound(const ExprT &expr) -> decltype(utl::F< utl::Functor::LRound< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:365
void operator=(const Self &other)
Definition: utlFunctors.h:502
T square(const T &x)
Definition: utlCore.h:287
bool operator==(const Self &other) const
Definition: utlFunctors.h:231
auto Neg(const ExprT &expr) -> decltype(utl::F< utl::Functor::Neg< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:366
const T & max(const T &a, const T &b)
Return the maximum between a and b.
Definition: utlCore.h:263
bool operator!=(const Self &other) const
Definition: utlFunctors.h:188
auto Asin(const ExprT &expr) -> decltype(utl::F< utl::Functor::Asin< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:374
VectorUnaryFunctionWrapper(TFunction func=nullptr)
Definition: utlFunctors.h:280
bool operator!=(const Self &other) const
Definition: utlFunctors.h:311
auto Sqrt(const ExprT &expr) -> decltype(utl::F< utl::Functor::Sqrt< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:362
bool operator!=(const Self &other) const
Definition: utlFunctors.h:420
const T & min(const T &a, const T &b)
Return the minimum between a and b.
Definition: utlCore.h:257
int GetOutputDimension(const std::vector< int > &sizeVec) const
Definition: utlFunctors.h:344
#define utlSetGetMacro(name, type)
Definition: utlCoreMacro.h:589
T abs(const T x)
template version of the fabs function
TOutput operator()(const TVector &A) const
Definition: utlFunctors.h:207
auto Square(const ExprT &expr) -> decltype(utl::F< utl::Functor::Square< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:368
TOutput operator()(const TVector &A, const TVector &B) const
Definition: utlFunctors.h:504
auto Min(const TLeft &lhs, const TRight &rhs) -> decltype(utl::F< utl::Functor::Min< Expr2ValueType< TLeft, TRight >> >(lhs, rhs))
Definition: utlFunctors.h:384
VectorMultiVariableFunctionWrapper(TFunction func=nullptr)
Definition: utlFunctors.h:316
Definition: utl.h:90
auto Floor(const ExprT &expr) -> decltype(utl::F< utl::Functor::Floor< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:363
int GetOutputDimension(const int inputSize) const
Definition: utlFunctors.h:218
int GetOutputDimension(const int inputSize) const
Definition: utlFunctors.h:161
int GetOutputDimension(const int inputSize) const
Definition: utlFunctors.h:340
std::vector< int > GetArguments()
Definition: utlFunctors.h:467
auto Tan(const ExprT &expr) -> decltype(utl::F< utl::Functor::Tan< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:373
auto Cube(const ExprT &expr) -> decltype(utl::F< utl::Functor::Cube< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:369
auto Atan2(const TLeft &lhs, const TRight &rhs) -> decltype(utl::F< utl::Functor::Atan2< Expr2ValueType< TLeft, TRight >> >(lhs, rhs))
Definition: utlFunctors.h:386
int GetOutputDimension(const int inputSize) const
Definition: utlFunctors.h:528
static int LogLevel
Definition: utlCoreMacro.h:203
#define utlSAException(expr)
Definition: utlCoreMacro.h:543
void Print(std::ostream &os=std::cout) const
Definition: utlFunctors.h:171
bool operator==(const Self &other) const
Definition: utlFunctors.h:418
TOutput operator()(const TVector &A) const
Definition: utlFunctors.h:285
void SetFunctor(const TFunctor &func)
Definition: utlFunctors.h:247
ScalarFunctorWrapper(const TFunctor &func=TFunctor())
Definition: utlFunctors.h:193
bool operator!=(const Self &other) const
Definition: utlFunctors.h:500
#define utlVectorToScalarFunctorMacro(name, funcName)
Definition: utlFunctors.h:106
VectorMultiVariableFunctionWrapper Self
Definition: utlFunctors.h:308
#define utlUnaryFunctorMacro(name, realFunc)
Definition: utlFunctors.h:37
#define utlBinaryFunctorMacro(name, realFunc)
Definition: utlFunctors.h:85
auto Abs(const ExprT &expr) -> decltype(utl::F< utl::Functor::Abs< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:356
void SetFunctor(const TFunctor &func)
Definition: utlFunctors.h:202
int GetOutputDimension(const std::vector< int > &sizeVec) const
Definition: utlFunctors.h:532
obtain a part of a vector.
Definition: utlFunctors.h:412
void operator=(const Self &other)
Definition: utlFunctors.h:190
macros for utlCore
bool operator==(const Self &other) const
Definition: utlFunctors.h:186
bool operator==(const Self &other) const
Definition: utlFunctors.h:147
bool operator!=(const Self &other) const
Definition: utlFunctors.h:149
int sign(const T &x)
Return the sign of x.
Definition: utlCore.h:285
auto Log10(const ExprT &expr) -> decltype(utl::F< utl::Functor::Log10< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:360
void SetArguments(const std::vector< int > &vec)
Definition: utlFunctors.h:459
T cube(const T &x)
Definition: utlCore.h:289
auto Sin(const ExprT &expr) -> decltype(utl::F< utl::Functor::Sin< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:371
auto Cos(const ExprT &expr) -> decltype(utl::F< utl::Functor::Cos< typename ExprT::ValueType > >(expr))
Definition: utlFunctors.h:372
auto Max(const TLeft &lhs, const TRight &rhs) -> decltype(utl::F< utl::Functor::Max< Expr2ValueType< TLeft, TRight >> >(lhs, rhs))
Definition: utlFunctors.h:383