eigenpy
3.12.0
Bindings between Numpy and Eigen using Boost.Python
Loading...
Searching...
No Matches
scalar-name.hpp
1
/*
2
* Copyright 2020 INRIA
3
*/
4
5
#ifndef __eigenpy_utils_scalar_name_hpp__
6
#define __eigenpy_utils_scalar_name_hpp__
7
8
#include <complex>
9
#include <string>
10
11
namespace
eigenpy
{
12
template
<
typename
Scalar>
13
struct
scalar_name
{
14
static
std::string shortname();
15
};
16
17
template
<>
18
struct
scalar_name
<float> {
19
static
std::string shortname() {
return
"f"
; };
20
};
21
22
template
<>
23
struct
scalar_name
<double> {
24
static
std::string shortname() {
return
"d"
; };
25
};
26
27
template
<>
28
struct
scalar_name
<long double> {
29
static
std::string shortname() {
return
"ld"
; };
30
};
31
32
template
<
typename
Scalar>
33
struct
scalar_name
<std::complex<Scalar>> {
34
static
std::string shortname() {
return
"c"
+
scalar_name<Scalar>
(); };
35
};
36
}
// namespace eigenpy
37
38
#endif
// ifndef __eigenpy_utils_scalar_name_hpp__
eigenpy
Definition
alignment.hpp:14
eigenpy::scalar_name
Definition
scalar-name.hpp:13
include
eigenpy
utils
scalar-name.hpp
Generated by
1.14.0