Imp
[using it]
Interface Manipulation Package v4.0 (2008-06-25) a-projector ©copyright Author


imp.estimator
Class Constraint

java.lang.Object
  extended by imp.estimator.Constraint
Direct Known Subclasses:
Model

public abstract class Constraint
extends Object

Defines a local solver of a set of constraints.


Constructor Summary
Constraint(double step)
           
Constraint(double step, double[] scales)
          Constructs a vectorial constraint of the form c(x) = 0.
 
Method Summary
abstract  double[] c(double[] x)
          Defines the constraint c(x) = 0.
 double[][] C(double[] x)
          Defines the gradients of the constraint C(x) = d c(x) / d x.
 double[] solve(double[] x0)
          Returns the local solution of the constraint so that ||x-x0|| is minimal with c(x) = 0.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Constraint

public Constraint(double step)

Constraint

public Constraint(double step,
                  double[] scales)
Constructs a vectorial constraint of the form c(x) = 0.

Parameters:
step - Minimal distance between two distinguishable points.
scales - Vector component scales, default is 1 (uniform precision).
Method Detail

c

public abstract double[] c(double[] x)
Defines the constraint c(x) = 0.


C

public double[][] C(double[] x)
Defines the gradients of the constraint C(x) = d c(x) / d x.
The default implementation is a numerical gradient calculation but an analytic evaluation is to be preferred.


solve

public double[] solve(double[] x0)
Returns the local solution of the constraint so that ||x-x0|| is minimal with c(x) = 0.
The solution x is the projection of x0 onto the manifold defined by the implicit constraints c(x) = 0.
It is iteratively solved by the series x_(n+1) = p(x_n) where x_(n+1) is the projection of x0 on the tangent linear manifold defined by: C x = d with C = d c(x_n) / d x and d = C x_n - c(x_n).
This is known to converge, at a quadratic rate, almost everywhere for convex manifold or at least locally for any regular manifold, while it converges in one step for linear manifold (contrary to Newton's like methods).
Convergence is reinforced by considering x_(n+1) <- (x_n + x_(n+1))/2 until either ||c(x_(n+1))|| decreases or x_n = x_(n+1) up to the parameter precision, which terminates the estimation.