Bayes Filters Library
Gaussian.h
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 
8 #ifndef GAUSSIAN_H
9 #define GAUSSIAN_H
10 
12 
13 #include <memory>
14 
15 #include <Eigen/Core>
16 
17 namespace bfl {
18  class Gaussian;
19 }
20 
21 
23 {
24 public:
25  Gaussian() noexcept;
26 
27  Gaussian(const std::size_t dim_linear) noexcept;
28 
29  Gaussian(const std::size_t dim_linear, const std::size_t dim_circular, const bool use_quaternion = false) noexcept;
30 
31  virtual ~Gaussian() noexcept = default;
32 
33  void resize(const std::size_t dim_linear, const std::size_t dim_circular = 0);
34 
42  Eigen::Ref<Eigen::VectorXd> mean();
43 
44  const Eigen::Ref<const Eigen::VectorXd> mean() const;
45 
46  double& mean(const std::size_t i);
47 
48  const double& mean(const std::size_t i) const;
49 
50  Eigen::Ref<Eigen::MatrixXd> covariance();
51 
52  const Eigen::Ref<const Eigen::MatrixXd> covariance() const;
53 
54  double& covariance(const std::size_t i, const std::size_t j);
55 
56  const double& covariance(const std::size_t i, const std::size_t j) const;
57 
58  double& weight();
59 
60  const double& weight() const;
61 };
62 
63 #endif /* GAUSSIAN_H */
bfl::GaussianMixture::dim_circular
std::size_t dim_circular
Definition: GaussianMixture.h:77
bfl::Gaussian::mean
Eigen::Ref< Eigen::VectorXd > mean()
Non-virtual methods of GaussianMixture are overriden here since a Gaussian is a 1-component GaussianM...
Definition: Gaussian.cpp:41
bfl::Gaussian::resize
void resize(const std::size_t dim_linear, const std::size_t dim_circular=0)
Definition: Gaussian.cpp:35
bfl
Port of boost::any for C++11 compilers.
Definition: AdditiveMeasurementModel.h:13
bfl::GaussianMixture::dim_linear
std::size_t dim_linear
Definition: GaussianMixture.h:75
bfl::Gaussian::Gaussian
Gaussian() noexcept
Definition: Gaussian.cpp:15
bfl::Gaussian
Definition: Gaussian.h:22
GaussianMixture.h
bfl::GaussianMixture::use_quaternion
bool use_quaternion
Definition: GaussianMixture.h:69
bfl::Gaussian::weight
double & weight()
Definition: Gaussian.cpp:90
bfl::Gaussian::covariance
Eigen::Ref< Eigen::MatrixXd > covariance()
Definition: Gaussian.cpp:65
bfl::Gaussian::~Gaussian
virtual ~Gaussian() noexcept=default
bfl::GaussianMixture
Definition: GaussianMixture.h:20