javaslam.filter
Class LinearGaussianFunction

java.lang.Object
  |
  +--javaslam.filter.LinearGaussianFunction
All Implemented Interfaces:
ExtendedVectorFunction, NoisyVectorFunction, VectorFunction

public class LinearGaussianFunction
extends Object
implements NoisyVectorFunction, ExtendedVectorFunction

A vector-valued function that takes a vector input, the bottom part of which is a white noise vector. In particular, if dim is the result of calling Gaussian.getDimension() on the Gaussian getNoiseModel(), then elements VectorFunction.getInputDim() - dim through VectorFunction.getInputDim() - 1 of the input vector are the noise variables.


Field Summary
protected  Matrix A
          The linear coefficient.
protected  Gaussian q
          The noise model.
 
Constructor Summary
LinearGaussianFunction(Matrix A, Gaussian q)
          Constructor.
 
Method Summary
 double[] evaluate(double[] input)
          Evaluates this function at the supplied input.
 int getInputDim()
          Returns the input dimension of this function.
 Gaussian getNoiseModel()
          Returns the Gaussian distribution over the noise input.
 int getOutputDim()
          Returns the output dimension of this function.
 double[][] jacobian(double[] input)
          Evaluates the Jacobian of this function at the supplied input.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

A

protected Matrix A
The linear coefficient.


q

protected Gaussian q
The noise model.

Constructor Detail

LinearGaussianFunction

public LinearGaussianFunction(Matrix A,
                              Gaussian q)
Constructor.

Parameters:
A - the linear coefficient
q - a Gaussian noise model (in moment form) that has as many dimensions as A has columns
Method Detail

getInputDim

public int getInputDim()
Returns the input dimension of this function.

Specified by:
getInputDim in interface VectorFunction

getOutputDim

public int getOutputDim()
Returns the output dimension of this function.

Specified by:
getOutputDim in interface VectorFunction

evaluate

public double[] evaluate(double[] input)
Evaluates this function at the supplied input.

Specified by:
evaluate in interface VectorFunction
Parameters:
input - an array with getInputDim() elements
Returns:
an array with getOutputDim() elements

getNoiseModel

public Gaussian getNoiseModel()
Returns the Gaussian distribution over the noise input.

Specified by:
getNoiseModel in interface NoisyVectorFunction
Returns:
the Gaussian distribution over the noise input

jacobian

public double[][] jacobian(double[] input)
Evaluates the Jacobian of this function at the supplied input.

Specified by:
jacobian in interface ExtendedVectorFunction
Parameters:
input - a vector with getInputDim() elements
Returns:
a matrix with getOutputDim() rows and getInputDim() columns; if y = f(x) then element (i, j) is the partial derivative of yi with respect to xj at input