class HestonCharacteristicExponent implements MartingaleCharacteristicExponent {

  public ComplexNumber[] getCharacteristicExponentAdjointDebug(final ComplexNumber u, final double t) {
    ComplexNumber[] res = new ComplexNumber[6];
    ComplexNumber[] w = forwardSweep(u, t);
    ComplexNumber[] wBar = backwardsSweep(w, t);

    res[0] = w[18];
    res[1] = subtract(multiply(_theta / _omega / _omega, wBar[0]), wBar[2]);
    res[2] = multiply(_kappa / _omega / _omega, wBar[0]);
    res[3] = multiply(w[17], wBar[18]);
    res[4] = multiply(1 / _omega, add(multiply(-2, w[0], wBar[0]), multiply(w[1], wBar[1]), multiply(2, w[4], wBar[4]), multiply(2, w[5], wBar[5]),
        multiply(-2, w[17], wBar[17])));
    res[5] = multiply(1 / _rho, w[1], wBar[1]);

    return res;
  }

  public  HestonCharacteristicExponent(final double kappa, final double theta, final double vol0, final double omega, final double rho);
  public  HestonCharacteristicExponent(final HestonModelData data);

}