Chemical Data Processing Library C++ API - Version 1.2.0
QuaternionExpression.hpp
Go to the documentation of this file.
1 /*
2  * QuaternionExpression.hpp
3  *
4  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this library; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
27 #ifndef CDPL_MATH_QUATERNIONEXPRESSION_HPP
28 #define CDPL_MATH_QUATERNIONEXPRESSION_HPP
29 
30 #include <type_traits>
31 
32 #include "CDPL/Math/Expression.hpp"
33 #include "CDPL/Math/CommonType.hpp"
34 #include "CDPL/Math/Functional.hpp"
35 #include "CDPL/Math/TypeTraits.hpp"
36 
37 
38 namespace CDPL
39 {
40 
41  namespace Math
42  {
43 
44  template <typename E, typename F>
45  class QuaternionUnary1 : public QuaternionExpression<QuaternionUnary1<E, F> >
46  {
47 
49  typedef F FunctorType;
50  typedef E ExpressionType;
51  typedef typename E::ConstClosureType ExpressionClosureType;
52 
53  public:
54  typedef typename F::ResultType ValueType;
55  typedef const ValueType ConstReference;
56  typedef const ValueType Reference;
57  typedef const SelfType ConstClosureType;
59 
61  expr(e) {}
62 
64  {
65  return FunctorType::apply(expr.getC1());
66  }
67 
69  {
70  return FunctorType::apply(expr.getC2());
71  }
72 
74  {
75  return FunctorType::apply(expr.getC3());
76  }
77 
79  {
80  return FunctorType::apply(expr.getC4());
81  }
82 
83  private:
84  ExpressionClosureType expr;
85  };
86 
87  template <typename E, typename F>
89  {
90 
93  };
94 
95  template <typename E, typename F>
96  class QuaternionUnary2 : public QuaternionExpression<QuaternionUnary2<E, F> >
97  {
98 
100  typedef F FunctorType;
101  typedef E ExpressionType;
102  typedef typename E::ConstClosureType ExpressionClosureType;
103 
104  public:
105  typedef typename F::ResultType ValueType;
106  typedef const ValueType ConstReference;
107  typedef const ValueType Reference;
108  typedef const SelfType ConstClosureType;
110 
112  expr(e) {}
113 
115  {
116  return FunctorType::applyC1(expr);
117  }
118 
120  {
121  return FunctorType::applyC2(expr);
122  }
123 
125  {
126  return FunctorType::applyC3(expr);
127  }
128 
130  {
131  return FunctorType::applyC4(expr);
132  }
133 
134  private:
135  ExpressionClosureType expr;
136  };
137 
138  template <typename E, typename F>
140  {
141 
144  };
145 
146  template <typename E1, typename E2, typename F>
147  class QuaternionBinary1 : public QuaternionExpression<QuaternionBinary1<E1, E2, F> >
148  {
149 
151  typedef F FunctorType;
152  typedef E1 Expression1Type;
153  typedef E2 Expression2Type;
154  typedef typename E1::ConstClosureType Expression1ClosureType;
155  typedef typename E2::ConstClosureType Expression2ClosureType;
156 
157  public:
158  typedef typename F::ResultType ValueType;
159  typedef const ValueType ConstReference;
160  typedef const ValueType Reference;
161  typedef const SelfType ConstClosureType;
163 
164  QuaternionBinary1(const Expression1Type& e1, const Expression2Type& e2):
165  expr1(e1), expr2(e2) {}
166 
168  {
169  return FunctorType::apply(expr1.getC1(), expr2.getC1());
170  }
171 
173  {
174  return FunctorType::apply(expr1.getC2(), expr2.getC2());
175  }
176 
178  {
179  return FunctorType::apply(expr1.getC3(), expr2.getC3());
180  }
181 
183  {
184  return FunctorType::apply(expr1.getC4(), expr2.getC4());
185  }
186 
187  private:
188  Expression1ClosureType expr1;
189  Expression2ClosureType expr2;
190  };
191 
192  template <typename E1, typename E2, typename F>
194  {
195 
198  };
199 
200  template <typename E1, typename E2, typename F>
201  class QuaternionBinary2 : public QuaternionExpression<QuaternionBinary2<E1, E2, F> >
202  {
203 
205  typedef F FunctorType;
206  typedef E1 Expression1Type;
207  typedef E2 Expression2Type;
208  typedef typename E1::ConstClosureType Expression1ClosureType;
209  typedef typename E2::ConstClosureType Expression2ClosureType;
210 
211  public:
212  typedef typename F::ResultType ValueType;
213  typedef const ValueType ConstReference;
214  typedef const ValueType Reference;
215  typedef const SelfType ConstClosureType;
217 
218  QuaternionBinary2(const Expression1Type& e1, const Expression2Type& e2):
219  expr1(e1), expr2(e2) {}
220 
222  {
223  return FunctorType::applyC1(expr1, expr2);
224  }
225 
227  {
228  return FunctorType::applyC2(expr1, expr2);
229  }
230 
232  {
233  return FunctorType::applyC3(expr1, expr2);
234  }
235 
237  {
238  return FunctorType::applyC4(expr1, expr2);
239  }
240 
241  private:
242  Expression1ClosureType expr1;
243  Expression2ClosureType expr2;
244  };
245 
246  template <typename E1, typename E2, typename F>
248  {
249 
252  };
253 
254  template <typename E1, typename E2, typename F>
255  class Scalar1QuaternionBinary1 : public QuaternionExpression<Scalar1QuaternionBinary1<E1, E2, F> >
256  {
257 
259  typedef F FunctorType;
260  typedef E1 Expression1Type;
261  typedef E2 Expression2Type;
262  typedef const E1 Expression1ClosureType;
263  typedef typename E2::ConstClosureType Expression2ClosureType;
264 
265  public:
266  typedef typename F::ResultType ValueType;
267  typedef const ValueType ConstReference;
268  typedef const ValueType Reference;
269  typedef const SelfType ConstClosureType;
271 
272  Scalar1QuaternionBinary1(const Expression1Type& e1, const Expression2Type& e2):
273  expr1(e1), expr2(e2) {}
274 
276  {
277  return FunctorType::apply(expr1, expr2.getC1());
278  }
279 
281  {
282  return FunctorType::apply(expr1, expr2.getC2());
283  }
284 
286  {
287  return FunctorType::apply(expr1, expr2.getC3());
288  }
289 
291  {
292  return FunctorType::apply(expr1, expr2.getC4());
293  }
294 
295  private:
296  Expression1ClosureType expr1;
297  Expression2ClosureType expr2;
298  };
299 
300  template <typename E1, typename E2, typename F>
302  {
303 
306  };
307 
308  template <typename E1, typename E2, typename F>
309  class Scalar1QuaternionBinary2 : public QuaternionExpression<Scalar1QuaternionBinary2<E1, E2, F> >
310  {
311 
313  typedef F FunctorType;
314  typedef E1 Expression1Type;
315  typedef E2 Expression2Type;
316  typedef const E1 Expression1ClosureType;
317  typedef typename E2::ConstClosureType Expression2ClosureType;
318 
319  public:
320  typedef typename F::ResultType ValueType;
321  typedef const ValueType ConstReference;
322  typedef const ValueType Reference;
323  typedef const SelfType ConstClosureType;
325 
326  Scalar1QuaternionBinary2(const Expression1Type& e1, const Expression2Type& e2):
327  expr1(e1), expr2(e2) {}
328 
330  {
331  return FunctorType::applyC1(expr1, expr2);
332  }
333 
335  {
336  return FunctorType::applyC2(expr1, expr2);
337  }
338 
340  {
341  return FunctorType::applyC3(expr1, expr2);
342  }
343 
345  {
346  return FunctorType::applyC4(expr1, expr2);
347  }
348 
349  private:
350  Expression1ClosureType expr1;
351  Expression2ClosureType expr2;
352  };
353 
354  template <typename E1, typename E2, typename F>
356  {
357 
360  };
361 
362  template <typename E1, typename E2, typename F>
363  class Scalar2QuaternionBinary1 : public QuaternionExpression<Scalar2QuaternionBinary1<E1, E2, F> >
364  {
365 
367  typedef F FunctorType;
368  typedef E1 Expression1Type;
369  typedef E2 Expression2Type;
370  typedef typename E1::ConstClosureType Expression1ClosureType;
371  typedef const E2 Expression2ClosureType;
372 
373  public:
374  typedef typename F::ResultType ValueType;
375  typedef const ValueType ConstReference;
376  typedef const ValueType Reference;
377  typedef const SelfType ConstClosureType;
379 
380  Scalar2QuaternionBinary1(const Expression1Type& e1, const Expression2Type& e2):
381  expr1(e1), expr2(e2) {}
382 
384  {
385  return FunctorType::apply(expr1.getC1(), expr2);
386  }
387 
389  {
390  return FunctorType::apply(expr1.getC2(), expr2);
391  }
392 
394  {
395  return FunctorType::apply(expr1.getC3(), expr2);
396  }
397 
399  {
400  return FunctorType::apply(expr1.getC4(), expr2);
401  }
402 
403  private:
404  Expression1ClosureType expr1;
405  Expression2ClosureType expr2;
406  };
407 
408  template <typename E1, typename E2, typename F>
410  {
411 
414  };
415 
416  template <typename E1, typename E2, typename F>
417  class Scalar2QuaternionBinary2 : public QuaternionExpression<Scalar2QuaternionBinary2<E1, E2, F> >
418  {
419 
421  typedef F FunctorType;
422  typedef E1 Expression1Type;
423  typedef E2 Expression2Type;
424  typedef typename E1::ConstClosureType Expression1ClosureType;
425  typedef const E2 Expression2ClosureType;
426 
427  public:
428  typedef typename F::ResultType ValueType;
429  typedef const ValueType ConstReference;
430  typedef const ValueType Reference;
431  typedef const SelfType ConstClosureType;
433 
434  Scalar2QuaternionBinary2(const Expression1Type& e1, const Expression2Type& e2):
435  expr1(e1), expr2(e2) {}
436 
438  {
439  return FunctorType::applyC1(expr1, expr2);
440  }
441 
443  {
444  return FunctorType::applyC2(expr1, expr2);
445  }
446 
448  {
449  return FunctorType::applyC3(expr1, expr2);
450  }
451 
453  {
454  return FunctorType::applyC4(expr1, expr2);
455  }
456 
457  private:
458  Expression1ClosureType expr1;
459  Expression2ClosureType expr2;
460  };
461 
462  template <typename E1, typename E2, typename F>
464  {
465 
468  };
469 
470  template <typename E1, typename E2, typename E3, typename F>
471  class Scalar3QuaternionTernary : public QuaternionExpression<Scalar3QuaternionTernary<E1, E2, E3, F> >
472  {
473 
475  typedef F FunctorType;
476  typedef E1 Expression1Type;
477  typedef E2 Expression2Type;
478  typedef E3 Expression3Type;
479  typedef typename E1::ConstClosureType Expression1ClosureType;
480  typedef typename E2::ConstClosureType Expression2ClosureType;
481  typedef const E3 Expression3ClosureType;
482 
483  public:
484  typedef typename F::ResultType ValueType;
485  typedef const ValueType ConstReference;
486  typedef const ValueType Reference;
487  typedef const SelfType ConstClosureType;
489 
490  Scalar3QuaternionTernary(const Expression1Type& e1, const Expression2Type& e2, const Expression3Type& e3):
491  expr1(e1), expr2(e2), expr3(e3) {}
492 
494  {
495  return FunctorType::applyC1(expr1, expr2, expr3);
496  }
497 
499  {
500  return FunctorType::applyC2(expr1, expr2, expr3);
501  }
502 
504  {
505  return FunctorType::applyC3(expr1, expr2, expr3);
506  }
507 
509  {
510  return FunctorType::applyC4(expr1, expr2, expr3);
511  }
512 
513  private:
514  Expression1ClosureType expr1;
515  Expression2ClosureType expr2;
516  Expression3ClosureType expr3;
517  };
518 
519  template <typename E1, typename E2, typename E3, typename F>
521  {
522 
525  };
526 
527  template <typename E1, typename E2, typename E3, typename F>
528  class Scalar13QuaternionTernary : public QuaternionExpression<Scalar13QuaternionTernary<E1, E2, E3, F> >
529  {
530 
532  typedef F FunctorType;
533  typedef E1 Expression1Type;
534  typedef E2 Expression2Type;
535  typedef E3 Expression3Type;
536  typedef const E1 Expression1ClosureType;
537  typedef typename E2::ConstClosureType Expression2ClosureType;
538  typedef const E3 Expression3ClosureType;
539 
540  public:
541  typedef typename F::ResultType ValueType;
542  typedef const ValueType ConstReference;
543  typedef const ValueType Reference;
544  typedef const SelfType ConstClosureType;
546 
547  Scalar13QuaternionTernary(const Expression1Type& e1, const Expression2Type& e2, const Expression3Type& e3):
548  expr1(e1), expr2(e2), expr3(e3) {}
549 
551  {
552  return FunctorType::applyC1(expr1, expr2, expr3);
553  }
554 
556  {
557  return FunctorType::applyC2(expr1, expr2, expr3);
558  }
559 
561  {
562  return FunctorType::applyC3(expr1, expr2, expr3);
563  }
564 
566  {
567  return FunctorType::applyC4(expr1, expr2, expr3);
568  }
569 
570  private:
571  Expression1ClosureType expr1;
572  Expression2ClosureType expr2;
573  Expression3ClosureType expr3;
574  };
575 
576  template <typename E1, typename E2, typename E3, typename F>
578  {
579 
582  };
583 
584  template <typename E>
587  {
588  typedef typename QuaternionUnary1Traits<E, ScalarNegation<typename E::ValueType> >::ExpressionType ExpressionType;
589 
590  return ExpressionType(e());
591  }
592 
593  template <typename E>
594  const E&
596  {
597  return e();
598  }
599 
600  template <typename E1, typename E2>
601  typename QuaternionBinary1Traits<E1, E2, ScalarAddition<typename E1::ValueType, typename E2::ValueType> >::ResultType
603  {
604  typedef typename QuaternionBinary1Traits<E1, E2,
606 
607  return ExpressionType(e1(), e2());
608  }
609 
610  template <typename E, typename T>
611  typename std::enable_if<IsScalar<T>::value, typename Scalar2QuaternionBinary2Traits<E, T, Scalar2QuaternionAddition<E, T> >::ResultType>::type
612  operator+(const QuaternionExpression<E>& e, const T& t)
613  {
614  typedef typename Scalar2QuaternionBinary2Traits<E, T, Scalar2QuaternionAddition<E, T> >::ExpressionType ExpressionType;
615 
616  return ExpressionType(e(), t);
617  }
618 
619  template <typename T, typename E>
620  typename std::enable_if<IsScalar<T>::value, typename Scalar1QuaternionBinary2Traits<T, E, Scalar1QuaternionAddition<T, E> >::ResultType>::type
621  operator+(const T& t, const QuaternionExpression<E>& e)
622  {
623  typedef typename Scalar1QuaternionBinary2Traits<T, E, Scalar1QuaternionAddition<T, E> >::ExpressionType ExpressionType;
624 
625  return ExpressionType(t, e());
626  }
627 
628  template <typename E1, typename E2>
629  typename QuaternionBinary1Traits<E1, E2, ScalarSubtraction<typename E1::ValueType, typename E2::ValueType> >::ResultType
631  {
632  typedef typename QuaternionBinary1Traits<E1, E2,
634 
635  return ExpressionType(e1(), e2());
636  }
637 
638  template <typename E, typename T>
639  typename std::enable_if<IsScalar<T>::value, typename Scalar2QuaternionBinary2Traits<E, T, Scalar2QuaternionSubtraction<E, T> >::ResultType>::type
640  operator-(const QuaternionExpression<E>& e, const T& t)
641  {
642  typedef typename Scalar2QuaternionBinary2Traits<E, T, Scalar2QuaternionSubtraction<E, T> >::ExpressionType ExpressionType;
643 
644  return ExpressionType(e(), t);
645  }
646 
647  template <typename T, typename E>
648  typename std::enable_if<IsScalar<T>::value, typename Scalar1QuaternionBinary2Traits<T, E, Scalar1QuaternionSubtraction<T, E> >::ResultType>::type
649  operator-(const T& t, const QuaternionExpression<E>& e)
650  {
651  typedef typename Scalar1QuaternionBinary2Traits<T, E, Scalar1QuaternionSubtraction<T, E> >::ExpressionType ExpressionType;
652 
653  return ExpressionType(t, e());
654  }
655 
656  template <typename E1, typename E2>
657  typename QuaternionBinary2Traits<E1, E2, QuaternionProduct<E1, E2> >::ResultType
659  {
660  typedef typename QuaternionBinary2Traits<E1, E2, QuaternionProduct<E1, E2> >::ExpressionType ExpressionType;
661 
662  return ExpressionType(e1(), e2());
663  }
664 
665  template <typename E, typename T>
666  typename std::enable_if<IsScalar<T>::value, typename Scalar2QuaternionBinary1Traits<E, T, ScalarMultiplication<typename E::ValueType, T> >::ResultType>::type
667  operator*(const QuaternionExpression<E>& e, const T& t)
668  {
669  typedef typename Scalar2QuaternionBinary1Traits<E, T,
670  ScalarMultiplication<typename E::ValueType, T> >::ExpressionType ExpressionType;
671 
672  return ExpressionType(e(), t);
673  }
674 
675  template <typename T, typename E>
676  typename std::enable_if<IsScalar<T>::value, typename Scalar1QuaternionBinary1Traits<T, E, ScalarMultiplication<T, typename E::ValueType> >::ResultType>::type
677  operator*(const T& t, const QuaternionExpression<E>& e)
678  {
679  typedef typename Scalar1QuaternionBinary1Traits<T, E,
680  ScalarMultiplication<T, typename E::ValueType> >::ExpressionType ExpressionType;
681 
682  return ExpressionType(t, e());
683  }
684 
685  template <typename E1, typename E2>
689  {
692 
693  return ExpressionType(e1(), e2(), norm2(e2));
694  }
695 
696  template <typename E, typename T>
697  typename std::enable_if<IsScalar<T>::value, typename Scalar2QuaternionBinary1Traits<E, T, ScalarDivision<typename E::ValueType, T> >::ResultType>::type
698  operator/(const QuaternionExpression<E>& e, const T& t)
699  {
700  typedef typename Scalar2QuaternionBinary1Traits<E, T,
701  ScalarDivision<typename E::ValueType, T> >::ExpressionType ExpressionType;
702 
703  return ExpressionType(e(), t);
704  }
705 
706  template <typename T, typename E>
707  typename std::enable_if<IsScalar<T>::value,
710  operator/(const T& t, const QuaternionExpression<E>& e)
711  {
714 
715  return ExpressionType(t, e(), norm2(e));
716  }
717 
718  template <typename E1, typename E2>
721  {
722  return QuaternionEquality<E1, E2>::apply(e1, e2);
723  }
724 
725  template <typename E1, typename E2>
728  {
729  return !QuaternionEquality<E1, E2>::apply(e1, e2);
730  }
731 
732  template <typename E1, typename E2, typename T>
733  typename std::enable_if<std::is_arithmetic<T>::value, typename QuaternionToleranceEquality<E1, E2, T>::ResultType>::type
734  equals(const QuaternionExpression<E1>& e1, const QuaternionExpression<E2>& e2, const T& eps)
735  {
737  }
738 
739  template <typename E1, typename E2>
740  typename QuaternionBinary1Traits<E1, E2, ScalarDivision<typename E1::ValueType, typename E2::ValueType> >::ResultType
742  {
743  typedef typename QuaternionBinary1Traits<E1, E2,
745 
746  return ExpressionType(e1(), e2());
747  }
748 
749  template <typename E1, typename E2>
750  typename QuaternionBinary1Traits<E1, E2, ScalarMultiplication<typename E1::ValueType, typename E2::ValueType> >::ResultType
752  {
753  typedef typename QuaternionBinary1Traits<E1, E2,
755 
756  return ExpressionType(e1(), e2());
757  }
758 
759  template <typename E>
760  typename E::ValueType
762  {
763  return e().getC1();
764  }
765 
766  template <typename E>
767  typename QuaternionUnary2Traits<E, QuaternionUnreal<E> >::ResultType
769  {
770  typedef typename QuaternionUnary2Traits<E, QuaternionUnreal<E> >::ExpressionType ExpressionType;
771 
772  return ExpressionType(e());
773  }
774 
775  template <typename E>
776  typename QuaternionUnary2Traits<E, QuaternionConjugate<E> >::ResultType
778  {
779  typedef typename QuaternionUnary2Traits<E, QuaternionConjugate<E> >::ExpressionType ExpressionType;
780 
781  return ExpressionType(e());
782  }
783 
784  template <typename E>
788  {
790  QuaternionInverse<E, typename QuaternionNorm2<E>::ResultType> >::ExpressionType ExpressionType;
791 
792  return ExpressionType(e(), norm2(e));
793  }
794 
795  template <typename E>
798  {
799  return QuaternionNorm<E>::apply(e);
800  }
801 
802  template <typename E>
805  {
806  return QuaternionNorm2<E>::apply(e);
807  }
808 
809  template <typename E>
812  {
814  }
815  } // namespace Math
816 } // namespace CDPL
817 
818 #endif // CDPL_MATH_QUATERNIONEXPRESSION_HPP
Common type deduction.
Definition of basic expression types.
Definition of various functors.
Definition of type traits.
E ExpressionType
Definition: Expression.hpp:42
Definition: QuaternionExpression.hpp:148
ConstReference getC1() const
Definition: QuaternionExpression.hpp:167
ConstReference getC4() const
Definition: QuaternionExpression.hpp:182
const ValueType Reference
Definition: QuaternionExpression.hpp:160
const ValueType ConstReference
Definition: QuaternionExpression.hpp:159
const SelfType ConstClosureType
Definition: QuaternionExpression.hpp:161
F::ResultType ValueType
Definition: QuaternionExpression.hpp:158
QuaternionBinary1(const Expression1Type &e1, const Expression2Type &e2)
Definition: QuaternionExpression.hpp:164
SelfType ClosureType
Definition: QuaternionExpression.hpp:162
ConstReference getC3() const
Definition: QuaternionExpression.hpp:177
ConstReference getC2() const
Definition: QuaternionExpression.hpp:172
Definition: QuaternionExpression.hpp:202
const ValueType Reference
Definition: QuaternionExpression.hpp:214
const SelfType ConstClosureType
Definition: QuaternionExpression.hpp:215
QuaternionBinary2(const Expression1Type &e1, const Expression2Type &e2)
Definition: QuaternionExpression.hpp:218
ConstReference getC4() const
Definition: QuaternionExpression.hpp:236
SelfType ClosureType
Definition: QuaternionExpression.hpp:216
const ValueType ConstReference
Definition: QuaternionExpression.hpp:213
ConstReference getC1() const
Definition: QuaternionExpression.hpp:221
ConstReference getC3() const
Definition: QuaternionExpression.hpp:231
ConstReference getC2() const
Definition: QuaternionExpression.hpp:226
F::ResultType ValueType
Definition: QuaternionExpression.hpp:212
Definition: Expression.hpp:98
Definition: QuaternionExpression.hpp:46
ConstReference getC4() const
Definition: QuaternionExpression.hpp:78
F::ResultType ValueType
Definition: QuaternionExpression.hpp:54
ConstReference getC1() const
Definition: QuaternionExpression.hpp:63
ConstReference getC3() const
Definition: QuaternionExpression.hpp:73
const ValueType ConstReference
Definition: QuaternionExpression.hpp:55
ConstReference getC2() const
Definition: QuaternionExpression.hpp:68
const ValueType Reference
Definition: QuaternionExpression.hpp:56
SelfType ClosureType
Definition: QuaternionExpression.hpp:58
const SelfType ConstClosureType
Definition: QuaternionExpression.hpp:57
QuaternionUnary1(const ExpressionType &e)
Definition: QuaternionExpression.hpp:60
Definition: QuaternionExpression.hpp:97
F::ResultType ValueType
Definition: QuaternionExpression.hpp:105
ConstReference getC1() const
Definition: QuaternionExpression.hpp:114
SelfType ClosureType
Definition: QuaternionExpression.hpp:109
ConstReference getC4() const
Definition: QuaternionExpression.hpp:129
QuaternionUnary2(const ExpressionType &e)
Definition: QuaternionExpression.hpp:111
const ValueType ConstReference
Definition: QuaternionExpression.hpp:106
const SelfType ConstClosureType
Definition: QuaternionExpression.hpp:108
const ValueType Reference
Definition: QuaternionExpression.hpp:107
ConstReference getC3() const
Definition: QuaternionExpression.hpp:124
ConstReference getC2() const
Definition: QuaternionExpression.hpp:119
Definition: QuaternionExpression.hpp:529
Scalar13QuaternionTernary(const Expression1Type &e1, const Expression2Type &e2, const Expression3Type &e3)
Definition: QuaternionExpression.hpp:547
ConstReference getC3() const
Definition: QuaternionExpression.hpp:560
ConstReference getC4() const
Definition: QuaternionExpression.hpp:565
ConstReference getC1() const
Definition: QuaternionExpression.hpp:550
SelfType ClosureType
Definition: QuaternionExpression.hpp:545
const ValueType Reference
Definition: QuaternionExpression.hpp:543
F::ResultType ValueType
Definition: QuaternionExpression.hpp:541
const ValueType ConstReference
Definition: QuaternionExpression.hpp:542
const SelfType ConstClosureType
Definition: QuaternionExpression.hpp:544
ConstReference getC2() const
Definition: QuaternionExpression.hpp:555
Definition: QuaternionExpression.hpp:256
ConstReference getC4() const
Definition: QuaternionExpression.hpp:290
Scalar1QuaternionBinary1(const Expression1Type &e1, const Expression2Type &e2)
Definition: QuaternionExpression.hpp:272
const ValueType ConstReference
Definition: QuaternionExpression.hpp:267
const ValueType Reference
Definition: QuaternionExpression.hpp:268
ConstReference getC2() const
Definition: QuaternionExpression.hpp:280
ConstReference getC3() const
Definition: QuaternionExpression.hpp:285
const SelfType ConstClosureType
Definition: QuaternionExpression.hpp:269
SelfType ClosureType
Definition: QuaternionExpression.hpp:270
ConstReference getC1() const
Definition: QuaternionExpression.hpp:275
F::ResultType ValueType
Definition: QuaternionExpression.hpp:266
Definition: QuaternionExpression.hpp:310
ConstReference getC3() const
Definition: QuaternionExpression.hpp:339
const ValueType ConstReference
Definition: QuaternionExpression.hpp:321
F::ResultType ValueType
Definition: QuaternionExpression.hpp:320
SelfType ClosureType
Definition: QuaternionExpression.hpp:324
ConstReference getC2() const
Definition: QuaternionExpression.hpp:334
ConstReference getC4() const
Definition: QuaternionExpression.hpp:344
const ValueType Reference
Definition: QuaternionExpression.hpp:322
const SelfType ConstClosureType
Definition: QuaternionExpression.hpp:323
ConstReference getC1() const
Definition: QuaternionExpression.hpp:329
Scalar1QuaternionBinary2(const Expression1Type &e1, const Expression2Type &e2)
Definition: QuaternionExpression.hpp:326
Definition: QuaternionExpression.hpp:364
ConstReference getC4() const
Definition: QuaternionExpression.hpp:398
const ValueType Reference
Definition: QuaternionExpression.hpp:376
F::ResultType ValueType
Definition: QuaternionExpression.hpp:374
ConstReference getC3() const
Definition: QuaternionExpression.hpp:393
const ValueType ConstReference
Definition: QuaternionExpression.hpp:375
Scalar2QuaternionBinary1(const Expression1Type &e1, const Expression2Type &e2)
Definition: QuaternionExpression.hpp:380
SelfType ClosureType
Definition: QuaternionExpression.hpp:378
ConstReference getC2() const
Definition: QuaternionExpression.hpp:388
const SelfType ConstClosureType
Definition: QuaternionExpression.hpp:377
ConstReference getC1() const
Definition: QuaternionExpression.hpp:383
Definition: QuaternionExpression.hpp:418
ConstReference getC2() const
Definition: QuaternionExpression.hpp:442
SelfType ClosureType
Definition: QuaternionExpression.hpp:432
Scalar2QuaternionBinary2(const Expression1Type &e1, const Expression2Type &e2)
Definition: QuaternionExpression.hpp:434
const ValueType Reference
Definition: QuaternionExpression.hpp:430
ConstReference getC3() const
Definition: QuaternionExpression.hpp:447
ConstReference getC4() const
Definition: QuaternionExpression.hpp:452
const ValueType ConstReference
Definition: QuaternionExpression.hpp:429
F::ResultType ValueType
Definition: QuaternionExpression.hpp:428
const SelfType ConstClosureType
Definition: QuaternionExpression.hpp:431
ConstReference getC1() const
Definition: QuaternionExpression.hpp:437
Definition: QuaternionExpression.hpp:472
ConstReference getC4() const
Definition: QuaternionExpression.hpp:508
ConstReference getC1() const
Definition: QuaternionExpression.hpp:493
ConstReference getC3() const
Definition: QuaternionExpression.hpp:503
F::ResultType ValueType
Definition: QuaternionExpression.hpp:484
const SelfType ConstClosureType
Definition: QuaternionExpression.hpp:487
Scalar3QuaternionTernary(const Expression1Type &e1, const Expression2Type &e2, const Expression3Type &e3)
Definition: QuaternionExpression.hpp:490
SelfType ClosureType
Definition: QuaternionExpression.hpp:488
ConstReference getC2() const
Definition: QuaternionExpression.hpp:498
const ValueType ConstReference
Definition: QuaternionExpression.hpp:485
const ValueType Reference
Definition: QuaternionExpression.hpp:486
constexpr unsigned int T
Specifies Hydrogen (Tritium).
Definition: AtomType.hpp:67
constexpr unsigned int F
Specifies Fluorine.
Definition: AtomType.hpp:107
constexpr unsigned int E
Specifies that the stereocenter has E configuration.
Definition: CIPDescriptor.hpp:96
GridBinary1Traits< E1, E2, ScalarMultiplication< typename E1::ValueType, typename E2::ValueType > >::ResultType elemProd(const GridExpression< E1 > &e1, const GridExpression< E2 > &e2)
Definition: GridExpression.hpp:406
GridUnaryTraits< E, ScalarConjugation< typename E::ValueType > >::ResultType conj(const GridExpression< E > &e)
Definition: GridExpression.hpp:360
std::enable_if< std::is_arithmetic< T >::value, typename GridToleranceEquality< E1, E2, T >::ResultType >::type equals(const GridExpression< E1 > &e1, const GridExpression< E2 > &e2, const T &eps)
Definition: GridExpression.hpp:353
QuaternionUnary2Traits< E, QuaternionUnreal< E > >::ResultType unreal(const QuaternionExpression< E > &e)
Definition: QuaternionExpression.hpp:768
std::enable_if< IsScalar< T >::value, typename Scalar2GridBinaryTraits< E, T, ScalarDivision< typename E::ValueType, T > >::ResultType >::type operator/(const GridExpression< E > &e, const T &t)
Definition: GridExpression.hpp:329
GridUnaryTraits< E, ScalarReal< typename E::ValueType > >::ResultType real(const GridExpression< E > &e)
Definition: GridExpression.hpp:378
QuaternionNorm2< E >::ResultType norm2(const QuaternionExpression< E > &e)
Definition: QuaternionExpression.hpp:804
GridEquality< E1, E2 >::ResultType operator!=(const GridExpression< E1 > &e1, const GridExpression< E2 > &e2)
Definition: GridExpression.hpp:346
QuaternionNorm< E >::ResultType norm(const QuaternionExpression< E > &e)
Definition: QuaternionExpression.hpp:797
GridEquality< E1, E2 >::ResultType operator==(const GridExpression< E1 > &e1, const GridExpression< E2 > &e2)
Definition: GridExpression.hpp:339
std::enable_if< IsScalar< T >::value, typename Scalar2GridBinaryTraits< E, T, ScalarMultiplication< typename E::ValueType, T > >::ResultType >::type operator*(const GridExpression< E > &e, const T &t)
Definition: GridExpression.hpp:309
GridBinary1Traits< E1, E2, ScalarDivision< typename E1::ValueType, typename E2::ValueType > >::ResultType elemDiv(const GridExpression< E1 > &e1, const GridExpression< E2 > &e2)
Definition: GridExpression.hpp:396
GridUnaryTraits< E, ScalarNegation< typename E::ValueType > >::ResultType operator-(const GridExpression< E > &e)
Definition: GridExpression.hpp:272
GridElementSum< E >::ResultType sum(const GridExpression< E > &e)
Definition: GridExpression.hpp:416
const E & operator+(const GridExpression< E > &e)
Definition: GridExpression.hpp:282
Scalar2QuaternionBinary2Traits< E, typename QuaternionNorm2< E >::ResultType, QuaternionInverse< E, typename QuaternionNorm2< E >::ResultType > >::ResultType inv(const QuaternionExpression< E > &e)
Definition: QuaternionExpression.hpp:787
The namespace of the Chemical Data Processing Library.
Definition: QuaternionExpression.hpp:194
QuaternionBinary1< E1, E2, F > ExpressionType
Definition: QuaternionExpression.hpp:196
ExpressionType ResultType
Definition: QuaternionExpression.hpp:197
Definition: QuaternionExpression.hpp:248
QuaternionBinary2< E1, E2, F > ExpressionType
Definition: QuaternionExpression.hpp:250
ExpressionType ResultType
Definition: QuaternionExpression.hpp:251
Definition: Functional.hpp:1353
Scalar3QuaternionTernaryFunctor< Q1, Q2, T >::ResultType ResultType
Definition: Functional.hpp:1356
QuaternionScalarUnaryFunctor< Q >::ResultType ResultType
Definition: Functional.hpp:1001
static ResultType apply(const QuaternionExpression< Q > &e)
Definition: Functional.hpp:1003
static ResultType apply(const QuaternionExpression< Q1 > &e1, const QuaternionExpression< Q2 > &e2)
Definition: Functional.hpp:957
QuaternionBooleanBinaryFunctor< Q1, Q2 >::ResultType ResultType
Definition: Functional.hpp:955
Definition: Functional.hpp:1271
Scalar2QuaternionBinaryFunctor< Q, T >::ResultType ResultType
Definition: Functional.hpp:1274
static ResultType apply(const QuaternionExpression< Q > &e)
Definition: Functional.hpp:1045
QuaternionScalarRealUnaryFunctor< Q >::ResultType ResultType
Definition: Functional.hpp:1043
QuaternionScalarRealUnaryFunctor< Q >::ResultType ResultType
Definition: Functional.hpp:1024
static ResultType apply(const QuaternionExpression< Q > &e)
Definition: Functional.hpp:1026
Scalar3QuaternionBooleanTernaryFunctor< Q1, Q2, T >::ResultType ResultType
Definition: Functional.hpp:977
static ResultType apply(const QuaternionExpression< Q1 > &e1, const QuaternionExpression< Q2 > &e2, Argument3Type epsilon)
Definition: Functional.hpp:980
Definition: QuaternionExpression.hpp:89
QuaternionUnary1< E, F > ExpressionType
Definition: QuaternionExpression.hpp:91
ExpressionType ResultType
Definition: QuaternionExpression.hpp:92
Definition: QuaternionExpression.hpp:140
QuaternionUnary2< E, F > ExpressionType
Definition: QuaternionExpression.hpp:142
ExpressionType ResultType
Definition: QuaternionExpression.hpp:143
Definition: QuaternionExpression.hpp:578
ExpressionType ResultType
Definition: QuaternionExpression.hpp:581
Scalar13QuaternionTernary< E1, E2, E3, F > ExpressionType
Definition: QuaternionExpression.hpp:580
Definition: QuaternionExpression.hpp:302
Scalar1QuaternionBinary1< E1, E2, F > ExpressionType
Definition: QuaternionExpression.hpp:304
ExpressionType ResultType
Definition: QuaternionExpression.hpp:305
Definition: QuaternionExpression.hpp:356
Scalar1QuaternionBinary2< E1, E2, F > ExpressionType
Definition: QuaternionExpression.hpp:358
ExpressionType ResultType
Definition: QuaternionExpression.hpp:359
Definition: QuaternionExpression.hpp:410
Scalar2QuaternionBinary1< E1, E2, F > ExpressionType
Definition: QuaternionExpression.hpp:412
ExpressionType ResultType
Definition: QuaternionExpression.hpp:413
Definition: QuaternionExpression.hpp:464
Scalar2QuaternionBinary2< E1, E2, F > ExpressionType
Definition: QuaternionExpression.hpp:466
ExpressionType ResultType
Definition: QuaternionExpression.hpp:467
Definition: QuaternionExpression.hpp:521
Scalar3QuaternionTernary< E1, E2, E3, F > ExpressionType
Definition: QuaternionExpression.hpp:523
ExpressionType ResultType
Definition: QuaternionExpression.hpp:524
Definition: Functional.hpp:211
Definition: Functional.hpp:253
Definition: Functional.hpp:239
Definition: Functional.hpp:1398
Scalar13QuaternionTernaryFunctor< T1, Q, T2 >::ResultType ResultType
Definition: Functional.hpp:1402
Definition: Functional.hpp:225