Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
corelib
src
optimizer
vertigo
g2o
vertex_switchLinear.cpp
Go to the documentation of this file.
1
/*
2
* vertex_switchLinear.cpp
3
*
4
* Created on: 17.10.2011
5
* Author: niko
6
*
7
* Updated on: 14.01.2013
8
* Author: Christian Kerl <christian.kerl@in.tum.de>
9
*/
10
11
#include "
vertex_switchLinear.h
"
12
#include <iostream>
13
14
using namespace
std
;
15
16
VertexSwitchLinear::VertexSwitchLinear
() :
17
_x(0)
18
{
19
setToOrigin();
20
setEstimate
(1.0);
21
}
22
23
bool
VertexSwitchLinear:: read
(std::istream& is)
24
{
25
is >>
_x
;
26
_estimate=
_x
;
27
28
return
true
;
29
}
30
31
bool
VertexSwitchLinear::write
(std::ostream& os)
const
32
{
33
os <<
_x
;
34
return
os.good();
35
}
36
37
void
VertexSwitchLinear::setToOriginImpl
()
38
{
39
_x
=0;
40
_estimate=
_x
;
41
}
42
43
44
void
VertexSwitchLinear::setEstimate
(
const
double
&et)
45
{
46
_x
=et;
47
_estimate=
_x
;
48
}
49
50
51
void
VertexSwitchLinear::oplusImpl
(
const
double
* update)
52
{
53
_x
+= update[0];
54
55
if
(
_x
<0)
_x
=0;
56
if
(
_x
>1)
_x
=1;
57
58
_estimate=
_x
;
59
}
VertexSwitchLinear::read
virtual bool read(std::istream &is)
Definition:
vertex_switchLinear.cpp:23
VertexSwitchLinear::_x
double _x
Definition:
vertex_switchLinear.h:38
std
VertexSwitchLinear::write
virtual bool write(std::ostream &os) const
Definition:
vertex_switchLinear.cpp:31
vertex_switchLinear.h
VertexSwitchLinear::VertexSwitchLinear
VertexSwitchLinear()
Definition:
vertex_switchLinear.cpp:16
VertexSwitchLinear::setToOriginImpl
virtual void setToOriginImpl()
Definition:
vertex_switchLinear.cpp:37
VertexSwitchLinear::setEstimate
virtual void setEstimate(const double &et)
Definition:
vertex_switchLinear.cpp:44
VertexSwitchLinear::oplusImpl
virtual void oplusImpl(const double *update)
Definition:
vertex_switchLinear.cpp:51
rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Dec 14 2020 03:37:06