MathFunctions.h
Go to the documentation of this file.
00001 // This file is part of Eigen, a lightweight C++ template library
00002 // for linear algebra.
00003 //
00004 // Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>
00005 //
00006 // This Source Code Form is subject to the terms of the Mozilla
00007 // Public License v. 2.0. If a copy of the MPL was not distributed
00008 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
00009 
00010 #ifndef EIGEN2_MATH_FUNCTIONS_H
00011 #define EIGEN2_MATH_FUNCTIONS_H
00012 
00013 namespace Eigen { 
00014 
00015 template<typename T> inline typename NumTraits<T>::Real ei_real(const T& x) { return numext::real(x); }
00016 template<typename T> inline typename NumTraits<T>::Real ei_imag(const T& x) { return numext::imag(x); }
00017 template<typename T> inline T ei_conj(const T& x) { return numext::conj(x); }
00018 template<typename T> inline typename NumTraits<T>::Real ei_abs (const T& x) { using std::abs; return abs(x); }
00019 template<typename T> inline typename NumTraits<T>::Real ei_abs2(const T& x) { return numext::abs2(x); }
00020 template<typename T> inline T ei_sqrt(const T& x) { using std::sqrt; return sqrt(x); }
00021 template<typename T> inline T ei_exp (const T& x) { using std::exp;  return exp(x); }
00022 template<typename T> inline T ei_log (const T& x) { using std::log;  return log(x); }
00023 template<typename T> inline T ei_sin (const T& x) { using std::sin;  return sin(x); }
00024 template<typename T> inline T ei_cos (const T& x) { using std::cos;  return cos(x); }
00025 template<typename T> inline T ei_atan2(const T& x,const T& y) { using std::atan2; return atan2(x,y); }
00026 template<typename T> inline T ei_pow (const T& x,const T& y) { return numext::pow(x,y); }
00027 template<typename T> inline T ei_random () { return internal::random<T>(); }
00028 template<typename T> inline T ei_random (const T& x, const T& y) { return internal::random(x, y); }
00029 
00030 template<typename T> inline T precision () { return NumTraits<T>::dummy_precision(); }
00031 template<typename T> inline T machine_epsilon () { return NumTraits<T>::epsilon(); }
00032 
00033 
00034 template<typename Scalar, typename OtherScalar>
00035 inline bool ei_isMuchSmallerThan(const Scalar& x, const OtherScalar& y,
00036                                    typename NumTraits<Scalar>::Real precision = NumTraits<Scalar>::dummy_precision())
00037 {
00038   return internal::isMuchSmallerThan(x, y, precision);
00039 }
00040 
00041 template<typename Scalar>
00042 inline bool ei_isApprox(const Scalar& x, const Scalar& y,
00043                           typename NumTraits<Scalar>::Real precision = NumTraits<Scalar>::dummy_precision())
00044 {
00045   return internal::isApprox(x, y, precision);
00046 }
00047 
00048 template<typename Scalar>
00049 inline bool ei_isApproxOrLessThan(const Scalar& x, const Scalar& y,
00050                                     typename NumTraits<Scalar>::Real precision = NumTraits<Scalar>::dummy_precision())
00051 {
00052   return internal::isApproxOrLessThan(x, y, precision);
00053 }
00054 
00055 } // end namespace Eigen
00056 
00057 #endif // EIGEN2_MATH_FUNCTIONS_H


turtlebot_exploration_3d
Author(s): Bona , Shawn
autogenerated on Thu Jun 6 2019 20:59:04