Bayes Filters Library
VectorDescription.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2019 Istituto Italiano di Tecnologia (IIT)
3  *
4  * This software may be modified and distributed under the terms of the
5  * BSD 3-Clause license. See the accompanying LICENSE file for details.
6  */
7 
9 
10 using namespace bfl;
11 
12 
14 (
15  const std::size_t linear_components,
16  const std::size_t circular_components,
17  const std::size_t noise_components,
18  const VectorDescription::CircularType& circular_type
19 ) :
20  linear_components_(linear_components),
21  circular_components_(circular_components),
22  noise_components_(noise_components),
23  circular_type(circular_type)
24 {}
25 
26 
28 {
29  return linear_components_;
30 }
31 
32 
34 {
35  return circular_components_;
36 }
37 
38 
40 {
41  return noise_components_;
42 }
43 
44 
45 std::size_t VectorDescription::linear_size() const
46 {
47  return linear_components_;
48 }
49 
50 
52 {
54  return circular_components_ * 4;
55 
56  return circular_components_;
57 }
58 
59 
60 std::size_t VectorDescription::noise_size() const
61 {
62  return noise_components_;
63 }
64 
65 
66 std::size_t VectorDescription::total_size() const
67 {
68  return linear_size() + circular_size() + noise_size();
69 }
70 
71 
72 std::size_t VectorDescription::dof_size() const
73 {
75  {
76  /* If quaternions are used, the number of degrees of freedom for the evaluation of the sigma points
77  depends on the dimensions of the tangent space that is R^3. */
78  return linear_size() + circular_components() * 3 + noise_size();
79  }
80  else
81  return total_size();
82 }
83 
84 
85 void VectorDescription::add_noise_components(const std::size_t& components)
86 {
87  noise_components_ += components;
88 }
89 
90 
92 {
94 }
bfl::VectorDescription::dof_size
std::size_t dof_size() const
Definition: VectorDescription.cpp:72
bfl::VectorDescription::noise_components
std::size_t noise_components() const
Definition: VectorDescription.cpp:39
bfl::VectorDescription::CircularType
CircularType
Definition: VectorDescription.h:21
bfl::VectorDescription::circular_components_
std::size_t circular_components_
Definition: VectorDescription.h:55
bfl::VectorDescription::linear_components
std::size_t linear_components() const
Definition: VectorDescription.cpp:27
bfl::VectorDescription::noise_size
std::size_t noise_size() const
Definition: VectorDescription.cpp:60
bfl
Port of boost::any for C++11 compilers.
Definition: AdditiveMeasurementModel.h:13
bfl::VectorDescription::linear_components_
std::size_t linear_components_
Definition: VectorDescription.h:53
bfl::VectorDescription::CircularType::Quaternion
@ Quaternion
bfl::VectorDescription::noise_components_
std::size_t noise_components_
Definition: VectorDescription.h:57
bfl::VectorDescription::noiseless_description
VectorDescription noiseless_description() const
Definition: VectorDescription.cpp:91
VectorDescription.h
bfl::VectorDescription::linear_size
std::size_t linear_size() const
Definition: VectorDescription.cpp:45
bfl::VectorDescription::circular_components
std::size_t circular_components() const
Definition: VectorDescription.cpp:33
bfl::VectorDescription::circular_size
std::size_t circular_size() const
Definition: VectorDescription.cpp:51
bfl::VectorDescription::total_size
std::size_t total_size() const
Definition: VectorDescription.cpp:66
bfl::VectorDescription::circular_type
CircularType circular_type
Definition: VectorDescription.h:49
bfl::VectorDescription::VectorDescription
VectorDescription()=default
bfl::VectorDescription::add_noise_components
void add_noise_components(const std::size_t &components)
Definition: VectorDescription.cpp:85
bfl::VectorDescription
Definition: VectorDescription.h:18