|
|
| GaussianDensity () |
| | default constructor needed for serialization
|
|
| GaussianDensity (const GaussianConditional &conditional) |
| | Copy constructor from GaussianConditional.
|
|
| GaussianDensity (Key key, const Vector &d, const Matrix &R, const SharedDiagonal &noiseModel=SharedDiagonal()) |
| | constructor using d, R
|
| void | print (const std::string &="GaussianDensity", const KeyFormatter &formatter=DefaultKeyFormatter) const override |
| | print
|
|
Vector | mean () const |
| | Mean \( \mu = R^{-1} d \).
|
|
Matrix | covariance () const |
| | Covariance matrix \( \Sigma = (R^T R)^{-1} \).
|
| bool | equals (const GaussianFactor &cg, double tol=1e-9) const override |
| | equals function
|
| double | logNormalizationConstant () const override |
| | normalization constant = 1.0 / sqrt((2*pi)^n*det(Sigma)) log = - 0.5 * n*log(2*pi) - 0.5 * log det(Sigma)
|
| double | logProbability (const VectorValues &x) const |
| | Calculate log-probability log(evaluate(x)) for given values x: -error(x) - 0.5 * n*log(2*pi) - 0.5 * log det(Sigma) where x is the vector of values, and Sigma is the covariance matrix.
|
|
double | evaluate (const VectorValues &x) const |
| | Calculate probability density for given values x: exp(logProbability(x)) == exp(-GaussianFactor::error(x)) / sqrt((2*pi)^n*det(Sigma)) where x is the vector of values, and Sigma is the covariance matrix.
|
|
double | operator() (const VectorValues &x) const |
| | Evaluate probability density, sugar.
|
| VectorValues | solve (const VectorValues &parents) const |
| | Solves a conditional Gaussian and writes the solution into the entries of x for each frontal variable of the conditional.
|
|
VectorValues | solveOtherRHS (const VectorValues &parents, const VectorValues &rhs) const |
|
void | solveTransposeInPlace (VectorValues &gy) const |
| | Performs transpose backsubstition in place on values.
|
|
JacobianFactor::shared_ptr | likelihood (const VectorValues &frontalValues) const |
| | Convert to a likelihood factor by providing value before bar.
|
|
JacobianFactor::shared_ptr | likelihood (const Vector &frontal) const |
| | Single variable version of likelihood.
|
|
VectorValues | sample (std::mt19937_64 *rng) const |
| | Sample from conditional, zero parent version Example: std::mt19937_64 rng(42); auto sample = gbn.sample(&rng);.
|
|
VectorValues | sample (const VectorValues &parentsValues, std::mt19937_64 *rng) const |
| | Sample from conditional, given missing variables Example: std::mt19937_64 rng(42); VectorValues given = ...; auto sample = gbn.sample(given, &rng);.
|
|
VectorValues | sample () const |
| | Sample, use default rng.
|
|
VectorValues | sample (const VectorValues &parentsValues) const |
| | Sample with given values, use default rng.
|
|
constABlock | R () const |
| | Return a view of the upper-triangular R block of the conditional.
|
|
constABlock | S () const |
| | Get a view of the parent blocks.
|
|
constABlock | S (const_iterator it) const |
| | Get a view of the S matrix for the variable pointed to by the given key iterator.
|
| const constBVector | d () const |
| | Get a view of the r.h.s.
|
| double | determinant () const |
| | Compute the determinant of the R matrix.
|
| double | logDeterminant () const |
| | Compute the log determinant of the R matrix.
|
| double | logProbability (const HybridValues &x) const override |
| | Calculate log-probability log(evaluate(x)) for HybridValues x.
|
| double | evaluate (const HybridValues &x) const override |
| | Calculate probability for HybridValues x.
|
|
double | operator() (const HybridValues &x) const |
| | Evaluate probability density, sugar.
|
| double | error (const VectorValues &c) const override |
|
| GaussianConditional () |
| | default constructor needed for serialization
|
|
| GaussianConditional (Key key, const Vector &d, const Matrix &R, const SharedDiagonal &sigmas=SharedDiagonal()) |
| | constructor with no parents |Rx-d|
|
|
| GaussianConditional (Key key, const Vector &d, const Matrix &R, Key parent1, const Matrix &S, const SharedDiagonal &sigmas=SharedDiagonal()) |
| | constructor with only one parent |Rx+Sy-d|
|
|
| GaussianConditional (Key key, const Vector &d, const Matrix &R, Key parent1, const Matrix &S, Key parent2, const Matrix &T, const SharedDiagonal &sigmas=SharedDiagonal()) |
| | constructor with two parents |Rx+Sy+Tz-d|
|
| template<typename TERMS> |
| | GaussianConditional (const TERMS &terms, size_t nrFrontals, const Vector &d, const SharedDiagonal &sigmas=SharedDiagonal()) |
| | Constructor with arbitrary number of frontals and parents.
|
| template<typename KEYS> |
| | GaussianConditional (const KEYS &keys, size_t nrFrontals, const VerticalBlockMatrix &augmentedMatrix, const SharedDiagonal &sigmas=SharedDiagonal()) |
| | Constructor with arbitrary number keys, and where the augmented matrix is given all together instead of in block terms.
|
|
| JacobianFactor (const GaussianFactor &gf) |
| | Convert from other GaussianFactor.
|
|
| JacobianFactor (const JacobianFactor &jf) |
| | Copy constructor.
|
|
| JacobianFactor (const HessianFactor &hf) |
| | Conversion from HessianFactor (does Cholesky to obtain Jacobian matrix).
|
|
| JacobianFactor () |
| | default constructor for I/O
|
|
| JacobianFactor (const Vector &b_in) |
| | Construct Null factor.
|
|
| JacobianFactor (Key i1, const Matrix &A1, const Vector &b, const SharedDiagonal &model=SharedDiagonal()) |
| | Construct unary factor.
|
|
| JacobianFactor (Key i1, const Matrix &A1, Key i2, const Matrix &A2, const Vector &b, const SharedDiagonal &model=SharedDiagonal()) |
| | Construct binary factor.
|
|
| JacobianFactor (Key i1, const Matrix &A1, Key i2, const Matrix &A2, Key i3, const Matrix &A3, const Vector &b, const SharedDiagonal &model=SharedDiagonal()) |
| | Construct ternary factor.
|
| template<typename TERMS> |
| | JacobianFactor (const TERMS &terms, const Vector &b, const SharedDiagonal &model=SharedDiagonal()) |
| | Construct an n-ary factor.
|
| template<typename KEYS> |
| | JacobianFactor (const KEYS &keys, const VerticalBlockMatrix &augmentedMatrix, const SharedDiagonal &sigmas=SharedDiagonal()) |
| | Constructor with arbitrary number keys, and where the augmented matrix is given all together instead of in block terms.
|
| | JacobianFactor (const GaussianFactorGraph &graph) |
| | Build a dense joint factor from all the factors in a factor graph.
|
| | JacobianFactor (const GaussianFactorGraph &graph, const VariableSlots &p_variableSlots) |
| | Build a dense joint factor from all the factors in a factor graph.
|
| | JacobianFactor (const GaussianFactorGraph &graph, const Ordering &ordering) |
| | Build a dense joint factor from all the factors in a factor graph.
|
| | JacobianFactor (const GaussianFactorGraph &graph, const Ordering &ordering, const VariableSlots &p_variableSlots) |
| | Build a dense joint factor from all the factors in a factor graph.
|
|
| ~JacobianFactor () override |
| | Virtual destructor.
|
| GaussianFactor::shared_ptr | clone () const override |
| | Clone this JacobianFactor.
|
| void | print (const std::string &s="", const KeyFormatter &formatter=DefaultKeyFormatter) const override |
| | print
|
| bool | equals (const GaussianFactor &lf, double tol=1e-9) const override |
| | Equals for testable.
|
|
Vector | unweighted_error (const VectorValues &c) const |
|
Vector | error_vector (const VectorValues &c) const |
| | (A*x-b)
|
| double | error (const VectorValues &c) const override |
| Matrix | augmentedInformation () const override |
| | Return the augmented information matrix represented by this GaussianFactor.
|
| Matrix | information () const override |
| | Return the non-augmented information matrix represented by this GaussianFactor.
|
| void | hessianDiagonalAdd (VectorValues &d) const override |
| | Add the current diagonal to a VectorValues instance.
|
| void | hessianDiagonal (double *d) const override |
| | Raw memory access version of hessianDiagonal.
|
| std::map< Key, Matrix > | hessianBlockDiagonal () const override |
| | Return the block diagonal of the Hessian for this factor.
|
| std::pair< Matrix, Vector > | jacobian () const override |
| | Returns (dense) A,b pair associated with factor, bakes in the weights.
|
|
std::pair< Matrix, Vector > | jacobianUnweighted () const |
| | Returns (dense) A,b pair associated with factor, does not bake in weights.
|
| Matrix | augmentedJacobian () const override |
| | Return (dense) matrix associated with factor.
|
| Matrix | augmentedJacobianUnweighted () const |
| | Return (dense) matrix associated with factor.
|
|
const VerticalBlockMatrix & | matrixObject () const |
| | Return the full augmented Jacobian matrix of this factor as a VerticalBlockMatrix object.
|
|
VerticalBlockMatrix & | matrixObject () |
| | Mutable access to the full augmented Jacobian matrix of this factor as a VerticalBlockMatrix object.
|
| GaussianFactor::shared_ptr | negate () const override |
| | Construct the corresponding anti-factor to negate information stored stored in this factor.
|
|
bool | isConstrained () const |
| | is noise model constrained ?
|
| DenseIndex | getDim (const_iterator variable) const override |
| | Return the dimension of the variable pointed to by the given key iterator todo: Remove this in favor of keeping track of dimensions with variables?
|
|
size_t | rows () const |
| | return the number of rows in the corresponding linear system
|
|
size_t | cols () const |
| | return the number of columns in the corresponding linear system
|
|
const SharedDiagonal & | get_model () const |
| | get a copy of model
|
|
SharedDiagonal & | get_model () |
| | get a copy of model (non-const version)
|
| const constBVector | getb () const |
| | Get a view of the r.h.s.
|
|
constABlock | getA (const_iterator variable) const |
| | Get a view of the A matrix for the variable pointed to by the given key iterator.
|
|
constABlock | getA () const |
| | Get a view of the A matrix, not weighted by noise.
|
| BVector | getb () |
| | Get a view of the r.h.s.
|
|
ABlock | getA (iterator variable) |
| | Get a view of the A matrix for the variable pointed to by the given key iterator (non-const version).
|
|
ABlock | getA () |
| | Get a view of the A matrix.
|
| void | updateHessian (const KeyVector &keys, SymmetricBlockMatrix *info) const override |
| | Update an information matrix by adding the information corresponding to this factor (used internally during elimination).
|
|
Vector | operator* (const VectorValues &x) const |
| | Return A*x.
|
| void | transposeMultiplyAdd (double alpha, const Vector &e, VectorValues &x) const |
| | x += alpha * A'*e.
|
| void | multiplyHessianAdd (double alpha, const VectorValues &x, VectorValues &y) const override |
| | y += alpha * A'*A*x
|
| void | multiplyHessianAdd (double alpha, const double *x, double *y, const std::vector< size_t > &accumulatedDims) const |
| | Raw memory access version of multiplyHessianAdd y += alpha * A'*A*x Requires the vector accumulatedDims to tell the dimension of each variable: e.g.: x0 has dim 3, x2 has dim 6, x3 has dim 2, then accumulatedDims is [0 3 9 11 13] NOTE: size of accumulatedDims is size of keys + 1!
|
| VectorValues | gradientAtZero () const override |
| | A'*b for Jacobian.
|
| void | gradientAtZero (double *d) const override |
| | A'*b for Jacobian (raw memory version).
|
| Vector | gradient (Key key, const VectorValues &x) const override |
| | Compute the gradient wrt a key at any values.
|
| JacobianFactor | whiten () const |
| | Return a whitened version of the factor, i.e.
|
|
std::pair< boost::shared_ptr< GaussianConditional >, shared_ptr > | eliminate (const Ordering &keys) |
| | Eliminate the requested variables.
|
|
void | setModel (bool anyConstrained, const Vector &sigmas) |
| | set noiseModel correctly
|
| boost::shared_ptr< GaussianConditional > | splitConditional (size_t nrFrontals) |
| | splits a pre-factorized factor into a conditional, and changes the current factor to be the remaining component.
|
| double | error (const HybridValues &c) const override |
| | All factor types need to implement an error function.
|
|
VectorValues | hessianDiagonal () const |
| | Using the base method.
|
|
| GaussianFactor () |
| | Default constructor creates empty factor.
|
| template<typename CONTAINER> |
| | GaussianFactor (const CONTAINER &keys) |
| | Construct from container of keys.
|
|
virtual | ~GaussianFactor () |
| | Destructor.
|
|
VectorValues | hessianDiagonal () const |
| | Return the diagonal of the Hessian for this factor.
|
|
virtual | ~Factor ()=default |
| | Default destructor.
|
|
bool | empty () const |
| | Whether the factor is empty (involves zero variables).
|
|
Key | front () const |
| | First key.
|
|
Key | back () const |
| | Last key.
|
|
const_iterator | find (Key key) const |
| | find
|
|
const KeyVector & | keys () const |
| | Access the factor's involved variable keys.
|
|
const_iterator | begin () const |
| | Iterator at beginning of involved variable keys.
|
|
const_iterator | end () const |
| | Iterator at end of involved variable keys.
|
| size_t | size () const |
| virtual void | printKeys (const std::string &s="Factor", const KeyFormatter &formatter=DefaultKeyFormatter) const |
| | print only keys
|
|
bool | equals (const This &other, double tol=1e-9) const |
| | check equality
|
| KeyVector & | keys () |
|
iterator | begin () |
| | Iterator at beginning of involved variable keys.
|
|
iterator | end () |
| | Iterator at end of involved variable keys.
|
|
void | print (const std::string &s="Conditional", const KeyFormatter &formatter=DefaultKeyFormatter) const |
| | print with optional formatter
|
|
bool | equals (const This &c, double tol=1e-9) const |
| | check equality
|
|
size_t | nrFrontals () const |
| | return the number of frontals
|
|
size_t | nrParents () const |
| | return the number of parents
|
|
Key | firstFrontalKey () const |
| | Convenience function to get the first frontal key.
|
|
Frontals | frontals () const |
| | return a view of the frontal keys
|
|
Parents | parents () const |
| | return a view of the parent keys
|
|
double | operator() (const HybridValues &x) const |
| | Evaluate probability density, sugar.
|
|
double | normalizationConstant () const |
| | Non-virtual, exponentiate logNormalizationConstant.
|
|
JacobianFactor::const_iterator | beginFrontals () const |
| | Iterator pointing to first frontal key.
|
|
JacobianFactor::const_iterator | endFrontals () const |
| | Iterator pointing past the last frontal key.
|
|
JacobianFactor::const_iterator | beginParents () const |
| | Iterator pointing to the first parent key.
|
|
JacobianFactor::const_iterator | endParents () const |
| | Iterator pointing past the last parent key.
|