Go to the documentation of this file.
29 #include <MemoryX/interface/core/ProbabilityMeasures.h>
69 armarx::VariantDataClassPtr
70 clone(
const Ice::Current&
c = Ice::emptyCurrent)
const override
76 output(
const Ice::Current&
c = Ice::emptyCurrent)
const override
84 getType(
const Ice::Current&
c = Ice::emptyCurrent)
const override
90 validate(
const Ice::Current&
c = Ice::emptyCurrent)
override
96 void serialize(
const armarx::ObjectSerializerBasePtr& serializer,
97 const ::Ice::Current& = Ice::emptyCurrent)
const override;
98 void deserialize(
const armarx::ObjectSerializerBasePtr& serializer,
99 const ::Ice::Current& = Ice::emptyCurrent)
override;
112 getMean(const ::Ice::Current& = Ice::emptyCurrent)
const override
125 const ::Ice::Current& = Ice::emptyCurrent)
const override = 0;
132 virtual float getDensity(
const Eigen::VectorXf& p) = 0;
134 std::string
output(
const Ice::Current&
c = Ice::emptyCurrent)
const override;
143 void serialize(
const armarx::ObjectSerializerBasePtr& serializer,
144 const ::Ice::Current& = Ice::emptyCurrent)
const override;
145 void deserialize(
const armarx::ObjectSerializerBasePtr& serializer,
146 const ::Ice::Current& = Ice::emptyCurrent)
override;
156 virtual public memoryx::UnivariateNormalDistributionBase,
168 getCovariance(
int row,
int col, const ::Ice::Current& = Ice::emptyCurrent)
const override;
182 return this->
clone();
185 armarx::VariantDataClassPtr
186 clone(
const Ice::Current&
c = Ice::emptyCurrent)
const override
193 getType(
const Ice::Current&
c = Ice::emptyCurrent)
const override
199 validate(
const Ice::Current&
c = Ice::emptyCurrent)
override
205 void serialize(
const armarx::ObjectSerializerBasePtr& serializer,
206 const ::Ice::Current& = Ice::emptyCurrent)
const override;
207 void deserialize(
const armarx::ObjectSerializerBasePtr& serializer,
208 const ::Ice::Current& = Ice::emptyCurrent)
override;
218 virtual public memoryx::IsotropicNormalDistributionBase,
228 const ::Ice::Current& = Ice::emptyCurrent)
const override;
231 const ::Ice::Current& = Ice::emptyCurrent)
override;
234 getCovariance(
int row,
int col, const ::Ice::Current& = Ice::emptyCurrent)
const override;
248 return this->
clone();
251 armarx::VariantDataClassPtr
252 clone(
const Ice::Current&
c = Ice::emptyCurrent)
const override
258 getType(
const Ice::Current&
c = Ice::emptyCurrent)
const override
264 validate(
const Ice::Current&
c = Ice::emptyCurrent)
override
270 void serialize(
const armarx::ObjectSerializerBasePtr& serializer,
271 const ::Ice::Current& = Ice::emptyCurrent)
const override;
272 void deserialize(
const armarx::ObjectSerializerBasePtr& serializer,
273 const ::Ice::Current& = Ice::emptyCurrent)
override;
286 virtual public memoryx::MultivariateNormalDistributionBase,
304 Eigen::Vector3f
mean = Eigen::Vector3f::Zero();
310 getCovariance(
int row,
int col, const ::Ice::Current& = Ice::emptyCurrent)
const override;
314 const ::Ice::Current& = Ice::emptyCurrent)
override;
315 float getVarianceScalar(const ::Ice::Current& = Ice::emptyCurrent)
const override;
319 float getDensity(
const Eigen::VectorXf& point)
override;
325 return this->
clone();
328 armarx::VariantDataClassPtr
329 clone(
const Ice::Current&
c = Ice::emptyCurrent)
const override
335 getType(
const Ice::Current&
c = Ice::emptyCurrent)
const override
341 validate(
const Ice::Current&
c = Ice::emptyCurrent)
override
347 void serialize(
const armarx::ObjectSerializerBasePtr& serializer,
348 const ::Ice::Current& = Ice::emptyCurrent)
const override;
349 void deserialize(
const armarx::ObjectSerializerBasePtr& serializer,
350 const ::Ice::Current& = Ice::emptyCurrent)
override;
368 void clear(const ::Ice::Current& = Ice::emptyCurrent)
override;
369 ::Ice::Int size(const ::Ice::Current& = Ice::emptyCurrent)
const override;
372 GaussianMixtureComponent
374 GaussianMixtureComponent
376 void addComponent(
const GaussianMixtureComponent& component,
377 const ::Ice::Current& = Ice::emptyCurrent)
override;
378 void addComponent(
const NormalDistributionBasePtr& gaussian,
float weight);
379 void addGaussian(
const NormalDistributionBasePtr& gaussian,
381 const ::Ice::Current& = Ice::emptyCurrent)
override;
383 const GaussianMixtureComponent& component,
384 const ::Ice::Current& = Ice::emptyCurrent)
override;
392 void addComponents(
const GaussianMixtureDistributionBasePtr& other,
393 const ::Ice::Current& = Ice::emptyCurrent)
override;
401 const ::Ice::Current& = Ice::emptyCurrent)
override;
409 const ::Ice::Current& = Ice::emptyCurrent)
override;
414 void normalize(const ::Ice::Current& = Ice::emptyCurrent)
override;
416 virtual float getDensity(
const Eigen::VectorXf& point);
433 return this->
clone();
436 armarx::VariantDataClassPtr
437 clone(
const Ice::Current&
c = Ice::emptyCurrent)
const override
443 getType(
const Ice::Current&
c = Ice::emptyCurrent)
const override
449 validate(
const Ice::Current&
c = Ice::emptyCurrent)
override
454 std::string
output(
const Ice::Current&
c = Ice::emptyCurrent)
const override;
457 void serialize(
const armarx::ObjectSerializerBasePtr& serializer,
458 const ::Ice::Current& = Ice::emptyCurrent)
const override;
459 void deserialize(
const armarx::ObjectSerializerBasePtr& serializer,
460 const ::Ice::Current& = Ice::emptyCurrent)
override;
463 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
::std::vector<::Ice::Float > FloatVector
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
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
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
MatrixXX< 3, 3, float > Matrix3f
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