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 // Eigen is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 3 of the License, or (at your option) any later version.
00010 //
00011 // Alternatively, you can redistribute it and/or
00012 // modify it under the terms of the GNU General Public License as
00013 // published by the Free Software Foundation; either version 2 of
00014 // the License, or (at your option) any later version.
00015 //
00016 // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
00017 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00018 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
00019 // GNU General Public License for more details.
00020 //
00021 // You should have received a copy of the GNU Lesser General Public
00022 // License and a copy of the GNU General Public License along with
00023 // Eigen. If not, see <http://www.gnu.org/licenses/>.
00024 
00025 #ifndef EIGEN2_MATH_FUNCTIONS_H
00026 #define EIGEN2_MATH_FUNCTIONS_H
00027 
00028 template<typename T> inline typename NumTraits<T>::Real ei_real(const T& x) { return internal::real(x); }
00029 template<typename T> inline typename NumTraits<T>::Real ei_imag(const T& x) { return internal::imag(x); }
00030 template<typename T> inline T ei_conj(const T& x) { return internal::conj(x); }
00031 template<typename T> inline typename NumTraits<T>::Real ei_abs (const T& x) { return internal::abs(x); }
00032 template<typename T> inline typename NumTraits<T>::Real ei_abs2(const T& x) { return internal::abs2(x); }
00033 template<typename T> inline T ei_sqrt(const T& x) { return internal::sqrt(x); }
00034 template<typename T> inline T ei_exp (const T& x) { return internal::exp(x); }
00035 template<typename T> inline T ei_log (const T& x) { return internal::log(x); }
00036 template<typename T> inline T ei_sin (const T& x) { return internal::sin(x); }
00037 template<typename T> inline T ei_cos (const T& x) { return internal::cos(x); }
00038 template<typename T> inline T ei_atan2(const T& x,const T& y) { return internal::atan2(x,y); }
00039 template<typename T> inline T ei_pow (const T& x,const T& y) { return internal::pow(x,y); }
00040 template<typename T> inline T ei_random () { return internal::random<T>(); }
00041 template<typename T> inline T ei_random (const T& x, const T& y) { return internal::random(x, y); }
00042 
00043 template<typename T> inline T precision () { return NumTraits<T>::dummy_precision(); }
00044 template<typename T> inline T machine_epsilon () { return NumTraits<T>::epsilon(); }
00045 
00046 
00047 template<typename Scalar, typename OtherScalar>
00048 inline bool ei_isMuchSmallerThan(const Scalar& x, const OtherScalar& y,
00049                                    typename NumTraits<Scalar>::Real precision = NumTraits<Scalar>::dummy_precision())
00050 {
00051   return internal::isMuchSmallerThan(x, y, precision);
00052 }
00053 
00054 template<typename Scalar>
00055 inline bool ei_isApprox(const Scalar& x, const Scalar& y,
00056                           typename NumTraits<Scalar>::Real precision = NumTraits<Scalar>::dummy_precision())
00057 {
00058   return internal::isApprox(x, y, precision);
00059 }
00060 
00061 template<typename Scalar>
00062 inline bool ei_isApproxOrLessThan(const Scalar& x, const Scalar& y,
00063                                     typename NumTraits<Scalar>::Real precision = NumTraits<Scalar>::dummy_precision())
00064 {
00065   return internal::isApproxOrLessThan(x, y, precision);
00066 }
00067 
00068 #endif // EIGEN2_MATH_FUNCTIONS_H


libicr
Author(s): Robert Krug
autogenerated on Mon Jan 6 2014 11:33:03