antioch-0.4.0
List of all members | Public Member Functions | Private Attributes
Antioch::UnitBaseConstant::SIPrefixeStore< T > Class Template Reference

Prefixes, SI micro is mu. More...

#include <unit_store.h>

Public Member Functions

 ~SIPrefixeStore ()
 
 SIPrefixeStore ()
 
int stored_index (const std::string &symb) const
 
const SIPrefixes< T > stored (const int &ipre) const
 
int n_known_prefixes () const
 

Private Attributes

std::map< std::string, int > map_store
 
std::vector< SIPrefixes< T > > store
 
unsigned int _n_prefixes
 

Detailed Description

template<typename T = double>
class Antioch::UnitBaseConstant::SIPrefixeStore< T >

Prefixes, SI micro is mu.

Definition at line 202 of file unit_store.h.

Constructor & Destructor Documentation

template<typename T = double>
Antioch::UnitBaseConstant::SIPrefixeStore< T >::~SIPrefixeStore ( )
inline

Definition at line 204 of file unit_store.h.

204 {}
template<typename T = double>
Antioch::UnitBaseConstant::SIPrefixeStore< T >::SIPrefixeStore ( )
inline

Definition at line 205 of file unit_store.h.

References Antioch::UnitBaseConstant::SIPrefixeStore< T >::_n_prefixes, std::int, Antioch::UnitBaseConstant::SIPrefixeStore< T >::map_store, and Antioch::UnitBaseConstant::SIPrefixeStore< T >::store.

205  {
206  store.push_back(SIPrefixes<T>("y", "yocto",1e-24L));
207  store.push_back(SIPrefixes<T>("z", "zepto",1e-21L));
208  store.push_back(SIPrefixes<T>("a", "atto", 1e-18L));
209  store.push_back(SIPrefixes<T>("f", "femto",1e-15L));
210  store.push_back(SIPrefixes<T>("p", "pico", 1e-12L));
211  store.push_back(SIPrefixes<T>("n", "nano", 1e-9L));
212  store.push_back(SIPrefixes<T>("mu","micro",1e-6L));
213  store.push_back(SIPrefixes<T>("m", "milli",1e-3L));
214  store.push_back(SIPrefixes<T>("c", "centi",1e-2L));
215  store.push_back(SIPrefixes<T>("d", "deci", 1e-1L));
216  store.push_back(SIPrefixes<T>("da","deca", 1e1L));
217  store.push_back(SIPrefixes<T>("h", "hecto",1e2L));
218  store.push_back(SIPrefixes<T>("k", "kilo", 1e3L));
219  store.push_back(SIPrefixes<T>("M", "mega", 1e6L));
220  store.push_back(SIPrefixes<T>("G", "giga", 1e9L));
221  store.push_back(SIPrefixes<T>("T", "tera", 1e12L));
222  store.push_back(SIPrefixes<T>("P", "peta", 1e15L));
223  store.push_back(SIPrefixes<T>("E", "exa", 1e18L));
224  store.push_back(SIPrefixes<T>("Z", "zetta",1e21L));
225  store.push_back(SIPrefixes<T>("Y", "yotta",1e24L));
226 
227  _n_prefixes = store.size();
228 
229  for(int i = 0; i < (int)store.size(); i++)
230  {
231  map_store[store[i].symbol()] = i;
232  }
233  }
std::vector< SIPrefixes< T > > store
Definition: unit_store.h:252
a int
Definition: eigen_utils.h:67
std::map< std::string, int > map_store
Definition: unit_store.h:251

Member Function Documentation

template<typename T = double>
int Antioch::UnitBaseConstant::SIPrefixeStore< T >::n_known_prefixes ( ) const
inline

Definition at line 245 of file unit_store.h.

References Antioch::UnitBaseConstant::SIPrefixeStore< T >::_n_prefixes.

246  {
247  return _n_prefixes;
248  }
template<typename T = double>
const SIPrefixes<T> Antioch::UnitBaseConstant::SIPrefixeStore< T >::stored ( const int &  ipre) const
inline

Definition at line 240 of file unit_store.h.

References Antioch::UnitBaseConstant::SIPrefixeStore< T >::store.

241  {
242  return store[ipre];
243  }
std::vector< SIPrefixes< T > > store
Definition: unit_store.h:252
template<typename T = double>
int Antioch::UnitBaseConstant::SIPrefixeStore< T >::stored_index ( const std::string &  symb) const
inline

Definition at line 235 of file unit_store.h.

References Antioch::UnitBaseConstant::SIPrefixeStore< T >::map_store.

236  {
237  return (map_store.count(symb))?map_store.at(symb):-1;
238  }
std::map< std::string, int > map_store
Definition: unit_store.h:251

Member Data Documentation

template<typename T = double>
unsigned int Antioch::UnitBaseConstant::SIPrefixeStore< T >::_n_prefixes
private
template<typename T = double>
std::map<std::string, int> Antioch::UnitBaseConstant::SIPrefixeStore< T >::map_store
private
template<typename T = double>
std::vector<SIPrefixes<T> > Antioch::UnitBaseConstant::SIPrefixeStore< T >::store
private

The documentation for this class was generated from the following file:

Generated on Thu Jul 7 2016 11:09:50 for antioch-0.4.0 by  doxygen 1.8.8