001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (https://www.swig.org).
003 * Version 4.1.1
004 *
005 * Do not make changes to this file unless you know what you are doing - modify
006 * the SWIG interface file instead.
007 * ----------------------------------------------------------------------------- */
008
009package org.quantlib;
010
011public class FdmBlackScholesMesher extends Fdm1dMesher implements org.quantlib.helpers.QuantLibJNIHelpers.AutoCloseable {
012  private transient long swigCPtr;
013  private transient boolean swigCMemOwnDerived;
014
015  protected FdmBlackScholesMesher(long cPtr, boolean cMemoryOwn) {
016    super(QuantLibJNI.FdmBlackScholesMesher_SWIGSmartPtrUpcast(cPtr), true);
017    swigCMemOwnDerived = cMemoryOwn;
018    swigCPtr = cPtr;
019  }
020
021  protected static long getCPtr(FdmBlackScholesMesher obj) {
022    return (obj == null) ? 0 : obj.swigCPtr;
023  }
024
025  protected void swigSetCMemOwn(boolean own) {
026    swigCMemOwnDerived = own;
027    super.swigSetCMemOwn(own);
028  }
029
030  @SuppressWarnings("deprecation")
031  protected void finalize() {
032    delete();
033  }
034
035  public synchronized void delete() {
036    if (swigCPtr != 0) {
037      if (swigCMemOwnDerived) {
038        swigCMemOwnDerived = false;
039        QuantLibJNI.delete_FdmBlackScholesMesher(swigCPtr);
040      }
041      swigCPtr = 0;
042    }
043    super.delete();
044  }
045
046  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) {
047    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);
048  }
049
050  public FdmBlackScholesMesher(long size, GeneralizedBlackScholesProcess process, double maturity, double strike, double xMinConstraint, double xMaxConstraint, double eps, double scaleFactor, DoublePair cPoint, DividendSchedule dividendSchedule, FdmQuantoHelper fdmQuantoHelper) {
051    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);
052  }
053
054  public FdmBlackScholesMesher(long size, GeneralizedBlackScholesProcess process, double maturity, double strike, double xMinConstraint, double xMaxConstraint, double eps, double scaleFactor, DoublePair cPoint, DividendSchedule dividendSchedule) {
055    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);
056  }
057
058  public FdmBlackScholesMesher(long size, GeneralizedBlackScholesProcess process, double maturity, double strike, double xMinConstraint, double xMaxConstraint, double eps, double scaleFactor, DoublePair cPoint) {
059    this(QuantLibJNI.new_FdmBlackScholesMesher__SWIG_3(size, GeneralizedBlackScholesProcess.getCPtr(process), process, maturity, strike, xMinConstraint, xMaxConstraint, eps, scaleFactor, DoublePair.getCPtr(cPoint), cPoint), true);
060  }
061
062  public FdmBlackScholesMesher(long size, GeneralizedBlackScholesProcess process, double maturity, double strike, double xMinConstraint, double xMaxConstraint, double eps, double scaleFactor) {
063    this(QuantLibJNI.new_FdmBlackScholesMesher__SWIG_4(size, GeneralizedBlackScholesProcess.getCPtr(process), process, maturity, strike, xMinConstraint, xMaxConstraint, eps, scaleFactor), true);
064  }
065
066  public FdmBlackScholesMesher(long size, GeneralizedBlackScholesProcess process, double maturity, double strike, double xMinConstraint, double xMaxConstraint, double eps) {
067    this(QuantLibJNI.new_FdmBlackScholesMesher__SWIG_5(size, GeneralizedBlackScholesProcess.getCPtr(process), process, maturity, strike, xMinConstraint, xMaxConstraint, eps), true);
068  }
069
070  public FdmBlackScholesMesher(long size, GeneralizedBlackScholesProcess process, double maturity, double strike, double xMinConstraint, double xMaxConstraint) {
071    this(QuantLibJNI.new_FdmBlackScholesMesher__SWIG_6(size, GeneralizedBlackScholesProcess.getCPtr(process), process, maturity, strike, xMinConstraint, xMaxConstraint), true);
072  }
073
074  public FdmBlackScholesMesher(long size, GeneralizedBlackScholesProcess process, double maturity, double strike, double xMinConstraint) {
075    this(QuantLibJNI.new_FdmBlackScholesMesher__SWIG_7(size, GeneralizedBlackScholesProcess.getCPtr(process), process, maturity, strike, xMinConstraint), true);
076  }
077
078  public FdmBlackScholesMesher(long size, GeneralizedBlackScholesProcess process, double maturity, double strike) {
079    this(QuantLibJNI.new_FdmBlackScholesMesher__SWIG_8(size, GeneralizedBlackScholesProcess.getCPtr(process), process, maturity, strike), true);
080  }
081
082  public static GeneralizedBlackScholesProcess processHelper(QuoteHandle s0, YieldTermStructureHandle rTS, YieldTermStructureHandle qTS, double vol) {
083    long cPtr = QuantLibJNI.FdmBlackScholesMesher_processHelper(QuoteHandle.getCPtr(s0), s0, YieldTermStructureHandle.getCPtr(rTS), rTS, YieldTermStructureHandle.getCPtr(qTS), qTS, vol);
084    return (cPtr == 0) ? null : new GeneralizedBlackScholesProcess(cPtr, true);
085  }
086
087}