Main MRPT website > C++ reference
MRPT logo
List of all members | Classes | Public Member Functions | Private Types | Private Attributes
mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf > Class Template Reference

Detailed Description

template<class HESS_Ap, class HESS_f, class HESS_Apf>
class mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >

A generic symbolic and numeric Schur-complement handler for builing reduced systems of equations.

Definition at line 17 of file schur.h.

#include <mrpt/srba/impl/schur.h>

Inheritance diagram for mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >:
Inheritance graph
[legend]

Classes

struct  TGradApSymbolicEntry
 
struct  THApSymbolicEntry
 Info for each block in HAp. More...
 
struct  TInfoPerHfBlock
 

Public Member Functions

 SchurComplement (HESS_Ap &_HAp, HESS_f &_Hf, HESS_Apf &_HApf, double *_minus_grad_Ap, double *_minus_grad_f)
 Constructor: builds the symbolic representations Note: HApf must be in row-compressed form; HAp & Hf in column-compressed form. More...
 
void realize_HAp_changed ()
 Must be called after the numerical values of the Hessian HAp change, typically after an optimization update which led to re-evaluation of the Jacobians around a new linearization point. More...
 
size_t getNumFeatures () const
 After calling numeric_build_reduced_system() one can get the stats on how many features are actually estimable. More...
 
size_t getNumFeaturesFullRank () const
 
void numeric_build_reduced_system (const double lambda)
 Replace the HAp matrix with its Schur reduced version. More...
 
void numeric_solve_for_features (double *in_deltas_Ap, double *out_deltas_feats)
 
bool was_ith_feature_invertible (const size_t i) const
 

Private Types

typedef Eigen::Map< Eigen::Matrix< double, HESS_Ap::matrix_t::RowsAtCompileTime, 1 > > vector_Ap_t
 
typedef Eigen::Map< Eigen::Matrix< double, HESS_f::matrix_t::RowsAtCompileTime, 1 > > vector_f_t
 
typedef mrpt::aligned_containers< TInfoPerHfBlock >::vector_t TInfoPerHfBlock_vector_t
 

Private Attributes

HESS_Ap HAp_original
 
HESS_Ap & HAp
 
HESS_f & Hf
 
HESS_Apf & HApf
 
double * minus_grad_Ap
 
double * minus_grad_f
 
const size_t nUnknowns_Ap
 
const size_t nUnknowns_f
 
size_t nHf_invertible_blocks
 for stats, the number of Hf diagonal blocks which are not rank-deficient. More...
 
TInfoPerHfBlock_vector_t m_Hf_blocks_info
 
std::deque< THApSymbolicEntrym_sym_HAp_reduce
 All the required operations needed to update HAp into its reduced system. More...
 
std::vector< TGradApSymbolicEntrym_sym_GradAp_reduce
 All the required operations needed to update Gradient of Ap into its reduced system. More...
 

Member Typedef Documentation

template<class HESS_Ap, class HESS_f, class HESS_Apf>
typedef mrpt::aligned_containers<TInfoPerHfBlock>::vector_t mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::TInfoPerHfBlock_vector_t
private

Definition at line 344 of file schur.h.

template<class HESS_Ap, class HESS_f, class HESS_Apf>
typedef Eigen::Map<Eigen::Matrix<double,HESS_Ap::matrix_t::RowsAtCompileTime,1> > mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::vector_Ap_t
private

Definition at line 329 of file schur.h.

template<class HESS_Ap, class HESS_f, class HESS_Apf>
typedef Eigen::Map<Eigen::Matrix<double,HESS_f::matrix_t::RowsAtCompileTime,1> > mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::vector_f_t
private

Definition at line 330 of file schur.h.

Constructor & Destructor Documentation

template<class HESS_Ap, class HESS_f, class HESS_Apf>
mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::SchurComplement ( HESS_Ap &  _HAp,
HESS_f &  _Hf,
HESS_Apf &  _HApf,
double *  _minus_grad_Ap,
double *  _minus_grad_f 
)
inline

Constructor: builds the symbolic representations Note: HApf must be in row-compressed form; HAp & Hf in column-compressed form.

Parameters
[in]_minus_grad_fCan be NULL if there're no observations of landmarks with unknown positions (may still be of LMs with known ones).

Definition at line 25 of file schur.h.

Member Function Documentation

template<class HESS_Ap, class HESS_f, class HESS_Apf>
size_t mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::getNumFeatures ( ) const
inline

After calling numeric_build_reduced_system() one can get the stats on how many features are actually estimable.

Definition at line 171 of file schur.h.

template<class HESS_Ap, class HESS_f, class HESS_Apf>
size_t mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::getNumFeaturesFullRank ( ) const
inline

Definition at line 172 of file schur.h.

template<class HESS_Ap, class HESS_f, class HESS_Apf>
void mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::numeric_build_reduced_system ( const double  lambda)
inline

Replace the HAp matrix with its Schur reduced version.

The lambda value is used to sum it to the diagonal of Hf (features), but it's NOT added to the output HAp. This is intentional, so the caller can add different lamdba values as needed in different trials if an ill conditioned matrix is found.

Definition at line 180 of file schur.h.

template<class HESS_Ap, class HESS_f, class HESS_Apf>
void mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::numeric_solve_for_features ( double *  in_deltas_Ap,
double *  out_deltas_feats 
)
inline

Definition at line 271 of file schur.h.

template<class HESS_Ap, class HESS_f, class HESS_Apf>
void mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::realize_HAp_changed ( )
inline

Must be called after the numerical values of the Hessian HAp change, typically after an optimization update which led to re-evaluation of the Jacobians around a new linearization point.

This method latches the current value of HAp for reseting it again if we later need to recompute the reduced Schur system for different values of lambda.

Definition at line 165 of file schur.h.

template<class HESS_Ap, class HESS_f, class HESS_Apf>
bool mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::was_ith_feature_invertible ( const size_t  i) const
inline

Member Data Documentation

template<class HESS_Ap, class HESS_f, class HESS_Apf>
HESS_Ap& mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::HAp
private
template<class HESS_Ap, class HESS_f, class HESS_Apf>
HESS_Ap mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::HAp_original
private
template<class HESS_Ap, class HESS_f, class HESS_Apf>
HESS_Apf& mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::HApf
private
template<class HESS_Ap, class HESS_f, class HESS_Apf>
HESS_f& mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::Hf
private
template<class HESS_Ap, class HESS_f, class HESS_Apf>
TInfoPerHfBlock_vector_t mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::m_Hf_blocks_info
private
template<class HESS_Ap, class HESS_f, class HESS_Apf>
std::vector<TGradApSymbolicEntry> mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::m_sym_GradAp_reduce
private
template<class HESS_Ap, class HESS_f, class HESS_Apf>
std::deque<THApSymbolicEntry> mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::m_sym_HAp_reduce
private
template<class HESS_Ap, class HESS_f, class HESS_Apf>
double* mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::minus_grad_Ap
private
template<class HESS_Ap, class HESS_f, class HESS_Apf>
double* mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::minus_grad_f
private
template<class HESS_Ap, class HESS_f, class HESS_Apf>
size_t mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::nHf_invertible_blocks
private
template<class HESS_Ap, class HESS_f, class HESS_Apf>
const size_t mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::nUnknowns_Ap
private
template<class HESS_Ap, class HESS_f, class HESS_Apf>
const size_t mrpt::srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::nUnknowns_f
private



Page generated by Doxygen 1.8.9.1 for MRPT 1.3.0 SVN: at Sun Sep 13 03:55:12 UTC 2015