Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
w
Functions
_
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
w
Variables
a
b
c
d
e
f
g
h
i
l
m
p
r
s
t
u
w
Typedefs
a
c
d
g
i
l
m
p
r
s
t
u
v
Enumerations
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Related Functions
Files
File List
File Members
All
_
c
e
g
i
j
m
n
o
p
s
t
u
w
y
Functions
c
e
g
m
o
p
s
t
u
w
y
Variables
Typedefs
Macros
_
c
e
i
m
n
p
s
w
sensor_api
source
Legacy
include
MultiSense
details
utility
Functional.hh
Go to the documentation of this file.
1
39
#ifndef CRL_MULTISENSE_FUNCTIONAL_HH
40
#define CRL_MULTISENSE_FUNCTIONAL_HH
41
42
namespace
crl
{
43
namespace
multisense
{
44
namespace
details {
45
namespace
utility {
46
47
template
<
class
Type>
48
inline
bool
49
approximatelyEqual
(Type
const
& xx, Type
const
& yy, Type
const
& epsilon) {
50
return
(((xx)-(yy) < (
epsilon
)) && ((xx)-(yy) > -(
epsilon
)));
51
}
52
53
template
<
class
Type>
54
inline
bool
55
approxEqual
(Type
const
& xx, Type
const
& yy, Type
const
& epsilon) {
56
return
approximatelyEqual
(xx, yy,
epsilon
);
57
}
58
59
template
<
class
Type>
60
inline
Type
61
boundValue
(Type
const
& value, Type
const
& minimum, Type
const
& maximum) {
62
return
((value > maximum) ? maximum : (value < minimum) ? minimum : value);
63
}
64
65
template
<
class
Type>
66
inline
Type
67
decayedAverage
(Type
const
& previous, Type
const
& samples, Type
const
& newest) {
68
return
(((samples - 1) * previous) + newest) / samples;
69
}
70
71
}}}}
// namespaces
72
73
#endif
/* #ifndef CRL_MULTISENSE_FUNCTIONAL_HH */
epsilon
double epsilon
crl::multisense::details::utility::decayedAverage
Type decayedAverage(Type const &previous, Type const &samples, Type const &newest)
Definition:
Functional.hh:67
crl
Definition:
Legacy/details/channel.cc:61
crl::multisense::details::utility::approxEqual
bool approxEqual(Type const &xx, Type const &yy, Type const &epsilon)
Definition:
Functional.hh:55
multisense
Definition:
factory.cc:39
crl::multisense::details::utility::approximatelyEqual
bool approximatelyEqual(Type const &xx, Type const &yy, Type const &epsilon)
Definition:
Functional.hh:49
crl::multisense::details::utility::boundValue
Type boundValue(Type const &value, Type const &minimum, Type const &maximum)
Definition:
Functional.hh:61
multisense_lib
Author(s):
autogenerated on Thu Apr 17 2025 02:49:08