/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.2
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package org.quantlib;

public class Fdm2dBlackScholesSolver {
  private transient long swigCPtr;
  private transient boolean swigCMemOwn;

  protected Fdm2dBlackScholesSolver(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(Fdm2dBlackScholesSolver obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void swigSetCMemOwn(boolean own) {
    swigCMemOwn = own;
  }

  @SuppressWarnings("deprecation")
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        QuantLibJNI.delete_Fdm2dBlackScholesSolver(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public Fdm2dBlackScholesSolver(GeneralizedBlackScholesProcess p1, GeneralizedBlackScholesProcess p2, double correlation, FdmSolverDesc solverDesc, FdmSchemeDesc schemeDesc, boolean localVol, double illegalLocalVolOverwrite) {
    this(QuantLibJNI.new_Fdm2dBlackScholesSolver__SWIG_0(GeneralizedBlackScholesProcess.getCPtr(p1), p1, GeneralizedBlackScholesProcess.getCPtr(p2), p2, correlation, FdmSolverDesc.getCPtr(solverDesc), solverDesc, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc, localVol, illegalLocalVolOverwrite), true);
  }

  public Fdm2dBlackScholesSolver(GeneralizedBlackScholesProcess p1, GeneralizedBlackScholesProcess p2, double correlation, FdmSolverDesc solverDesc, FdmSchemeDesc schemeDesc, boolean localVol) {
    this(QuantLibJNI.new_Fdm2dBlackScholesSolver__SWIG_1(GeneralizedBlackScholesProcess.getCPtr(p1), p1, GeneralizedBlackScholesProcess.getCPtr(p2), p2, correlation, FdmSolverDesc.getCPtr(solverDesc), solverDesc, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc, localVol), true);
  }

  public Fdm2dBlackScholesSolver(GeneralizedBlackScholesProcess p1, GeneralizedBlackScholesProcess p2, double correlation, FdmSolverDesc solverDesc, FdmSchemeDesc schemeDesc) {
    this(QuantLibJNI.new_Fdm2dBlackScholesSolver__SWIG_2(GeneralizedBlackScholesProcess.getCPtr(p1), p1, GeneralizedBlackScholesProcess.getCPtr(p2), p2, correlation, FdmSolverDesc.getCPtr(solverDesc), solverDesc, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc), true);
  }

  public Fdm2dBlackScholesSolver(GeneralizedBlackScholesProcess p1, GeneralizedBlackScholesProcess p2, double correlation, FdmSolverDesc solverDesc) {
    this(QuantLibJNI.new_Fdm2dBlackScholesSolver__SWIG_3(GeneralizedBlackScholesProcess.getCPtr(p1), p1, GeneralizedBlackScholesProcess.getCPtr(p2), p2, correlation, FdmSolverDesc.getCPtr(solverDesc), solverDesc), true);
  }

  public double valueAt(double x, double y) {
    return QuantLibJNI.Fdm2dBlackScholesSolver_valueAt(swigCPtr, this, x, y);
  }

  public double thetaAt(double x, double y) {
    return QuantLibJNI.Fdm2dBlackScholesSolver_thetaAt(swigCPtr, this, x, y);
  }

  public double deltaXat(double x, double y) {
    return QuantLibJNI.Fdm2dBlackScholesSolver_deltaXat(swigCPtr, this, x, y);
  }

  public double deltaYat(double x, double y) {
    return QuantLibJNI.Fdm2dBlackScholesSolver_deltaYat(swigCPtr, this, x, y);
  }

  public double gammaXat(double x, double y) {
    return QuantLibJNI.Fdm2dBlackScholesSolver_gammaXat(swigCPtr, this, x, y);
  }

  public double gammaYat(double x, double y) {
    return QuantLibJNI.Fdm2dBlackScholesSolver_gammaYat(swigCPtr, this, x, y);
  }

  public double gammaXYat(double x, double y) {
    return QuantLibJNI.Fdm2dBlackScholesSolver_gammaXYat(swigCPtr, this, x, y);
  }

}
