TooN::WLS< Size > Class Template Reference

#include <wls.h>

Inherited by TooN::IRLS< Size, Reweight >, and TooN::IRLS< Size, Reweight >.

List of all members.

Public Member Functions

 WLS ()
 Default constructor.
 WLS (double prior)
 Construct using a given regularisation prior.
void clear (double prior=0)
void add_prior (double val)
template<class Accessor>
void add_prior (const FixedVector< Size, Accessor > &v)
template<class Accessor>
void add_prior (const FixedMatrix< Size, Size, Accessor > &m)
template<class Accessor>
void add_df (double m, const FixedVector< Size, Accessor > &J, double weight=1)
template<int N, class Accessor1, class Accessor2, class Accessor3>
void add_df (const FixedVector< N, Accessor1 > &m, const FixedMatrix< Size, N, Accessor2 > &J, const FixedMatrix< N, N, Accessor3 > &invcov)
void compute ()
void operator+= (const WLS &meas)
Matrix< Size, Size,
RowMajor > & 
get_C_inv ()
 Returns the inverse covariance matrix.
const Matrix< Size,
Size, RowMajor > & 
get_C_inv () const
 Returns the inverse covariance matrix.
Vector< Size > & get_mu ()
const Vector< Size > & get_mu () const
Vector< Size > & get_vector ()
const Vector< Size > & get_vector () const
SVD< Size > & get_svd ()
const SVD< Size > & get_svd () const
 WLS ()
 Default constructor.
 WLS (double prior)
 Construct using a given regularisation prior.
void clear (double prior=0)
void add_prior (double val)
template<class Accessor>
void add_prior (const FixedVector< Size, Accessor > &v)
template<class Accessor>
void add_prior (const FixedMatrix< Size, Size, Accessor > &m)
template<class Accessor>
void add_df (double m, const FixedVector< Size, Accessor > &J, double weight=1)
template<int N, class Accessor1, class Accessor2, class Accessor3>
void add_df (const FixedVector< N, Accessor1 > &m, const FixedMatrix< Size, N, Accessor2 > &J, const FixedMatrix< N, N, Accessor3 > &invcov)
void compute ()
void operator+= (const WLS &meas)
Matrix< Size, Size,
RowMajor > & 
get_C_inv ()
 Returns the inverse covariance matrix.
const Matrix< Size,
Size, RowMajor > & 
get_C_inv () const
 Returns the inverse covariance matrix.
Vector< Size > & get_mu ()
const Vector< Size > & get_mu () const
Vector< Size > & get_vector ()
const Vector< Size > & get_vector () const
SVD< Size > & get_svd ()
const SVD< Size > & get_svd () const


Detailed Description

template<int Size = -1>
class TooN::WLS< Size >

Performs weighted least squares computation.
Parameters:
Size The number of dimensions in the system

Definition at line 38 of file wls.h.


Member Function Documentation

template<int Size = -1>
void TooN::WLS< Size >::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 48 of file wls.h.

References TooN::Identity().

Referenced by TooN::WLS<-1 >::WLS(), and TooN::WLS< Size >::WLS().

template<int Size = -1>
void TooN::WLS< Size >::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 58 of file wls.h.

template<int Size = -1>
template<class Accessor>
void TooN::WLS< Size >::add_prior ( const FixedVector< Size, 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 68 of file wls.h.

template<int Size = -1>
template<class Accessor>
void TooN::WLS< Size >::add_prior ( const FixedMatrix< Size, Size, 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 78 of file wls.h.

template<int Size = -1>
template<class Accessor>
void TooN::WLS< Size >::add_df ( double  m,
const FixedVector< Size, 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 87 of file wls.h.

template<int Size = -1>
template<int N, class Accessor1, class Accessor2, class Accessor3>
void TooN::WLS< Size >::add_df ( const FixedVector< N, Accessor1 > &  m,
const FixedMatrix< Size, 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 103 of file wls.h.

template<int Size = -1>
void TooN::WLS< Size >::operator+= ( const WLS< Size > &  meas  )  [inline]

Combine measurements from two WLS systems

Parameters:
meas The measurements to combine with

Definition at line 117 of file wls.h.

References TooN::WLS< Size >::my_C_inv, and TooN::WLS< Size >::my_vector.

template<int Size = -1>
void TooN::WLS< Size >::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 48 of file wls.h.

References TooN::Identity().

template<int Size = -1>
void TooN::WLS< Size >::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 58 of file wls.h.

template<int Size = -1>
template<class Accessor>
void TooN::WLS< Size >::add_prior ( const FixedVector< Size, 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 68 of file wls.h.

template<int Size = -1>
template<class Accessor>
void TooN::WLS< Size >::add_prior ( const FixedMatrix< Size, Size, 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 78 of file wls.h.

template<int Size = -1>
template<class Accessor>
void TooN::WLS< Size >::add_df ( double  m,
const FixedVector< Size, 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 87 of file wls.h.

template<int Size = -1>
template<int N, class Accessor1, class Accessor2, class Accessor3>
void TooN::WLS< Size >::add_df ( const FixedVector< N, Accessor1 > &  m,
const FixedMatrix< Size, 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 103 of file wls.h.

template<int Size = -1>
void TooN::WLS< Size >::operator+= ( const WLS< Size > &  meas  )  [inline]

Combine measurements from two WLS systems

Parameters:
meas The measurements to combine with

Definition at line 117 of file wls.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