LOOS  v2.3.2
AtomicNumberDeducer.hpp
1 #if !defined(LOOS_ATOMIC_NUMBER_DEDUCER_HPP)
2 #define LOOS_ATOMIC_NUMBER_DEDUCER_HPP
3 
4 #include <vector>
5 
6 
7 namespace loos {
8 
9  namespace internal {
10 
12  typedef std::pair<double, unsigned int> MassNumber;
13  public:
15  initialize();
16  }
17 
18  unsigned int deduceFromMass(const double mass, const double tolerance);
19 
20 
21  private:
22  void initialize();
23  std::vector<MassNumber> element_table;
24  };
25 
26  };
27 
29 
33  unsigned int deduceAtomicNumberFromMass(const double mass, const double tolerance = 0.1);
34 
35 };
36 
37 
38 
39 
40 #endif
unsigned int deduceAtomicNumberFromMass(const double mass, const double tolerance)
Deduce an atomic number from the mass.
Namespace for most things not already encapsulated within a class.