Go to the documentation of this file.
25 #include <MemoryX/interface/core/ProbabilityMeasures.h>
47 virtual public memoryx::DiscreteProbabilityBase
62 armarx::VariantDataClassPtr
clone(
const Ice::Current&
c = Ice::emptyCurrent)
const override
66 std::string
output(
const Ice::Current&
c = Ice::emptyCurrent)
const override
76 bool validate(
const Ice::Current&
c = Ice::emptyCurrent)
override
82 void serialize(
const armarx::ObjectSerializerBasePtr& serializer, const ::Ice::Current& = Ice::emptyCurrent)
const override;
83 void deserialize(
const armarx::ObjectSerializerBasePtr& serializer, const ::Ice::Current& = Ice::emptyCurrent)
override;
88 virtual public memoryx::NormalDistributionBase
91 int getDimensions(const ::Ice::Current& = Ice::emptyCurrent)
const override
103 float getCovariance(
int row,
int col, const ::Ice::Current& = Ice::emptyCurrent)
const override = 0;
110 virtual float getDensity(
const Eigen::VectorXf& p) = 0;
112 std::string
output(
const Ice::Current&
c = Ice::emptyCurrent)
const override;
121 void serialize(
const armarx::ObjectSerializerBasePtr& serializer, const ::Ice::Current& = Ice::emptyCurrent)
const override;
122 void deserialize(
const armarx::ObjectSerializerBasePtr& serializer, const ::Ice::Current& = Ice::emptyCurrent)
override;
132 virtual public memoryx::UnivariateNormalDistributionBase,
143 float getCovariance(
int row,
int col, const ::Ice::Current& = Ice::emptyCurrent)
const override;
155 return this->
clone();
157 armarx::VariantDataClassPtr
clone(
const Ice::Current&
c = Ice::emptyCurrent)
const override
166 bool validate(
const Ice::Current&
c = Ice::emptyCurrent)
override
172 void serialize(
const armarx::ObjectSerializerBasePtr& serializer, const ::Ice::Current& = Ice::emptyCurrent)
const override;
173 void deserialize(
const armarx::ObjectSerializerBasePtr& serializer, const ::Ice::Current& = Ice::emptyCurrent)
override;
184 virtual public memoryx::IsotropicNormalDistributionBase,
196 float getCovariance(
int row,
int col, const ::Ice::Current& = Ice::emptyCurrent)
const override;
207 return this->
clone();
209 armarx::VariantDataClassPtr
clone(
const Ice::Current&
c = Ice::emptyCurrent)
const override
217 bool validate(
const Ice::Current&
c = Ice::emptyCurrent)
override
223 void serialize(
const armarx::ObjectSerializerBasePtr& serializer, const ::Ice::Current& = Ice::emptyCurrent)
const override;
224 void deserialize(
const armarx::ObjectSerializerBasePtr& serializer, const ::Ice::Current& = Ice::emptyCurrent)
override;
237 virtual public memoryx::MultivariateNormalDistributionBase,
254 Eigen::Vector3f
mean = Eigen::Vector3f::Zero();
258 float getCovariance(
int row,
int col, const ::Ice::Current& = Ice::emptyCurrent)
const override;
260 float getVarianceScalar(const ::Ice::Current& = Ice::emptyCurrent)
const override;
264 float getDensity(
const Eigen::VectorXf& point)
override;
269 return this->
clone();
271 armarx::VariantDataClassPtr
clone(
const Ice::Current&
c = Ice::emptyCurrent)
const override
279 bool validate(
const Ice::Current&
c = Ice::emptyCurrent)
override
285 void serialize(
const armarx::ObjectSerializerBasePtr& serializer, const ::Ice::Current& = Ice::emptyCurrent)
const override;
286 void deserialize(
const armarx::ObjectSerializerBasePtr& serializer, const ::Ice::Current& = Ice::emptyCurrent)
override;
299 virtual public GaussianMixtureDistributionBase
305 void clear(const ::Ice::Current& = Ice::emptyCurrent)
override;
306 ::Ice::Int size(const ::Ice::Current& = Ice::emptyCurrent)
const override;
310 GaussianMixtureComponent
getModalComponent(const ::Ice::Current& = Ice::emptyCurrent)
const override;
311 void addComponent(
const GaussianMixtureComponent& component, const ::Ice::Current& = Ice::emptyCurrent)
override;
312 void addComponent(
const NormalDistributionBasePtr& gaussian,
float weight);
313 void addGaussian(
const NormalDistributionBasePtr& gaussian,
float weight, const ::Ice::Current& = Ice::emptyCurrent)
override;
314 void setComponent(::
Ice::Int index,
const GaussianMixtureComponent& component, const ::Ice::Current& = Ice::emptyCurrent)
override;
322 void addComponents(
const GaussianMixtureDistributionBasePtr& other, const ::Ice::Current& = Ice::emptyCurrent)
override;
341 void normalize(const ::Ice::Current& = Ice::emptyCurrent)
override;
343 virtual float getDensity(
const Eigen::VectorXf& point);
358 return this->
clone();
360 armarx::VariantDataClassPtr
clone(
const Ice::Current&
c = Ice::emptyCurrent)
const override
368 bool validate(
const Ice::Current&
c = Ice::emptyCurrent)
override
373 std::string
output(
const Ice::Current&
c = Ice::emptyCurrent)
const override;
376 void serialize(
const armarx::ObjectSerializerBasePtr& serializer, const ::Ice::Current& = Ice::emptyCurrent)
const override;
377 void deserialize(
const armarx::ObjectSerializerBasePtr& serializer, const ::Ice::Current& = Ice::emptyCurrent)
override;
380 float getTotalWeight()
const;
::Ice::Float getVariance(::Ice::Int dim, const ::Ice::Current &=Ice::emptyCurrent) const override
void setProbability(::Ice::Float, const ::Ice::Current &=Ice::emptyCurrent) override
armarx::VariantTypeId getType(const Ice::Current &c=Ice::emptyCurrent) const override
float getCovariance(int row, int col, const ::Ice::Current &=Ice::emptyCurrent) const override
const armarx::VariantTypeId GaussianMixtureDistribution
The IsotropicNormalDistribution class.
void fromEigenMean(const Eigen::VectorXf &mean)
void removeComponent(::Ice::Int index, const ::Ice::Current &=Ice::emptyCurrent) override
GaussianMixtureComponent getModalComponent(const ::Ice::Current &=Ice::emptyCurrent) const override
std::string output(const Ice::Current &c=Ice::emptyCurrent) const override
const armarx::VariantTypeId IsotropicNormalDistribution
const VariantTypeId Float
Ice::ObjectPtr ice_clone() const override
void addGaussian(const NormalDistributionBasePtr &gaussian, float weight, const ::Ice::Current &=Ice::emptyCurrent) override
float getDensity(const Eigen::VectorXf &p) override
::Ice::Int size(const ::Ice::Current &=Ice::emptyCurrent) const override
bool validate(const Ice::Current &c=Ice::emptyCurrent) override
void fromEigenCovariance(const Eigen::MatrixXf &cov) override
~DiscreteProbability() override
float getCovariance(int row, int col, const ::Ice::Current &=Ice::emptyCurrent) const override=0
armarx::VariantDataClassPtr clone(const Ice::Current &c=Ice::emptyCurrent) const override
virtual void fromEigenCovariance(const Eigen::MatrixXf &cov)=0
void setMean(const FloatVector &mean, const ::Ice::Current &=Ice::emptyCurrent) override
FloatVector getMean(const ::Ice::Current &=Ice::emptyCurrent) const override
float getCovariance(int row, int col, const ::Ice::Current &=Ice::emptyCurrent) const override
::Ice::Float getVariance(const ::Ice::Current &=Ice::emptyCurrent) const override
void setVariance(::Ice::Int dim, ::Ice::Float, const ::Ice::Current &=Ice::emptyCurrent) override
armarx::VariantTypeId getType(const Ice::Current &c=Ice::emptyCurrent) const override
float getCovariance(int row, int col, const ::Ice::Current &=Ice::emptyCurrent) const override
void deserialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) override
::Ice::Float getProbability(const ::Ice::Current &=Ice::emptyCurrent) const override
IsotropicNormalDistribution(int dimensions=0)
Ice::ObjectPtr ice_clone() const override
::Ice::Int getDimensions(const ::Ice::Current &=Ice::emptyCurrent) const override
void normalize(const ::Ice::Current &=Ice::emptyCurrent) override
Normalize components weights (i.e.
void serialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) const override
armarx::VariantDataClassPtr clone(const Ice::Current &c=Ice::emptyCurrent) const override
void serialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) const override
void serialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) const override
float getVarianceScalar(const ::Ice::Current &=Ice::emptyCurrent) const override
void pruneComponents(::Ice::Float threshold, const ::Ice::Current &=Ice::emptyCurrent) override
Remove all components with weights lower than threshold value.
static MultivariateNormalDistributionPtr CreateDefaultDistribution(float variance=10000)
Create a distribution with uncertainty of variance in all directions (default: variance = 10000,...
void Identity(MatrixXX< N, N, T > *a)
void addComponent(const GaussianMixtureComponent &component, const ::Ice::Current &=Ice::emptyCurrent) override
armarx::VariantTypeId getType(const Ice::Current &c=Ice::emptyCurrent) const override
virtual Eigen::MatrixXf toEigenCovariance() const =0
std::optional< float > mean(const boost::circular_buffer< NameValueMap > &buffer, const std::string &key)
armarx::VariantDataClassPtr clone(const Ice::Current &c=Ice::emptyCurrent) const override
void setCovariance(::Ice::Int row, ::Ice::Int col, ::Ice::Float cov, const ::Ice::Current &=Ice::emptyCurrent) override
Eigen::MatrixXf toEigenCovariance() const override
int getDimensions(const ::Ice::Current &=Ice::emptyCurrent) const override
::std::vector< ::Ice::Float > FloatVector
The MultivariateNormalDistribution class.
The DiscreteProbability class.
The GaussianMixtureDistribution class.
Eigen::VectorXf toEigenMean() const
void deserialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) override
bool validate(const Ice::Current &c=Ice::emptyCurrent) override
void setVariance(::Ice::Float, const ::Ice::Current &=Ice::emptyCurrent) override
virtual float getDensity(const Eigen::VectorXf &point)
void setComponent(::Ice::Int index, const GaussianMixtureComponent &component, const ::Ice::Current &=Ice::emptyCurrent) override
NormalDistribution(int dimensions)
UnivariateNormalDistribution()
The UnivariateNormalDistribution class.
MultivariateNormalDistribution(int dimensions=0)
void addComponents(const GaussianMixtureDistributionBasePtr &other, const ::Ice::Current &=Ice::emptyCurrent) override
Multiply weight of each GM component with a given constant.
IceInternal::Handle< MultivariateNormalDistribution > MultivariateNormalDistributionPtr
static GaussianMixtureDistributionPtr FromProbabilityMeasure(const ProbabilityMeasureBasePtr &probMeasure)
Convert or approximate given ProbabilityMeasure to a gaussian mixture.
std::string output(const Ice::Current &c=Ice::emptyCurrent) const override
armarx::VariantDataClassPtr clone(const Ice::Current &c=Ice::emptyCurrent) const override
GaussianMixtureDistribution()
GaussianMixtureDistribution implementation.
Ice::ObjectPtr ice_clone() const override
MatrixXX< 3, 3, float > Matrix3f
Eigen::MatrixXf toEigenCovariance() const override
void fromEigenCovariance(const Eigen::MatrixXf &cov) override
armarx::VariantDataClassPtr clone(const Ice::Current &c=Ice::emptyCurrent) const override
Eigen::MatrixXf toEigenCovariance() const override
const armarx::VariantTypeId UnivariateNormalDistribution
float getDensity(const Eigen::VectorXf &p) override
void clear(const ::Ice::Current &=Ice::emptyCurrent) override
std::string output(const Ice::Current &c=Ice::emptyCurrent) const override
void deserialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) override
void deserialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) override
void serialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) const override
bool validate(const Ice::Current &c=Ice::emptyCurrent) override
virtual float getDensity(const Eigen::VectorXf &p)=0
bool validate(const Ice::Current &c=Ice::emptyCurrent) override
void deserialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) override
Ice::ObjectPtr ice_clone() const override
std::shared_ptr< Object > ObjectPtr
void scaleComponents(::Ice::Float factor, const ::Ice::Current &=Ice::emptyCurrent) override
Multiply weight of each GM component with a given constant.
void deserialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) override
Ice::ObjectPtr ice_clone() const override
void serialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) const override
void fromEigenCovariance(const Eigen::MatrixXf &cov) override
const armarx::VariantTypeId DiscreteProbability
bool validate(const Ice::Current &c=Ice::emptyCurrent) override
void serialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) const override
armarx::VariantTypeId getType(const Ice::Current &c=Ice::emptyCurrent) const override
double s(double t, double s0, double v0, double a0, double j)
static VariantTypeId addTypeName(const std::string &typeName)
Register a new type for the use in a Variant.
GaussianMixtureComponent getComponent(::Ice::Int index, const ::Ice::Current &=Ice::emptyCurrent) const override
float getDensity(const Eigen::VectorXf &point) override
const armarx::VariantTypeId MultivariateNormalDistribution
armarx::VariantTypeId getType(const Ice::Current &c=Ice::emptyCurrent) const override