scalar-name.hpp
Go to the documentation of this file.
1 /*
2 * Copyright 2020 INRIA
3 */
4 
5 #ifndef __eigenpy_utils_scalar_name_hpp__
6 #define __eigenpy_utils_scalar_name_hpp__
7 
8 #include <string>
9 #include <complex>
10 
11 namespace eigenpy
12 {
13  template<typename Scalar>
14  struct scalar_name
15  {
16  static std::string shortname();
17  };
18 
19  template<>
20  struct scalar_name<float>
21  {
22  static std::string shortname() { return "f"; };
23  };
24 
25  template<>
26  struct scalar_name<double>
27  {
28  static std::string shortname() { return "d"; };
29  };
30 
31  template<>
32  struct scalar_name<long double>
33  {
34  static std::string shortname() { return "ld"; };
35  };
36 
37  template<typename Scalar>
38  struct scalar_name< std::complex<Scalar> >
39  {
40  static std::string shortname() { return "c" + scalar_name<Scalar>(); };
41  };
42 }
43 
44 #endif // ifndef __eigenpy_utils_scalar_name_hpp__
static std::string shortname()
static std::string shortname()
Definition: scalar-name.hpp:22
static std::string shortname()
Definition: scalar-name.hpp:28


eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Sat Apr 17 2021 02:37:59