dcsam
Factored inference for discrete-continuous smoothing and mapping
|
Implementation of a discrete prior factor. More...
#include <DiscretePriorFactor.h>
Public Types | |
using | Base = gtsam::DiscreteFactor |
Public Member Functions | |
DiscretePriorFactor ()=default | |
DiscretePriorFactor (const gtsam::DiscreteKey &dk, const std::vector< double > probs) | |
bool | equals (const DiscreteFactor &other, double tol=1e-9) const override |
DiscretePriorFactor & | operator= (const DiscretePriorFactor &rhs) |
gtsam::DecisionTreeFactor | toDecisionTreeFactor () const override |
gtsam::DecisionTreeFactor | operator* (const gtsam::DecisionTreeFactor &f) const override |
double | operator() (const DiscreteValues &values) const override |
std::string | markdown (const gtsam::KeyFormatter &keyFormatter, const Names &names) const override |
std::string | html (const gtsam::KeyFormatter &keyFormatter, const Names &names) const override |
Protected Attributes | |
gtsam::DiscreteKey | dk_ |
std::vector< double > | probs_ |
Implementation of a discrete prior factor.
This factor specifies a prior distribution over a discrete variable. The user provides a discrete key dk
consisting of a key (e.g. gtsam::Symbol
) and the cardinality of the discrete variable. The vector probs
specifies a distribution over the possible values that could be taken by the variable.
For example, for a variable d1
with 2 possible values, p(d1 = i) = probs[i] with i being 0 or 1. The length of the vector probs
therefore must be equal to the cardinality of the discrete variable.
using dcsam::DiscretePriorFactor::Base = gtsam::DiscreteFactor |
|
default |
|
inline |
|
inlineoverride |
|
inlineoverride |
|
inlineoverride |
|
inlineoverride |
|
inlineoverride |
|
inline |
|
inlineoverride |
|
protected |
|
protected |