javaslam.filter
Class Linearization

java.lang.Object
  |
  +--javaslam.filter.Linearization
Direct Known Subclasses:
ExtendedTransformation, UnscentedTransformation

public abstract class Linearization
extends Object

A linear-Gaussian approximation to a nonlinear vector-valued function of Gaussian-distributed inputs.

The inputs to a linearization are:

The linearization is an affine-Gaussian approximation g to f where
g(x) = a + B x + w
where a is a k-by-1 vector (the constant term), B is a k-by-n matrix (the linear coefficient) and w is an independent white noise vector (of dimension k) with covariance G. The outputs of the linearization are the parameters of the approximation g: a, B, and G.


Field Summary
protected  Matrix a
          The constant term in the affine-Gaussian approximation g(x) = a + B x + w
protected  Matrix B
          The linear coefficient in the affine-Gaussian approximation g(x) = a + B x + w
protected  Matrix G
          The covariance of the white noise variable w in the affine-Gaussian approximation g(x) = a + B x + w
protected  int k
          The dimension of the output vector.
protected  int m
          The sum dimension of the noise vector.
protected  int n
          The sum dimension of the input vector.
protected  Gaussian q
          A Gaussian distribution (in the moment parameterization) that approximates p(x, v, y).
protected  ListSet vSet
          A list of random variables representing the noise inputs of the function.
protected  ListSet xSet
          A list of random variables representing the inputs of the function.
protected  Variable y
          A random variable representing the output of the function.
protected  ListSet ySet
          A list set containing only y (for convenience).
 
Constructor Summary
Linearization(NoisyVectorFunction f, Gaussian px)
          Constructor.
 
Method Summary
 Matrix getCoefficient()
          Returns the linear coefficient B in the affine-Gaussian approximation g(x) = a + B x + w
 Matrix getCoefficient(Variable u)
          Returns the submatrix of B in the affine-Gaussian approximation g(x) = a + B x + w that corresponds to the subvariable u of x.
 Matrix getConstantTerm()
          Returns the constant term in the affine-Gaussian approximation g(x) = a + B x + w
 Gaussian getDistribution()
          Returns a Gaussian approximation of the distribution over the function's inputs and output.
 Matrix getNoiseCovariance()
          Returns the covariance matrix of the noise term w in the affine-Gaussian approximation g(x) = a + B x + w
 Variable getOutputVariable()
          Returns the variable representing the output of the random function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

y

protected Variable y
A random variable representing the output of the function.


k

protected int k
The dimension of the output vector.


ySet

protected ListSet ySet
A list set containing only y (for convenience).


xSet

protected ListSet xSet
A list of random variables representing the inputs of the function. The actual input, x, is the vertical concatenation of these column vectors in the order specified by this list.


n

protected int n
The sum dimension of the input vector.


vSet

protected ListSet vSet
A list of random variables representing the noise inputs of the function. The actual input, v, is the vertical concatenation of these column vectors in the order specified by this list.


m

protected int m
The sum dimension of the noise vector.


q

protected Gaussian q
A Gaussian distribution (in the moment parameterization) that approximates p(x, v, y).


a

protected Matrix a
The constant term in the affine-Gaussian approximation
g(x) = a + B x + w


B

protected Matrix B
The linear coefficient in the affine-Gaussian approximation
g(x) = a + B x + w


G

protected Matrix G
The covariance of the white noise variable w in the affine-Gaussian approximation
g(x) = a + B x + w

Constructor Detail

Linearization

public Linearization(NoisyVectorFunction f,
                     Gaussian px)
Constructor.

Parameters:
f - a vector function that takes a (n + m)-by-1 vector as input and returns a k-by-1 vector; the function's input is x stacked on top of v
px - a Gaussian distribution (in the moment parameterization) over the n-by-1 vector x (which can be partitioned into several sub-variables)
Throws:
IllegalArgumentException - if the sum dimension of px and pv does not match the input dimension of f
Method Detail

getDistribution

public Gaussian getDistribution()
Returns a Gaussian approximation of the distribution over the function's inputs and output.

Returns:
a Gaussian approximation of the distribution over the function's inputs and output

getOutputVariable

public Variable getOutputVariable()
Returns the variable representing the output of the random function.


getConstantTerm

public Matrix getConstantTerm()
Returns the constant term in the affine-Gaussian approximation
g(x) = a + B x + w

Returns:
the constant term a, a column vector with k elements

getCoefficient

public Matrix getCoefficient()
Returns the linear coefficient B in the affine-Gaussian approximation
g(x) = a + B x + w

Returns:
the linear coefficient B

getCoefficient

public Matrix getCoefficient(Variable u)
Returns the submatrix of B in the affine-Gaussian approximation
g(x) = a + B x + w
that corresponds to the subvariable u of x.

Parameters:
u - a subvariable of x
Returns:
the subblock of B corresponding to v

getNoiseCovariance

public Matrix getNoiseCovariance()
Returns the covariance matrix of the noise term w in the affine-Gaussian approximation
g(x) = a + B x + w

Returns:
the k-by-k covariance matrix of w