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

namespace QuantLib {

public class Fdm2dBlackScholesSolver : global::System.IDisposable {
  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
  private bool swigCMemOwnBase;

  internal Fdm2dBlackScholesSolver(global::System.IntPtr cPtr, bool cMemoryOwn) {
    swigCMemOwnBase = cMemoryOwn;
    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
  }

  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Fdm2dBlackScholesSolver obj) {
    return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
  }

  ~Fdm2dBlackScholesSolver() {
    Dispose(false);
  }

  public void Dispose() {
    Dispose(true);
    global::System.GC.SuppressFinalize(this);
  }

  protected virtual void Dispose(bool disposing) {
    lock(this) {
      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
        if (swigCMemOwnBase) {
          swigCMemOwnBase = false;
          NQuantLibcPINVOKE.delete_Fdm2dBlackScholesSolver(swigCPtr);
        }
        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
      }
    }
  }

  public Fdm2dBlackScholesSolver(GeneralizedBlackScholesProcess p1, GeneralizedBlackScholesProcess p2, double correlation, FdmSolverDesc solverDesc, FdmSchemeDesc schemeDesc, bool localVol, double illegalLocalVolOverwrite) : this(NQuantLibcPINVOKE.new_Fdm2dBlackScholesSolver__SWIG_0(GeneralizedBlackScholesProcess.getCPtr(p1), GeneralizedBlackScholesProcess.getCPtr(p2), correlation, FdmSolverDesc.getCPtr(solverDesc), FdmSchemeDesc.getCPtr(schemeDesc), localVol, illegalLocalVolOverwrite), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public Fdm2dBlackScholesSolver(GeneralizedBlackScholesProcess p1, GeneralizedBlackScholesProcess p2, double correlation, FdmSolverDesc solverDesc, FdmSchemeDesc schemeDesc, bool localVol) : this(NQuantLibcPINVOKE.new_Fdm2dBlackScholesSolver__SWIG_1(GeneralizedBlackScholesProcess.getCPtr(p1), GeneralizedBlackScholesProcess.getCPtr(p2), correlation, FdmSolverDesc.getCPtr(solverDesc), FdmSchemeDesc.getCPtr(schemeDesc), localVol), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public Fdm2dBlackScholesSolver(GeneralizedBlackScholesProcess p1, GeneralizedBlackScholesProcess p2, double correlation, FdmSolverDesc solverDesc, FdmSchemeDesc schemeDesc) : this(NQuantLibcPINVOKE.new_Fdm2dBlackScholesSolver__SWIG_2(GeneralizedBlackScholesProcess.getCPtr(p1), GeneralizedBlackScholesProcess.getCPtr(p2), correlation, FdmSolverDesc.getCPtr(solverDesc), FdmSchemeDesc.getCPtr(schemeDesc)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public Fdm2dBlackScholesSolver(GeneralizedBlackScholesProcess p1, GeneralizedBlackScholesProcess p2, double correlation, FdmSolverDesc solverDesc) : this(NQuantLibcPINVOKE.new_Fdm2dBlackScholesSolver__SWIG_3(GeneralizedBlackScholesProcess.getCPtr(p1), GeneralizedBlackScholesProcess.getCPtr(p2), correlation, FdmSolverDesc.getCPtr(solverDesc)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public double valueAt(double x, double y) {
    double ret = NQuantLibcPINVOKE.Fdm2dBlackScholesSolver_valueAt(swigCPtr, x, y);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double thetaAt(double x, double y) {
    double ret = NQuantLibcPINVOKE.Fdm2dBlackScholesSolver_thetaAt(swigCPtr, x, y);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double deltaXat(double x, double y) {
    double ret = NQuantLibcPINVOKE.Fdm2dBlackScholesSolver_deltaXat(swigCPtr, x, y);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double deltaYat(double x, double y) {
    double ret = NQuantLibcPINVOKE.Fdm2dBlackScholesSolver_deltaYat(swigCPtr, x, y);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double gammaXat(double x, double y) {
    double ret = NQuantLibcPINVOKE.Fdm2dBlackScholesSolver_gammaXat(swigCPtr, x, y);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double gammaYat(double x, double y) {
    double ret = NQuantLibcPINVOKE.Fdm2dBlackScholesSolver_gammaYat(swigCPtr, x, y);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double gammaXYat(double x, double y) {
    double ret = NQuantLibcPINVOKE.Fdm2dBlackScholesSolver_gammaXYat(swigCPtr, x, y);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}

}
