Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
eigenpy
Commits
0f6d88d3
Verified
Commit
0f6d88d3
authored
Jan 29, 2020
by
Justin Carpentier
Browse files
utils: add name methods for Scalar types
parent
d817a31a
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
0f6d88d3
...
...
@@ -71,6 +71,10 @@ SEARCH_FOR_BOOST()
# ----------------------------------------------------
# --- INCLUDE ----------------------------------------
# ----------------------------------------------------
SET
(
${
PROJECT_NAME
}
_UTILS_HEADERS
include/eigenpy/utils/scalar-name.hpp
)
SET
(
${
PROJECT_NAME
}
_SOLVERS_HEADERS
include/eigenpy/solvers/solvers.hpp
include/eigenpy/solvers/preconditioners.hpp
...
...
@@ -83,6 +87,7 @@ SET(${PROJECT_NAME}_SOLVERS_HEADERS
)
SET
(
${
PROJECT_NAME
}
_HEADERS
${${
PROJECT_NAME
}
_UTILS_HEADERS
}
${${
PROJECT_NAME
}
_SOLVERS_HEADERS
}
include/eigenpy/computation-info.hpp
include/eigenpy/eigenpy.hpp
...
...
include/eigenpy/utils/scalar-name.hpp
0 → 100644
View file @
0f6d88d3
/*
* Copyright 2020 INRIA
*/
#ifndef __eigenpy_utils_scalar_name_hpp__
#define __eigenpy_utils_scalar_name_hpp__
#include
<string>
#include
<complex>
namespace
eigenpy
{
template
<
typename
Scalar
>
struct
scalar_name
{
static
std
::
string
shortname
();
};
template
<
>
struct
scalar_name
<
float
>
{
static
std
::
string
shortname
()
{
return
"f"
;
};
};
template
<
>
struct
scalar_name
<
double
>
{
static
std
::
string
shortname
()
{
return
"d"
;
};
};
template
<
>
struct
scalar_name
<
long
double
>
{
static
std
::
string
shortname
()
{
return
"ld"
;
};
};
template
<
typename
Scalar
>
struct
scalar_name
<
std
::
complex
<
Scalar
>
>
{
static
std
::
string
shortname
()
{
return
"c"
+
scalar_name
<
Scalar
>
();
};
};
}
#endif // ifndef __eigenpy_utils_scalar_name_hpp__
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment