/* ----------------------------------------------------------------------------
 * 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 FdmBlackScholesMesher extends Fdm1dMesher {
  private transient long swigCPtr;
  private transient boolean swigCMemOwnDerived;

  protected FdmBlackScholesMesher(long cPtr, boolean cMemoryOwn) {
    super(QuantLibJNI.FdmBlackScholesMesher_SWIGSmartPtrUpcast(cPtr), true);
    swigCMemOwnDerived = cMemoryOwn;
    swigCPtr = cPtr;
  }

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

  protected void swigSetCMemOwn(boolean own) {
    swigCMemOwnDerived = own;
    super.swigSetCMemOwn(own);
  }

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

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwnDerived) {
        swigCMemOwnDerived = false;
        QuantLibJNI.delete_FdmBlackScholesMesher(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public FdmBlackScholesMesher(long size, GeneralizedBlackScholesProcess process, double maturity, double strike, double xMinConstraint, double xMaxConstraint, double eps, double scaleFactor, DoublePair cPoint, DividendSchedule dividendSchedule, FdmQuantoHelper fdmQuantoHelper, double spotAdjustment) {
    this(QuantLibJNI.new_FdmBlackScholesMesher__SWIG_0(size, GeneralizedBlackScholesProcess.getCPtr(process), process, maturity, strike, xMinConstraint, xMaxConstraint, eps, scaleFactor, DoublePair.getCPtr(cPoint), cPoint, DividendSchedule.getCPtr(dividendSchedule), dividendSchedule, FdmQuantoHelper.getCPtr(fdmQuantoHelper), fdmQuantoHelper, spotAdjustment), true);
  }

  public FdmBlackScholesMesher(long size, GeneralizedBlackScholesProcess process, double maturity, double strike, double xMinConstraint, double xMaxConstraint, double eps, double scaleFactor, DoublePair cPoint, DividendSchedule dividendSchedule, FdmQuantoHelper fdmQuantoHelper) {
    this(QuantLibJNI.new_FdmBlackScholesMesher__SWIG_1(size, GeneralizedBlackScholesProcess.getCPtr(process), process, maturity, strike, xMinConstraint, xMaxConstraint, eps, scaleFactor, DoublePair.getCPtr(cPoint), cPoint, DividendSchedule.getCPtr(dividendSchedule), dividendSchedule, FdmQuantoHelper.getCPtr(fdmQuantoHelper), fdmQuantoHelper), true);
  }

  public FdmBlackScholesMesher(long size, GeneralizedBlackScholesProcess process, double maturity, double strike, double xMinConstraint, double xMaxConstraint, double eps, double scaleFactor, DoublePair cPoint, DividendSchedule dividendSchedule) {
    this(QuantLibJNI.new_FdmBlackScholesMesher__SWIG_2(size, GeneralizedBlackScholesProcess.getCPtr(process), process, maturity, strike, xMinConstraint, xMaxConstraint, eps, scaleFactor, DoublePair.getCPtr(cPoint), cPoint, DividendSchedule.getCPtr(dividendSchedule), dividendSchedule), true);
  }

  public FdmBlackScholesMesher(long size, GeneralizedBlackScholesProcess process, double maturity, double strike, double xMinConstraint, double xMaxConstraint, double eps, double scaleFactor, DoublePair cPoint) {
    this(QuantLibJNI.new_FdmBlackScholesMesher__SWIG_3(size, GeneralizedBlackScholesProcess.getCPtr(process), process, maturity, strike, xMinConstraint, xMaxConstraint, eps, scaleFactor, DoublePair.getCPtr(cPoint), cPoint), true);
  }

  public FdmBlackScholesMesher(long size, GeneralizedBlackScholesProcess process, double maturity, double strike, double xMinConstraint, double xMaxConstraint, double eps, double scaleFactor) {
    this(QuantLibJNI.new_FdmBlackScholesMesher__SWIG_4(size, GeneralizedBlackScholesProcess.getCPtr(process), process, maturity, strike, xMinConstraint, xMaxConstraint, eps, scaleFactor), true);
  }

  public FdmBlackScholesMesher(long size, GeneralizedBlackScholesProcess process, double maturity, double strike, double xMinConstraint, double xMaxConstraint, double eps) {
    this(QuantLibJNI.new_FdmBlackScholesMesher__SWIG_5(size, GeneralizedBlackScholesProcess.getCPtr(process), process, maturity, strike, xMinConstraint, xMaxConstraint, eps), true);
  }

  public FdmBlackScholesMesher(long size, GeneralizedBlackScholesProcess process, double maturity, double strike, double xMinConstraint, double xMaxConstraint) {
    this(QuantLibJNI.new_FdmBlackScholesMesher__SWIG_6(size, GeneralizedBlackScholesProcess.getCPtr(process), process, maturity, strike, xMinConstraint, xMaxConstraint), true);
  }

  public FdmBlackScholesMesher(long size, GeneralizedBlackScholesProcess process, double maturity, double strike, double xMinConstraint) {
    this(QuantLibJNI.new_FdmBlackScholesMesher__SWIG_7(size, GeneralizedBlackScholesProcess.getCPtr(process), process, maturity, strike, xMinConstraint), true);
  }

  public FdmBlackScholesMesher(long size, GeneralizedBlackScholesProcess process, double maturity, double strike) {
    this(QuantLibJNI.new_FdmBlackScholesMesher__SWIG_8(size, GeneralizedBlackScholesProcess.getCPtr(process), process, maturity, strike), true);
  }

  public static GeneralizedBlackScholesProcess processHelper(QuoteHandle s0, YieldTermStructureHandle rTS, YieldTermStructureHandle qTS, double vol) {
    long cPtr = QuantLibJNI.FdmBlackScholesMesher_processHelper(QuoteHandle.getCPtr(s0), s0, YieldTermStructureHandle.getCPtr(rTS), rTS, YieldTermStructureHandle.getCPtr(qTS), qTS, vol);
    return (cPtr == 0) ? null : new GeneralizedBlackScholesProcess(cPtr, true);
  }

}
