iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MathUtils.H File Reference
#include <cmath>
#include <nrt/Core/Util/details/MathUtilsImpl.H>

Author
Randolph Voorhies voorh.nosp@m.ies@.nosp@m.usc.e.nosp@m.du

License

// ////////////////////////////////////////////////////////////////////////
//              The iLab Neuromorphic Robotics Toolkit (NRT)             //
// Copyright 2010-2012 by the University of Southern California (USC)    //
//                          and the iLab at USC.                         //
//                                                                       //
//                iLab - University of Southern California               //
//                Hedco Neurociences Building, Room HNB-10               //
//                    Los Angeles, Ca 90089-2520 - USA                   //
//                                                                       //
//      See http://ilab.usc.edu for information about this project.      //
// ////////////////////////////////////////////////////////////////////////
// This file is part of The iLab Neuromorphic Robotics Toolkit.          //
//                                                                       //
// The iLab Neuromorphic Robotics Toolkit is free software: 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 3 of the License, or (at your option) any later version.      //
//                                                                       //
// The iLab Neuromorphic Robotics Toolkit is distributed in the hope     //
// that it will be useful, but WITHOUT ANY WARRANTY; without even the    //
// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR       //
// PURPOSE.  See the GNU General Public License for more details.        //
//                                                                       //
// You should have received a copy of the GNU General Public License     //
// along with The iLab Neuromorphic Robotics Toolkit.  If not, see       //
// <http://www.gnu.org/licenses/>.                                       //
// ////////////////////////////////////////////////////////////////////////

Definition in file MathUtils.H.

Go to the source code of this file.

Namespaces

 nrt
 Reserved namespace for NRT core classes and functions.
 

Macros

#define NRT_D_PI   3.1415926535897932384626433832795029
 Pi.
 
#define NRT_D_E   2.7182818284590452353602874713526625
 e
 
#define NRT_D_LOG_SQRT_2_PI   0.9189385332046727417803297364056176
 Log Root of 2 Pi.
 
#define NRT_D_SQRT_2_PI   2.5066282746310002416123552393401041
 Root of 2*Pi.
 
#define NRT_D_SQRT_PI   1.7724538509055160272981674833411451
 Root of Pi.
 
#define NRT_D_SQRT_2   1.4142135623730950488016887242096981
 Root of 2 DEFINED in cmath as M_SQRT2, but is not 128 bit.
 
#define NRT_D_LOG_2_PI   1.8378770664093454835606594728112353
 Natural Log of 2*Pi.
 
#define NRT_D_LOG_PI   1.1447298858494001741434273513530587
 Natural Log of Pi.
 
#define NRT_D_LOG_2   0.6931471805599453094172321214581766
 Natural Log of 2 DEFINED in cmath as M_LN2, but is not 128 bit.
 
#define NRT_D_LOG_SQRT_2   0.3465735902799726547086160607290883
 Natural Log of sqrt of 2.
 
#define NRT_D_2_PI   6.2831853071795862319959269370883703
 2*Pi
 
#define NRT_D_EULER_GAMMA   0.5772156649015328606065120900824024
 The Euler-Mascheroni Constant (Not the same as e)
 
#define NRT_D_DEGREE   0.0174532925199432957692369076848861
 Number of radians in one degree.
 
#define NRT_D_GOLDEN_RATIO   1.6180339887498948482045868343656381
 The golden ratio.
 
#define NRT_D_CATALAN   0.9159655941772190150546035149323841
 Catalan's Constant.
 
#define NRT_D_GLAISHER   1.2824271291006226368753425688697917
 Glaisher-Kinkelin Constant.
 
#define NRT_D_KHINCHIN   2.6854520010653064453097148354817956
 Khinchin's Constant.
 
#define NRT_D_SOLDNER   1.4513692348833810502839684858920274
 Ramanujan-Soldner's Constant.
 
#define NRT_D_APERY   1.2020569031595942853997381615114499
 Apery's Constant.
 
#define NRT_D_GAUSS_KUZMAN   0.3036630028987326585974481219015562
 Gauss-Kuzmin-Wirsing constant.
 
#define NRT_D_FRANSEN   2.8077702420285193652215011865577729
 Fransén-Robinson constant.
 
#define NRT_D_SERPINSKY   2.5849817595792532170658935873831711
 Sierpin'ski's constant.
 
#define NRT_D_MILL   1.3063778838630806904686144926026057
 Mills' constant.
 
#define NRT_D_OMEGA   0.5671432904097838729999686622103555
 Omega constant.
 
#define NRT_D_GOLOMB_DICKMAN   0.6243299885435508709929363831008372
 Golomb-Dickman constant.
 
#define NRT_L_PI   3.14159265358979323846264338327950288419716939937510582097494459230781L
 Pi.
 
#define NRT_L_E   2.71828182845904523536028747135266249775724709369995957496696762772407L
 e
 
#define NRT_L_LOG_SQRT_2_PI   0.91893853320467274178032973640561763986139747363778341281715154048276L
 Log Root of 2 Pi.
 
#define NRT_L_SQRT_2_PI   2.50662827463100050241576528481104525300698674060993831662992357634229L
 Root of 2*Pi.
 
#define NRT_L_SQRT_PI   1.77245385090551602729816748334114518279754945612238712821380778985291L
 Root of Pi.
 
#define NRT_L_SQRT_2   1.41421356237309514547462185873882845044136047363281250000000000000000L
 Root of 2 DEFINED in cmath as M_SQRT2, but is not > 128 bit.
 
#define NRT_L_LOG_2_PI   1.83787706640934548356065947281123527972279494727556682563430308096553L
 Natural Log of 2*Pi.
 
#define NRT_L_LOG_PI   1.14472988584940017414342735135305871164729481291531157151362307147214L
 Natural Log of Pi.
 
#define NRT_L_LOG_2   0.69314718055994528622676398299518041312694549560546875000000000000000L
 Natural Log of 2 DEFINED in cmath as M_LN2, but is not > 128 bit.
 
#define NRT_L_2_PI   6.28318530717958647692528676655900576839433879875021164194988918461560L
 2*Pi
 
#define NRT_L_DEGREE   0.01745329251994329576923690768488612713442871888541725456097191440171L
 Number of radians in one degree.
 
#define NRT_L_EULER_GAMMA   0.57721566490153286060651209008240243104215933593992359880576723488486L
 The Euler-Mascheroni Constant (Not the same as e)
 
#define NRT_L_GOLDEN_RATIO   1.61803398874989484820458683436563811772030917980576286213544862270526L
 The golden ratio.
 
#define NRT_L_CATALAN   0.91596559417721901505460351493238411077414937428167213426649811962176L
 Catalan's Constant.
 
#define NRT_L_GLAISHER   1.28242712910062263687534256886979172776768892732500119206374002174040L
 Glaisher-Kinkelin Constant.
 
#define NRT_L_KHINCHIN   2.68545200106530644530971483548179569382038229399446295305115234555721L
 Khinchin's Constant.
 

Functions

double nrt::lngamma (double x)
 Compute log of Gamma. More...
 
double nrt::normalPDF (double x, double mu, double var)
 Find the value of a normal PDF at x. More...
 
double nrt::normalCDF (double x, double mu, double var)
 Find the value of a normal CDF at x. More...
 
double nrt::vonMisesPDF (double x, double mu, double k)
 Find the value of a von Mises distribution at x. More...
 
template<class T >
nrt::clamped (T const &val, T const &min, T const &max)
 Clamp a value to within a min-max range. More...