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 MCPRAmericanEngine extends PricingEngine implements org.quantlib.helpers.QuantLibJNIHelpers.AutoCloseable {
012  private transient long swigCPtr;
013  private transient boolean swigCMemOwnDerived;
014
015  protected MCPRAmericanEngine(long cPtr, boolean cMemoryOwn) {
016    super(QuantLibJNI.MCPRAmericanEngine_SWIGSmartPtrUpcast(cPtr), true);
017    swigCMemOwnDerived = cMemoryOwn;
018    swigCPtr = cPtr;
019  }
020
021  protected static long getCPtr(MCPRAmericanEngine 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_MCPRAmericanEngine(swigCPtr);
040      }
041      swigCPtr = 0;
042    }
043    super.delete();
044  }
045
046  public MCPRAmericanEngine(GeneralizedBlackScholesProcess process, int timeSteps, int timeStepsPerYear, boolean antitheticVariate, boolean controlVariate, int requiredSamples, double requiredTolerance, int maxSamples, int seed, int polynomOrder, LsmBasisSystem.PolynomialType polynomType, int nCalibrationSamples, OptionalBool antitheticVariateCalibration, long seedCalibration) {
047    this(QuantLibJNI.new_MCPRAmericanEngine__SWIG_0(GeneralizedBlackScholesProcess.getCPtr(process), process, timeSteps, timeStepsPerYear, antitheticVariate, controlVariate, requiredSamples, requiredTolerance, maxSamples, seed, polynomOrder, polynomType.swigValue(), nCalibrationSamples, OptionalBool.getCPtr(antitheticVariateCalibration), antitheticVariateCalibration, seedCalibration), true);
048  }
049
050  public MCPRAmericanEngine(GeneralizedBlackScholesProcess process, int timeSteps, int timeStepsPerYear, boolean antitheticVariate, boolean controlVariate, int requiredSamples, double requiredTolerance, int maxSamples, int seed, int polynomOrder, LsmBasisSystem.PolynomialType polynomType, int nCalibrationSamples, OptionalBool antitheticVariateCalibration) {
051    this(QuantLibJNI.new_MCPRAmericanEngine__SWIG_1(GeneralizedBlackScholesProcess.getCPtr(process), process, timeSteps, timeStepsPerYear, antitheticVariate, controlVariate, requiredSamples, requiredTolerance, maxSamples, seed, polynomOrder, polynomType.swigValue(), nCalibrationSamples, OptionalBool.getCPtr(antitheticVariateCalibration), antitheticVariateCalibration), true);
052  }
053
054  public MCPRAmericanEngine(GeneralizedBlackScholesProcess process, int timeSteps, int timeStepsPerYear, boolean antitheticVariate, boolean controlVariate, int requiredSamples, double requiredTolerance, int maxSamples, int seed, int polynomOrder, LsmBasisSystem.PolynomialType polynomType, int nCalibrationSamples) {
055    this(QuantLibJNI.new_MCPRAmericanEngine__SWIG_2(GeneralizedBlackScholesProcess.getCPtr(process), process, timeSteps, timeStepsPerYear, antitheticVariate, controlVariate, requiredSamples, requiredTolerance, maxSamples, seed, polynomOrder, polynomType.swigValue(), nCalibrationSamples), true);
056  }
057
058  public MCPRAmericanEngine(GeneralizedBlackScholesProcess process, int timeSteps, int timeStepsPerYear, boolean antitheticVariate, boolean controlVariate, int requiredSamples, double requiredTolerance, int maxSamples, int seed, int polynomOrder, LsmBasisSystem.PolynomialType polynomType) {
059    this(QuantLibJNI.new_MCPRAmericanEngine__SWIG_3(GeneralizedBlackScholesProcess.getCPtr(process), process, timeSteps, timeStepsPerYear, antitheticVariate, controlVariate, requiredSamples, requiredTolerance, maxSamples, seed, polynomOrder, polynomType.swigValue()), true);
060  }
061
062  public MCPRAmericanEngine(GeneralizedBlackScholesProcess process, int timeSteps, int timeStepsPerYear, boolean antitheticVariate, boolean controlVariate, int requiredSamples, double requiredTolerance, int maxSamples, int seed, int polynomOrder) {
063    this(QuantLibJNI.new_MCPRAmericanEngine__SWIG_4(GeneralizedBlackScholesProcess.getCPtr(process), process, timeSteps, timeStepsPerYear, antitheticVariate, controlVariate, requiredSamples, requiredTolerance, maxSamples, seed, polynomOrder), true);
064  }
065
066  public MCPRAmericanEngine(GeneralizedBlackScholesProcess process, int timeSteps, int timeStepsPerYear, boolean antitheticVariate, boolean controlVariate, int requiredSamples, double requiredTolerance, int maxSamples, int seed) {
067    this(QuantLibJNI.new_MCPRAmericanEngine__SWIG_5(GeneralizedBlackScholesProcess.getCPtr(process), process, timeSteps, timeStepsPerYear, antitheticVariate, controlVariate, requiredSamples, requiredTolerance, maxSamples, seed), true);
068  }
069
070  public MCPRAmericanEngine(GeneralizedBlackScholesProcess process, int timeSteps, int timeStepsPerYear, boolean antitheticVariate, boolean controlVariate, int requiredSamples, double requiredTolerance, int maxSamples) {
071    this(QuantLibJNI.new_MCPRAmericanEngine__SWIG_6(GeneralizedBlackScholesProcess.getCPtr(process), process, timeSteps, timeStepsPerYear, antitheticVariate, controlVariate, requiredSamples, requiredTolerance, maxSamples), true);
072  }
073
074  public MCPRAmericanEngine(GeneralizedBlackScholesProcess process, int timeSteps, int timeStepsPerYear, boolean antitheticVariate, boolean controlVariate, int requiredSamples, double requiredTolerance) {
075    this(QuantLibJNI.new_MCPRAmericanEngine__SWIG_7(GeneralizedBlackScholesProcess.getCPtr(process), process, timeSteps, timeStepsPerYear, antitheticVariate, controlVariate, requiredSamples, requiredTolerance), true);
076  }
077
078  public MCPRAmericanEngine(GeneralizedBlackScholesProcess process, int timeSteps, int timeStepsPerYear, boolean antitheticVariate, boolean controlVariate, int requiredSamples) {
079    this(QuantLibJNI.new_MCPRAmericanEngine__SWIG_8(GeneralizedBlackScholesProcess.getCPtr(process), process, timeSteps, timeStepsPerYear, antitheticVariate, controlVariate, requiredSamples), true);
080  }
081
082  public MCPRAmericanEngine(GeneralizedBlackScholesProcess process, int timeSteps, int timeStepsPerYear, boolean antitheticVariate, boolean controlVariate) {
083    this(QuantLibJNI.new_MCPRAmericanEngine__SWIG_9(GeneralizedBlackScholesProcess.getCPtr(process), process, timeSteps, timeStepsPerYear, antitheticVariate, controlVariate), true);
084  }
085
086  public MCPRAmericanEngine(GeneralizedBlackScholesProcess process, int timeSteps, int timeStepsPerYear, boolean antitheticVariate) {
087    this(QuantLibJNI.new_MCPRAmericanEngine__SWIG_10(GeneralizedBlackScholesProcess.getCPtr(process), process, timeSteps, timeStepsPerYear, antitheticVariate), true);
088  }
089
090  public MCPRAmericanEngine(GeneralizedBlackScholesProcess process, int timeSteps, int timeStepsPerYear) {
091    this(QuantLibJNI.new_MCPRAmericanEngine__SWIG_11(GeneralizedBlackScholesProcess.getCPtr(process), process, timeSteps, timeStepsPerYear), true);
092  }
093
094  public MCPRAmericanEngine(GeneralizedBlackScholesProcess process, int timeSteps) {
095    this(QuantLibJNI.new_MCPRAmericanEngine__SWIG_12(GeneralizedBlackScholesProcess.getCPtr(process), process, timeSteps), true);
096  }
097
098  public MCPRAmericanEngine(GeneralizedBlackScholesProcess process) {
099    this(QuantLibJNI.new_MCPRAmericanEngine__SWIG_13(GeneralizedBlackScholesProcess.getCPtr(process), process), true);
100  }
101
102}