motris.algorithm
Class OFEAdaption

java.lang.Object
  extended bymotris.data.Description
      extended byparameter.ParameterizedObjectAdaptor
          extended bymotris.algorithm.Algorithm
              extended bymotris.algorithm.OFEAdaption
All Implemented Interfaces:
MinimizationProblem, ParameterizedObject

public class OFEAdaption
extends Algorithm
implements MinimizationProblem

A combination of OF and EE adaption (currently ONLY working for Vehicle tracking!!).

Author:
preuter

Nested Class Summary
 
Nested classes inherited from class parameter.ParameterizedObject
ParameterizedObject.ParameterChangedListener, ParameterizedObject.ParameterizedObjectManager
 
Field Summary
(package private)  int DEBUGMODE
           
(package private)  EdgeElementAdaption ee
           
(package private)  EMContourMinimizer em
           
(package private)  OFAdaption of
           
(package private)  boolean useEMCO_not_EEAA
           
 
Fields inherited from class motris.algorithm.Algorithm
dataManager, experiment
 
Fields inherited from class parameter.ParameterizedObjectAdaptor
parameterChangedNotifyList
 
Fields inherited from class motris.data.Description
 
Constructor Summary
OFEAdaption(Experiment _ex, OFAdaption _of, EdgeElementAdaption _ee, EMContourMinimizer _em)
           
 
Method Summary
 double calculateResidual(DoubleMatrix apCovariance, DoubleVector Gradient, DoubleMatrix[] Hessian)
          Compute Residual, Gradient and Hessian Matrix of the Problem to be minimzed at the current position.
 ParameterSet getParameters()
          Get a Vector of Strings with a description of each Parameter
 JSci.maths.DoubleSquareMatrix getPredictionMeasureCovariance(int matrixDimension)
           
 double getSecondaryResidual()
          compare these secondary residualsafter each scale and only accept the changes of that scale if the secondary residual decreased
 State getState()
           
 boolean isDisplacementBigEnough(DoubleVector stateVectorDelta)
           
 boolean setParameters(ParameterSet _params)
          Set Parameters of this class
 boolean setScale(int scale)
          Set Scale.
 
Methods inherited from class motris.algorithm.Algorithm
deregisterLayers
 
Methods inherited from class parameter.ParameterizedObjectAdaptor
addParameterChangedListener, finalize, fireParameterChanged, parameterEdited, removeParameterChangedListener
 
Methods inherited from class motris.data.Description
getDescription, getIdentifier, getName, setDescription, setIdentifier, setName
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUGMODE

int DEBUGMODE

of

OFAdaption of

ee

EdgeElementAdaption ee

em

EMContourMinimizer em

useEMCO_not_EEAA

boolean useEMCO_not_EEAA
Constructor Detail

OFEAdaption

public OFEAdaption(Experiment _ex,
                   OFAdaption _of,
                   EdgeElementAdaption _ee,
                   EMContourMinimizer _em)
Method Detail

calculateResidual

public double calculateResidual(DoubleMatrix apCovariance,
                                DoubleVector Gradient,
                                DoubleMatrix[] Hessian)
Description copied from interface: MinimizationProblem
Compute Residual, Gradient and Hessian Matrix of the Problem to be minimzed at the current position. In addition to the function arguments, the State x at which Lambda is to be evaluated (current position) has to be supplied as well. This is not included in the class signature because this supply is done by getState().setFromStateVector().

Specified by:
calculateResidual in interface MinimizationProblem
Parameters:
apCovariance - a-priori-State-Covariance P (input)
Gradient - Gradient of Lambda (result)
Hessian - 1-Dimension Vector with Hesse Matrix of Lambda (result). This needs to be an array s.t. java can _create_ a new Variable instead of just assigning values. For the EM Contour algorithm, the matrix can grow quite big so assigning is too slow.
Returns:
residual Lambda(x).

getParameters

public ParameterSet getParameters()
Description copied from interface: ParameterizedObject
Get a Vector of Strings with a description of each Parameter

Specified by:
getParameters in interface ParameterizedObject
Overrides:
getParameters in class ParameterizedObjectAdaptor

setParameters

public boolean setParameters(ParameterSet _params)
Description copied from interface: ParameterizedObject
Set Parameters of this class

Specified by:
setParameters in interface ParameterizedObject
Overrides:
setParameters in class ParameterizedObjectAdaptor

getState

public State getState()
Specified by:
getState in interface MinimizationProblem

setScale

public boolean setScale(int scale)
Description copied from interface: MinimizationProblem
Set Scale. The scale is starting at 0 and increased as long as this function returns true.

Specified by:
setScale in interface MinimizationProblem
Parameters:
scale -

getSecondaryResidual

public double getSecondaryResidual()
Description copied from interface: MinimizationProblem
compare these secondary residualsafter each scale and only accept the changes of that scale if the secondary residual decreased

Specified by:
getSecondaryResidual in interface MinimizationProblem

isDisplacementBigEnough

public boolean isDisplacementBigEnough(DoubleVector stateVectorDelta)
Specified by:
isDisplacementBigEnough in interface MinimizationProblem

getPredictionMeasureCovariance

public JSci.maths.DoubleSquareMatrix getPredictionMeasureCovariance(int matrixDimension)
Specified by:
getPredictionMeasureCovariance in interface MinimizationProblem