math.h
Go to the documentation of this file.
1 /**
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @author Jianfeng Gao ( jianfeng dot gao at kit dot edu )
17  * @date 2022
18  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19  * GNU General Public License
20  */
21 
22 #pragma once
23 #include <Eigen/Geometry>
24 
25 
27 {
28 
30 {
31 public:
32  MultivariateNormal(const Eigen::VectorXf& mu, const Eigen::MatrixXf& cov);
33  MultivariateNormal(const Eigen::VectorXf& mu, float std);
35  float pdf(const Eigen::VectorXf& x) const;
36  Eigen::VectorXf pdf_gradient(const Eigen::VectorXf& x) const;
37  Eigen::VectorXf sample(unsigned int nr_iterations = 20) const;
38  Eigen::VectorXf mean;
39  Eigen::MatrixXf covariance;
40 };
41 
42 Eigen::VectorXf pdf_gradient(const Eigen::VectorXf& mean, float std, const Eigen::VectorXf &x);
43 }
armarx::control::common
This file is part of ArmarX.
Definition: aron_conversions.cpp:29
armarx::control::common::MultivariateNormal::pdf_gradient
Eigen::VectorXf pdf_gradient(const Eigen::VectorXf &x) const
Definition: math.cpp:25
armarx::control::common::MultivariateNormal::sample
Eigen::VectorXf sample(unsigned int nr_iterations=20) const
Definition: math.cpp:31
armarx::mean
std::optional< float > mean(const boost::circular_buffer< NameValueMap > &buffer, const std::string &key)
Definition: KinematicUnitGuiPlugin.cpp:1615
armarx::control::common::MultivariateNormal
Definition: math.h:29
armarx::control::common::pdf_gradient
Eigen::VectorXf pdf_gradient(const Eigen::VectorXf &mean, float std, const Eigen::VectorXf &x)
Definition: math.cpp:64
armarx::control::common::MultivariateNormal::covariance
Eigen::MatrixXf covariance
Definition: math.h:39
std
Definition: Application.h:66
armarx::control::common::MultivariateNormal::pdf
float pdf(const Eigen::VectorXf &x) const
Definition: math.cpp:14
armarx::control::common::MultivariateNormal::~MultivariateNormal
~MultivariateNormal()
armarx::control::common::MultivariateNormal::MultivariateNormal
MultivariateNormal(const Eigen::VectorXf &mu, const Eigen::MatrixXf &cov)
armarx::control::common::MultivariateNormal::mean
Eigen::VectorXf mean
Definition: math.h:38