TooN::WLSCholesky<-1 > Class Template Reference

#include <wls_cholesky.h>

List of all members.

Public Member Functions

 WLSCholesky ()
 Default constructor.
 WLSCholesky (double prior)
 Construct using a given regularisation prior.
 WLSCholesky (int Size, double prior=0.0)
 Construct with a given size and optional regularisation prior.
 WLSCholesky (const WLSCholesky &w)
void resize (int N)
 sets the size of the WLSCholesky object equalling the number of parameters to estimate
int size (void) const throw ()
 returns the size of the object
void clear (double prior=0)
void add_prior (double val)
template<class Accessor, int N>
void add_prior (double val, const FixedVector< N, Accessor > &pos)
template<class Accessor, int N>
void add_prior (const FixedVector< N, Accessor > &v)
template<class Accessor, int N>
void add_prior (const FixedMatrix< N, N, Accessor > &m)
template<class Accessor, int N>
void add_df (double m, const FixedVector< N, Accessor > &J, double weight=1)
template<class Accessor>
void add_df (double m, const DynamicVector< Accessor > &J, double weight=1)
template<int N, class Accessor1, class Accessor2, class Accessor3, int M>
void add_df (const FixedVector< N, Accessor1 > &m, const FixedMatrix< M, N, Accessor2 > &J, const FixedMatrix< N, N, Accessor3 > &invcov)
template<class Accessor1, class Accessor2, class Accessor3>
void add_df (const DynamicVector< Accessor1 > &m, const DynamicMatrix< Accessor2 > &J, const DynamicMatrix< Accessor3 > &invcov)
void compute ()
void operator+= (const WLSCholesky &meas)
void operator= (const WLSCholesky &w)
Matrix<-1,
-1, RowMajor > & 
get_C_inv ()
 Returns the inverse covariance matrix.
const Matrix<-1,
-1, RowMajor > & 
get_C_inv () const
 Returns the inverse covariance matrix.
Vector<-1 > & get_mu ()
const Vector<-1 > & get_mu () const
Vector<-1 > & get_vector ()
const Vector<-1 > & get_vector () const
double get_residual ()
void add_extra (double e)
double get_extra ()
 WLSCholesky ()
 Default constructor.
 WLSCholesky (double prior)
 Construct using a given regularisation prior.
 WLSCholesky (int Size, double prior=0.0)
 Construct with a given size and optional regularisation prior.
 WLSCholesky (const WLSCholesky &w)
void resize (int N)
 sets the size of the WLSCholesky object equalling the number of parameters to estimate
int size (void) const throw ()
 returns the size of the object
void clear (double prior=0)
void add_prior (double val)
template<class Accessor, int N>
void add_prior (double val, const FixedVector< N, Accessor > &pos)
template<class Accessor, int N>
void add_prior (const FixedVector< N, Accessor > &v)
template<class Accessor, int N>
void add_prior (const FixedMatrix< N, N, Accessor > &m)
template<class Accessor, int N>
void add_df (double m, const FixedVector< N, Accessor > &J, double weight=1)
template<class Accessor>
void add_df (double m, const DynamicVector< Accessor > &J, double weight=1)
template<int N, class Accessor1, class Accessor2, class Accessor3, int M>
void add_df (const FixedVector< N, Accessor1 > &m, const FixedMatrix< M, N, Accessor2 > &J, const FixedMatrix< N, N, Accessor3 > &invcov)
template<class Accessor1, class Accessor2, class Accessor3>
void add_df (const DynamicVector< Accessor1 > &m, const DynamicMatrix< Accessor2 > &J, const DynamicMatrix< Accessor3 > &invcov)
void compute ()
void operator+= (const WLSCholesky &meas)
void operator= (const WLSCholesky &w)
Matrix<-1,
-1, RowMajor > & 
get_C_inv ()
 Returns the inverse covariance matrix.
const Matrix<-1,
-1, RowMajor > & 
get_C_inv () const
 Returns the inverse covariance matrix.
Vector<-1 > & get_mu ()
const Vector<-1 > & get_mu () const
Vector<-1 > & get_vector ()
const Vector<-1 > & get_vector () const
double get_residual ()
void add_extra (double e)
double get_extra ()


Detailed Description

template<>
class TooN::WLSCholesky<-1 >

Performs weighted least squares using Cholesky decomposition and sparse JtJ. This is the specialisation for dynamically sized matrizes. Much faster (but less robust) than the standard WLS. Also stores the sum squares error and can compute the residual.
Parameters:
The number of parameters in the system

Definition at line 221 of file wls_cholesky.h.


Constructor & Destructor Documentation

TooN::WLSCholesky<-1 >::WLSCholesky ( const WLSCholesky<-1 > &  w  )  [inline]

Copy constructor

Parameters:
w The decomposition object to copy

Definition at line 234 of file wls_cholesky.h.

References TooN::WLSCholesky< Size >::my_C_inv, TooN::WLSCholesky< Size >::my_err, TooN::WLSCholesky< Size >::my_extra, and TooN::WLSCholesky< Size >::my_vector.

TooN::WLSCholesky<-1 >::WLSCholesky ( const WLSCholesky<-1 > &  w  )  [inline]

Copy constructor

Parameters:
w The decomposition object to copy

Definition at line 234 of file wls_cholesky.h.


Member Function Documentation

void TooN::WLSCholesky<-1 >::clear ( double  prior = 0  )  [inline]

Clear all the measurements and apply a constant regularisation term. Equates to a prior that says all the parameters are zero with $\sigma^2 = \frac{1}{\text{val}}$.

Parameters:
prior The strength of the prior

Definition at line 257 of file wls_cholesky.h.

References TooN::Identity().

void TooN::WLSCholesky<-1 >::add_prior ( double  val  )  [inline]

Applies a constant regularisation term. Equates to a prior that says all the parameters are zero with $\sigma^2 = \frac{1}{\text{val}}$.

Parameters:
val The strength of the prior

Definition at line 269 of file wls_cholesky.h.

template<class Accessor, int N>
void TooN::WLSCholesky<-1 >::add_prior ( double  val,
const FixedVector< N, Accessor > &  pos 
) [inline]

Applies a constant regularisation term about a non-zero postion Equates to a prior that says the parameters are equal to pos with $\sigma^2 = \frac{1}{\text{val}}$.

Parameters:
val The strength of the prior
pos The position

Definition at line 280 of file wls_cholesky.h.

template<class Accessor, int N>
void TooN::WLSCholesky<-1 >::add_prior ( const FixedVector< N, Accessor > &  v  )  [inline]

Applies a regularisation term with a different strength for each parameter value. Equates to a prior that says all the parameters are zero with $\sigma_i^2 = \frac{1}{\text{v}_i}$.

Parameters:
v The vector of priors

Definition at line 293 of file wls_cholesky.h.

template<class Accessor, int N>
void TooN::WLSCholesky<-1 >::add_prior ( const FixedMatrix< N, N, Accessor > &  m  )  [inline]

Applies a whole-matrix regularisation term. This is the same as adding the $m$ to the inverse covariance matrix.

Parameters:
m The inverse covariance matrix to add

Definition at line 304 of file wls_cholesky.h.

template<class Accessor, int N>
void TooN::WLSCholesky<-1 >::add_df ( double  m,
const FixedVector< N, Accessor > &  J,
double  weight = 1 
) [inline]

Add a single measurement

Parameters:
m The value of the measurement
J The Jacobian for the measurement $\frac{\partial\text{m}}{\partial\text{param}_i}$
weight The inverse variance of the measurement (default = 1)

Definition at line 314 of file wls_cholesky.h.

template<class Accessor>
void TooN::WLSCholesky<-1 >::add_df ( double  m,
const DynamicVector< Accessor > &  J,
double  weight = 1 
) [inline]

Add a single measurement

Parameters:
m The value of the measurement
J The Jacobian for the measurement $\frac{\partial\text{m}}{\partial\text{param}_i}$
weight The inverse variance of the measurement (default = 1)

Definition at line 331 of file wls_cholesky.h.

template<int N, class Accessor1, class Accessor2, class Accessor3, int M>
void TooN::WLSCholesky<-1 >::add_df ( const FixedVector< N, Accessor1 > &  m,
const FixedMatrix< M, N, Accessor2 > &  J,
const FixedMatrix< N, N, Accessor3 > &  invcov 
) [inline]

Add multiple measurements at once (much more efficiently)

Parameters:
N The number of measurements
m The measurements to add
J The Jacobian matrix $\frac{\partial\text{m}_i}{\partial\text{param}_j}$
invcov The inverse covariance of the measurement values

Definition at line 350 of file wls_cholesky.h.

template<class Accessor1, class Accessor2, class Accessor3>
void TooN::WLSCholesky<-1 >::add_df ( const DynamicVector< Accessor1 > &  m,
const DynamicMatrix< Accessor2 > &  J,
const DynamicMatrix< Accessor3 > &  invcov 
) [inline]

Add multiple measurements at once (much more efficiently)

Parameters:
N The number of measurements
m The measurements to add
J The Jacobian matrix $\frac{\partial\text{m}_i}{\partial\text{param}_j}$
invcov The inverse covariance of the measurement values

Definition at line 366 of file wls_cholesky.h.

void TooN::WLSCholesky<-1 >::operator+= ( const WLSCholesky<-1 > &  meas  )  [inline]

Combine measurements from two WLS systems

Parameters:
meas The measurements to combine with

Definition at line 406 of file wls_cholesky.h.

References TooN::WLSCholesky< Size >::my_C_inv, TooN::WLSCholesky< Size >::my_err, TooN::WLSCholesky< Size >::my_extra, and TooN::WLSCholesky< Size >::my_vector.

void TooN::WLSCholesky<-1 >::operator= ( const WLSCholesky<-1 > &  w  )  [inline]

Copy measurements from another WLS system

Parameters:
w The measurements to copy

Definition at line 416 of file wls_cholesky.h.

References TooN::WLSCholesky< Size >::my_C_inv, TooN::WLSCholesky< Size >::my_err, TooN::WLSCholesky< Size >::my_extra, and TooN::WLSCholesky< Size >::my_vector.

void TooN::WLSCholesky<-1 >::clear ( double  prior = 0  )  [inline]

Clear all the measurements and apply a constant regularisation term. Equates to a prior that says all the parameters are zero with $\sigma^2 = \frac{1}{\text{val}}$.

Parameters:
prior The strength of the prior

Definition at line 257 of file wls_cholesky.h.

References TooN::Identity().

void TooN::WLSCholesky<-1 >::add_prior ( double  val  )  [inline]

Applies a constant regularisation term. Equates to a prior that says all the parameters are zero with $\sigma^2 = \frac{1}{\text{val}}$.

Parameters:
val The strength of the prior

Definition at line 269 of file wls_cholesky.h.

template<class Accessor, int N>
void TooN::WLSCholesky<-1 >::add_prior ( double  val,
const FixedVector< N, Accessor > &  pos 
) [inline]

Applies a constant regularisation term about a non-zero postion Equates to a prior that says the parameters are equal to pos with $\sigma^2 = \frac{1}{\text{val}}$.

Parameters:
val The strength of the prior
pos The position

Definition at line 280 of file wls_cholesky.h.

template<class Accessor, int N>
void TooN::WLSCholesky<-1 >::add_prior ( const FixedVector< N, Accessor > &  v  )  [inline]

Applies a regularisation term with a different strength for each parameter value. Equates to a prior that says all the parameters are zero with $\sigma_i^2 = \frac{1}{\text{v}_i}$.

Parameters:
v The vector of priors

Definition at line 293 of file wls_cholesky.h.

template<class Accessor, int N>
void TooN::WLSCholesky<-1 >::add_prior ( const FixedMatrix< N, N, Accessor > &  m  )  [inline]

Applies a whole-matrix regularisation term. This is the same as adding the $m$ to the inverse covariance matrix.

Parameters:
m The inverse covariance matrix to add

Definition at line 304 of file wls_cholesky.h.

template<class Accessor, int N>
void TooN::WLSCholesky<-1 >::add_df ( double  m,
const FixedVector< N, Accessor > &  J,
double  weight = 1 
) [inline]

Add a single measurement

Parameters:
m The value of the measurement
J The Jacobian for the measurement $\frac{\partial\text{m}}{\partial\text{param}_i}$
weight The inverse variance of the measurement (default = 1)

Definition at line 314 of file wls_cholesky.h.

template<class Accessor>
void TooN::WLSCholesky<-1 >::add_df ( double  m,
const DynamicVector< Accessor > &  J,
double  weight = 1 
) [inline]

Add a single measurement

Parameters:
m The value of the measurement
J The Jacobian for the measurement $\frac{\partial\text{m}}{\partial\text{param}_i}$
weight The inverse variance of the measurement (default = 1)

Definition at line 331 of file wls_cholesky.h.

template<int N, class Accessor1, class Accessor2, class Accessor3, int M>
void TooN::WLSCholesky<-1 >::add_df ( const FixedVector< N, Accessor1 > &  m,
const FixedMatrix< M, N, Accessor2 > &  J,
const FixedMatrix< N, N, Accessor3 > &  invcov 
) [inline]

Add multiple measurements at once (much more efficiently)

Parameters:
N The number of measurements
m The measurements to add
J The Jacobian matrix $\frac{\partial\text{m}_i}{\partial\text{param}_j}$
invcov The inverse covariance of the measurement values

Definition at line 350 of file wls_cholesky.h.

template<class Accessor1, class Accessor2, class Accessor3>
void TooN::WLSCholesky<-1 >::add_df ( const DynamicVector< Accessor1 > &  m,
const DynamicMatrix< Accessor2 > &  J,
const DynamicMatrix< Accessor3 > &  invcov 
) [inline]

Add multiple measurements at once (much more efficiently)

Parameters:
N The number of measurements
m The measurements to add
J The Jacobian matrix $\frac{\partial\text{m}_i}{\partial\text{param}_j}$
invcov The inverse covariance of the measurement values

Definition at line 366 of file wls_cholesky.h.

void TooN::WLSCholesky<-1 >::operator+= ( const WLSCholesky<-1 > &  meas  )  [inline]

Combine measurements from two WLS systems

Parameters:
meas The measurements to combine with

Definition at line 406 of file wls_cholesky.h.

void TooN::WLSCholesky<-1 >::operator= ( const WLSCholesky<-1 > &  w  )  [inline]

Copy measurements from another WLS system

Parameters:
w The measurements to copy

Definition at line 416 of file wls_cholesky.h.


The documentation for this class was generated from the following files:
Generated on Fri Feb 22 18:26:57 2008 for QVision by  doxygen 1.5.3