Main Page
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
i
l
m
p
r
s
t
u
v
w
+
Functions
a
b
c
e
f
g
i
m
r
t
u
v
w
Variables
Typedefs
Enumerations
+
Classes
Class List
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
x
y
~
+
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
~
+
Variables
b
c
d
e
f
g
i
l
m
n
p
q
r
s
t
v
w
x
y
Typedefs
Enumerations
Enumerator
+
Files
File List
+
File Members
+
All
a
m
n
s
t
+
Functions
a
m
n
s
t
Macros
include
grid_map_core
eigen_plugins
Functors.hpp
Go to the documentation of this file.
1
/*
2
* Functors.hpp
3
*
4
* Created on: Nov 23, 2015
5
* Author: Péter Fankhauser
6
* Institute: ETH Zurich, ANYbotics
7
*/
8
9
#pragma once
10
11
namespace
grid_map
{
12
13
template
<
typename
Scalar>
14
struct
Clamp
15
{
16
Clamp
(
const
Scalar& min,
const
Scalar& max)
17
:
min_
(min),
18
max_
(max)
19
{
20
}
21
Scalar
operator()
(
const
Scalar& x)
const
22
{
23
return
x < min_ ? min_ : (x >
max_
?
max_
: x);
24
}
25
Scalar
min_
,
max_
;
26
};
27
28
}
// namespace grid_map
grid_map::Clamp::min_
Scalar min_
Definition:
Functors.hpp:25
grid_map
Definition:
BufferRegion.hpp:13
grid_map::Clamp::operator()
Scalar operator()(const Scalar &x) const
Definition:
Functors.hpp:21
grid_map::Clamp
Definition:
Functors.hpp:14
grid_map::Clamp::max_
Scalar max_
Definition:
Functors.hpp:25
grid_map::Clamp::Clamp
Clamp(const Scalar &min, const Scalar &max)
Definition:
Functors.hpp:16
grid_map_core
Author(s): Péter Fankhauser
autogenerated on Wed Jul 5 2023 02:23:35