de.unihalle.informatik.MiToBo.tracking.multitarget.distributions.impl
Class MultiStateDistributionIndepGaussians<T extends Copyable<?>>

java.lang.Object
  extended by de.unihalle.informatik.MiToBo.tracking.multitarget.distributions.impl.MultiStateDistributionIndepGaussians<T>
Type Parameters:
T - class type of the multi-states' discrete variables
All Implemented Interfaces:
EvaluatableDistribution<AbstractMultiState<T>>, FirstOrderMoment<AbstractMultiState<T>>, IndependentlyEvaluatableDistribution<AbstractMultiState<T>>, IndependentSamplingDistribution<AbstractMultiState<T>>, SamplingDistribution<AbstractMultiState<T>>, SecondOrderCentralMoment<java.util.Vector<Jama.Matrix>>, Copyable<MultiStateDistributionIndepGaussians<T>>

public class MultiStateDistributionIndepGaussians<T extends Copyable<?>>
extends java.lang.Object
implements EvaluatableDistribution<AbstractMultiState<T>>, IndependentlyEvaluatableDistribution<AbstractMultiState<T>>, SamplingDistribution<AbstractMultiState<T>>, IndependentSamplingDistribution<AbstractMultiState<T>>, FirstOrderMoment<AbstractMultiState<T>>, SecondOrderCentralMoment<java.util.Vector<Jama.Matrix>>, Copyable<MultiStateDistributionIndepGaussians<T>>

A simple multi state density, which assumes independence of the single states with multivariate Gaussian noise.

Author:
Oliver Gress

Field Summary
protected  java.util.Vector<Jama.Matrix> covs
           
protected  java.util.Vector<GaussianDistribution> gaussians
           
protected  AbstractMultiState<T> mean
           
protected  java.util.Random rand
           
 
Constructor Summary
  MultiStateDistributionIndepGaussians(AbstractMultiState<T> mean, Jama.Matrix covariance, java.util.Random rand)
          Constructor with identical covariance matrices for all states
  MultiStateDistributionIndepGaussians(AbstractMultiState<T> mean, java.util.Vector<Jama.Matrix> covariance, java.util.Random rand)
          Constructor with different covariance matrix for each state
protected MultiStateDistributionIndepGaussians(int numOfIndepGaussians)
           
 
Method Summary
 int addIndepGaussian(GaussianDistribution stateCont, T stateDiscr)
          Add an independent Gaussian state distribution
 MultiStateDistributionIndepGaussians<T> copy()
           
 AbstractMultiState<T> drawSample()
          Generate a new sample from this density.
 AbstractMultiState<T> drawSample(int i, AbstractMultiState<T> X)
          Generate a new sample from this density by drawing only one independent variable for a given realization x.
 java.util.Vector<Jama.Matrix> getCovariance()
           
 AbstractMultiState<T> getMean()
           
 double p(AbstractMultiState<T> X)
          Evaluate p(X) at location x.
 double p(AbstractMultiState<T> X, int i)
          Evaluate p_i(X) at x_i
 void predict(LinearTransformGaussNoise predictor)
           
 void predictIndep(int i, LinearTransformGaussNoise predictor)
           
 int removeIndepGaussian(int i)
          Remove independent Gaussian state distribution (at index i)
 void update(LinearTransformGaussNoise projector, AbstractMultiState<T> observations)
           
 void updateIndep(int i, int j, LinearTransformGaussNoise projector, AbstractMultiState<T> observations)
          Update i-th Gaussian component with j-th observation
 void updateIndep(int i, LinearTransformGaussNoise projector, AbstractMultiState<T> observations)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

covs

protected java.util.Vector<Jama.Matrix> covs

gaussians

protected java.util.Vector<GaussianDistribution> gaussians

mean

protected AbstractMultiState<T extends Copyable<?>> mean

rand

protected java.util.Random rand
Constructor Detail

MultiStateDistributionIndepGaussians

public MultiStateDistributionIndepGaussians(AbstractMultiState<T> mean,
                                            Jama.Matrix covariance,
                                            java.util.Random rand)
Constructor with identical covariance matrices for all states


MultiStateDistributionIndepGaussians

public MultiStateDistributionIndepGaussians(AbstractMultiState<T> mean,
                                            java.util.Vector<Jama.Matrix> covariance,
                                            java.util.Random rand)
Constructor with different covariance matrix for each state


MultiStateDistributionIndepGaussians

protected MultiStateDistributionIndepGaussians(int numOfIndepGaussians)
Method Detail

addIndepGaussian

public int addIndepGaussian(GaussianDistribution stateCont,
                            T stateDiscr)
Add an independent Gaussian state distribution


copy

public MultiStateDistributionIndepGaussians<T> copy()
Specified by:
copy in interface Copyable<MultiStateDistributionIndepGaussians<T extends Copyable<?>>>

drawSample

public AbstractMultiState<T> drawSample()
Description copied from interface: SamplingDistribution
Generate a new sample from this density. This method should create a new object.

Specified by:
drawSample in interface SamplingDistribution<AbstractMultiState<T extends Copyable<?>>>
Returns:
new sample object

drawSample

public AbstractMultiState<T> drawSample(int i,
                                        AbstractMultiState<T> X)
Description copied from interface: IndependentSamplingDistribution
Generate a new sample from this density by drawing only one independent variable for a given realization x. This method should create a new object.

Specified by:
drawSample in interface IndependentSamplingDistribution<AbstractMultiState<T extends Copyable<?>>>
Parameters:
i - sample a new realization of the i-th element in x
X - realization of a random vector or finite set
Returns:
new sample object

getCovariance

public java.util.Vector<Jama.Matrix> getCovariance()
Specified by:
getCovariance in interface SecondOrderCentralMoment<java.util.Vector<Jama.Matrix>>

getMean

public AbstractMultiState<T> getMean()
Specified by:
getMean in interface FirstOrderMoment<AbstractMultiState<T extends Copyable<?>>>

p

public double p(AbstractMultiState<T> X)
Description copied from interface: EvaluatableDistribution
Evaluate p(X) at location x. P(X=x)

Specified by:
p in interface EvaluatableDistribution<AbstractMultiState<T extends Copyable<?>>>
Parameters:
X - realization of random variable X
Returns:
value of p(X) at x

p

public double p(AbstractMultiState<T> X,
                int i)
Description copied from interface: IndependentlyEvaluatableDistribution
Evaluate p_i(X) at x_i

Specified by:
p in interface IndependentlyEvaluatableDistribution<AbstractMultiState<T extends Copyable<?>>>
Parameters:
X - realization of random variable X
i - i-th element in x
Returns:
value of p_i(X_i) at x_i

predict

public void predict(LinearTransformGaussNoise predictor)

predictIndep

public void predictIndep(int i,
                         LinearTransformGaussNoise predictor)

removeIndepGaussian

public int removeIndepGaussian(int i)
Remove independent Gaussian state distribution (at index i)


update

public void update(LinearTransformGaussNoise projector,
                   AbstractMultiState<T> observations)

updateIndep

public void updateIndep(int i,
                        int j,
                        LinearTransformGaussNoise projector,
                        AbstractMultiState<T> observations)
Update i-th Gaussian component with j-th observation

Parameters:
i -
j -
projector -
observations -

updateIndep

public void updateIndep(int i,
                        LinearTransformGaussNoise projector,
                        AbstractMultiState<T> observations)