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
00056
00057
00058
00059 template<typename eT>
00060 class Phy
00061 {
00062 public:
00063
00064
00065 static const eT m_u() { return eT(1.660538782e-27); }
00066
00067
00068 static const eT N_A() { return eT(6.02214179e23); }
00069
00070
00071 static const eT k() { return eT(1.3806504e-23); }
00072
00073
00074 static const eT k_evk() { return eT(8.617343e-5); }
00075
00076
00077 static const eT a_0() { return eT(0.52917720859e-10); }
00078
00079
00080 static const eT mu_B() { return(927.400915e-26); }
00081
00082
00083 static const eT Z_0() { return eT(3.76730313461771e-2); }
00084
00085
00086 static const eT G_0() { return eT(7.7480917004e-5); }
00087
00088
00089 static const eT k_e() { return eT(8.9875517873681764e9); }
00090
00091
00092 static const eT eps_0() { return eT(8.85418781762039e-12); }
00093
00094
00095 static const eT m_e() { return eT(9.10938215e-31); }
00096
00097
00098 static const eT eV() { return eT(1.602176487e-19); }
00099
00100
00101 static const eT e() { return eT(1.602176487e-19); }
00102
00103
00104 static const eT F() { return eT(96485.3399); }
00105
00106
00107 static const eT alpha() { return eT(7.2973525376e-3); }
00108
00109
00110 static const eT alpha_inv() { return eT(137.035999679); }
00111
00112
00113 static const eT K_J() { return eT(483597.891e9); }
00114
00115
00116 static const eT mu_0() { return eT(1.25663706143592e-06); }
00117
00118
00119 static const eT phi_0() { return eT(2.067833667e-15); }
00120
00121
00122 static const eT R() { return eT(8.314472); }
00123
00124
00125 static const eT G() { return eT(6.67428e-11); }
00126
00127
00128 static const eT h() { return eT(6.62606896e-34); }
00129
00130
00131 static const eT h_bar() { return eT(1.054571628e-34); }
00132
00133
00134 static const eT m_p() { return eT(1.672621637e-27); }
00135
00136
00137 static const eT R_inf() { return eT(10973731.568527); }
00138
00139
00140 static const eT c_0() { return eT(299792458.0); }
00141
00142
00143 static const eT sigma() { return eT(5.670400e-8); }
00144
00145
00146 static const eT R_k() { return eT(25812.807557); }
00147
00148
00149 static const eT b() { return eT(2.8977685e-3); }
00150 };
00151
00152
00153
00154 typedef Math<float> fmath;
00155 typedef Math<double> math;
00156
00157 typedef Phy<float> fphy;
00158 typedef Phy<double> phy;
00159
00160
00161
00162 struct arma_version
00163 {
00164 static const unsigned int major = 0;
00165 static const unsigned int minor = 6;
00166 static const unsigned int patch = 12;
00167 };
00168
00169
00170
00171 struct arma_config
00172 {
00173 #if defined(ARMA_USE_ATLAS)
00174 static const bool atlas = true;
00175 #else
00176 static const bool atlas = false;
00177 #endif
00178
00179
00180 #if defined(ARMA_USE_LAPACK)
00181 static const bool lapack = true;
00182 #else
00183 static const bool lapack = false;
00184 #endif
00185
00186
00187 #if defined(ARMA_USE_BLAS)
00188 static const bool blas = true;
00189 #else
00190 static const bool blas = false;
00191 #endif
00192
00193
00194 #if defined(ARMA_USE_BOOST)
00195 static const bool boost = true;
00196 #else
00197 static const bool boost = false;
00198 #endif
00199
00200
00201 #if defined(ARMA_USE_BOOST_DATE)
00202 static const bool boost_date = true;
00203 #else
00204 static const bool boost_date = false;
00205 #endif
00206
00207
00208 #if !defined(ARMA_NO_DEBUG) && !defined(NDEBUG)
00209 static const bool debug = true;
00210 #else
00211 static const bool debug = false;
00212 #endif
00213
00214
00215 #if defined(ARMA_EXTRA_DEBUG)
00216 static const bool extra_debug = true;
00217 #else
00218 static const bool extra_debug = false;
00219 #endif
00220 };
00221
00222
00223
00224