aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/NumTraits.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2008-04-03 18:13:27 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2008-04-03 18:13:27 +0000
commit048910caae33dbf6b2359d5264a8be828084906a (patch)
treea8be2002d33117f958b88d060376196f4a83c296 /Eigen/src/Core/NumTraits.h
parent249dc4f482f0427af3cb1e53b7a2ff4bbe6b54cf (diff)
* added cwise comparisons
* added "all" and "any" special redux operators * added support bool matrices * added support for cost model of STL functors via ei_functor_traits (By default ei_functor_traits query the functor member Cost)
Diffstat (limited to 'Eigen/src/Core/NumTraits.h')
-rw-r--r--Eigen/src/Core/NumTraits.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/Eigen/src/Core/NumTraits.h b/Eigen/src/Core/NumTraits.h
index cb601b160..5ce7e0fca 100644
--- a/Eigen/src/Core/NumTraits.h
+++ b/Eigen/src/Core/NumTraits.h
@@ -5,12 +5,12 @@
//
// Eigen is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
+// License as published by the Free Software Foundation; either
// version 3 of the License, or (at your option) any later version.
//
// Alternatively, you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
-// published by the Free Software Foundation; either version 2 of
+// published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
@@ -18,7 +18,7 @@
// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Public
+// You should have received a copy of the GNU Lesser General Public
// License and a copy of the GNU General Public License along with
// Eigen. If not, see <http://www.gnu.org/licenses/>.
@@ -125,4 +125,17 @@ template<> struct NumTraits<long double>
};
};
+template<> struct NumTraits<bool>
+{
+ typedef bool Real;
+ typedef float FloatingPoint;
+ enum {
+ IsComplex = 0,
+ HasFloatingPoint = 0,
+ ReadCost = 1,
+ AddCost = 1,
+ MulCost = 1
+ };
+};
+
#endif // EIGEN_NUMTRAITS_H