| 1 |
// Emacs will be in -*- Mode: c++ -*- |
| 2 |
// @HEADER |
| 3 |
// ***************************************************************************** |
| 4 |
// Sacado Package |
| 5 |
// |
| 6 |
// Copyright 2006 NTESS and the Sacado contributors. |
| 7 |
// SPDX-License-Identifier: LGPL-2.1-or-later |
| 8 |
// ***************************************************************************** |
| 9 |
// @HEADER |
| 10 |
|
| 11 |
// ********** DO NOT REMOVE THIS BANNER ********** |
| 12 |
// |
| 13 |
// SUMMARY: Tools for Automatic Differentiaton (order 1) |
| 14 |
// RELEASE: 0.1 |
| 15 |
// USAGE : You may copy freely these files and use it for |
| 16 |
// teaching or research. These or part of these may |
| 17 |
// not be sold or used for a commercial purpose with- |
| 18 |
// out our consent : fax (33)1 44 27 72 00 |
| 19 |
// |
| 20 |
// AUTHOR : Nicolas Di cesare |
| 21 |
// ORG : |
| 22 |
// E-MAIL : [email protected] |
| 23 |
// |
| 24 |
// ORIG-DATE: September 97 |
| 25 |
// LAST-MOD : 28/07/98 |
| 26 |
// ******************************************************** |
| 27 |
// FILE : tinyfadlog.h |
| 28 |
// ******************************************************** |
| 29 |
#ifndef _tinyfadlog_h_ |
| 30 |
#define _tinyfadlog_h_ |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
template <int Num, class T> inline |
| 35 |
bool operator != (const TinyFad<Num,T>& x, const TinyFad<Num,T>& y) { |
| 36 |
return x.val() != y.val(); |
| 37 |
} |
| 38 |
|
| 39 |
template <int Num, class T> inline |
| 40 |
bool operator != (const T& x, const TinyFad<Num,T>& y) { |
| 41 |
return x != y.val(); |
| 42 |
} |
| 43 |
|
| 44 |
template <int Num, class T> inline |
| 45 |
bool operator != (const TinyFad<Num,T>& x, const T& y) { |
| 46 |
return x.val() != y; |
| 47 |
} |
| 48 |
|
| 49 |
|
| 50 |
template <int Num, class T> inline |
| 51 |
bool operator == (const TinyFad<Num,T>& x, const TinyFad<Num,T>& y) { |
| 52 |
return x.val() == y.val(); |
| 53 |
} |
| 54 |
|
| 55 |
template <int Num, class T> inline |
| 56 |
bool operator == (const T& x, const TinyFad<Num,T>& y) { |
| 57 |
return x == y.val(); |
| 58 |
} |
| 59 |
|
| 60 |
template <int Num, class T> inline |
| 61 |
bool operator == (const TinyFad<Num,T>& x, const T& y) { |
| 62 |
return x.val() == y; |
| 63 |
} |
| 64 |
|
| 65 |
template <int Num, class T> inline |
| 66 |
bool operator > (const TinyFad<Num,T>& x, const TinyFad<Num,T>& y) { |
| 67 |
return x.val() > y.val(); |
| 68 |
} |
| 69 |
|
| 70 |
template <int Num, class T> inline |
| 71 |
bool operator > (const T& x, const TinyFad<Num,T>& y) { |
| 72 |
return x > y.val(); |
| 73 |
} |
| 74 |
|
| 75 |
template <int Num, class T> inline |
| 76 |
bool operator > (const TinyFad<Num,T>& x, const T& y) { |
| 77 |
return x.val() > y; |
| 78 |
} |
| 79 |
|
| 80 |
|
| 81 |
template <int Num, class T> inline |
| 82 |
bool operator < (const TinyFad<Num,T>& x, const TinyFad<Num,T>& y) { |
| 83 |
return x.val() < y.val(); |
| 84 |
} |
| 85 |
|
| 86 |
template <int Num, class T> inline |
| 87 |
bool operator < (const T& x, const TinyFad<Num,T>& y) { |
| 88 |
return x < y.val(); |
| 89 |
} |
| 90 |
|
| 91 |
template <int Num, class T> inline |
| 92 |
bool operator < (const TinyFad<Num,T>& x, const T& y) { |
| 93 |
return x.val() < y; |
| 94 |
} |
| 95 |
|
| 96 |
template <int Num, class T> inline |
| 97 |
bool operator >= (const TinyFad<Num,T>& x, const TinyFad<Num,T>& y) { |
| 98 |
return x.val() >= y.val(); |
| 99 |
} |
| 100 |
|
| 101 |
template <int Num, class T> inline |
| 102 |
bool operator >= (const T& x, const TinyFad<Num,T>& y) { |
| 103 |
return x >= y.val(); |
| 104 |
} |
| 105 |
|
| 106 |
template <int Num, class T> inline |
| 107 |
bool operator >= (const TinyFad<Num,T>& x, const T& y) { |
| 108 |
return x.val() >= y; |
| 109 |
} |
| 110 |
|
| 111 |
|
| 112 |
template <int Num, class T> inline |
| 113 |
bool operator <= (const TinyFad<Num,T>& x, const TinyFad<Num,T>& y) { |
| 114 |
return x.val() <= y.val(); |
| 115 |
} |
| 116 |
|
| 117 |
template <int Num, class T> inline |
| 118 |
bool operator <= (const T& x, const TinyFad<Num,T>& y) { |
| 119 |
return x <= y.val(); |
| 120 |
} |
| 121 |
|
| 122 |
template <int Num, class T> inline |
| 123 |
bool operator <= (const TinyFad<Num,T>& x, const T& y) { |
| 124 |
return x.val() <= y; |
| 125 |
} |
| 126 |
|
| 127 |
|
| 128 |
#endif |