constants.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 template<typename eT>
00024 class Math
00025 {
00026 public:
00027
00028
00029 static const eT pi() { return eT(3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679); }
00030
00031
00032 static const eT e() { return eT(2.7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274); }
00033
00034
00035 static const eT euler() { return eT(0.5772156649015328606065120900824024310421593359399235988057672348848677267776646709369470632917467495); }
00036
00037
00038 static const eT gratio() { return eT(1.6180339887498948482045868343656381177203091798057628621354486227052604628189024497072072041893911374); }
00039
00040
00041 static const eT sqrt2() { return eT(1.4142135623730950488016887242096980785696718753769480731766797379907324784621070388503875343276415727); }
00042
00043
00044 static const eT eps() { return std::numeric_limits<eT>::epsilon(); }
00045
00046
00047 static const eT log_min() { static const eT out = std::log(std::numeric_limits<eT>::min()); return out; }
00048
00049
00050 static const eT log_max() { static const eT out = std::log(std::numeric_limits<eT>::max()); return out; }
00051 };
00052
00053
00054
00055 typedef Math<float> fmath;
00056 typedef Math<double> math;
00057
00058
00059
00060 struct arma_version
00061 {
00062 static const unsigned int major = 0;
00063 static const unsigned int minor = 6;
00064 static const unsigned int patch = 10;
00065 };
00066
00067
00068
00069 struct arma_config
00070 {
00071 #if defined(ARMA_USE_ATLAS)
00072 static const bool atlas = true;
00073 #else
00074 static const bool atlas = false;
00075 #endif
00076
00077
00078 #if defined(ARMA_USE_LAPACK)
00079 static const bool lapack = true;
00080 #else
00081 static const bool lapack = false;
00082 #endif
00083
00084
00085 #if defined(ARMA_USE_BLAS)
00086 static const bool blas = true;
00087 #else
00088 static const bool blas = false;
00089 #endif
00090
00091
00092 #if defined(ARMA_USE_BOOST)
00093 static const bool boost = true;
00094 #else
00095 static const bool boost = false;
00096 #endif
00097
00098
00099 #if !defined(ARMA_NO_DEBUG) && !defined(NDEBUG)
00100 static const bool debug = true;
00101 #else
00102 static const bool debug = false;
00103 #endif
00104
00105
00106 #if defined(ARMA_EXTRA_DEBUG)
00107 static const bool extra_debug = true;
00108 #else
00109 static const bool extra_debug = false;
00110 #endif
00111 };
00112
00113
00114
00115