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 FdBlackScholesVanillaEngine extends PricingEngine implements org.quantlib.helpers.QuantLibJNIHelpers.AutoCloseable { 012 private transient long swigCPtr; 013 private transient boolean swigCMemOwnDerived; 014 015 protected FdBlackScholesVanillaEngine(long cPtr, boolean cMemoryOwn) { 016 super(QuantLibJNI.FdBlackScholesVanillaEngine_SWIGSmartPtrUpcast(cPtr), true); 017 swigCMemOwnDerived = cMemoryOwn; 018 swigCPtr = cPtr; 019 } 020 021 protected static long getCPtr(FdBlackScholesVanillaEngine 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_FdBlackScholesVanillaEngine(swigCPtr); 040 } 041 swigCPtr = 0; 042 } 043 super.delete(); 044 } 045 046 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess process, long tGrid, long xGrid, long dampingSteps, FdmSchemeDesc schemeDesc, boolean localVol, double illegalLocalVolOverwrite, FdBlackScholesVanillaEngine.CashDividendModel cashDividendModel) { 047 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_0(GeneralizedBlackScholesProcess.getCPtr(process), process, tGrid, xGrid, dampingSteps, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc, localVol, illegalLocalVolOverwrite, cashDividendModel.swigValue()), true); 048 } 049 050 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess process, long tGrid, long xGrid, long dampingSteps, FdmSchemeDesc schemeDesc, boolean localVol, double illegalLocalVolOverwrite) { 051 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_1(GeneralizedBlackScholesProcess.getCPtr(process), process, tGrid, xGrid, dampingSteps, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc, localVol, illegalLocalVolOverwrite), true); 052 } 053 054 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess process, long tGrid, long xGrid, long dampingSteps, FdmSchemeDesc schemeDesc, boolean localVol) { 055 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_2(GeneralizedBlackScholesProcess.getCPtr(process), process, tGrid, xGrid, dampingSteps, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc, localVol), true); 056 } 057 058 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess process, long tGrid, long xGrid, long dampingSteps, FdmSchemeDesc schemeDesc) { 059 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_3(GeneralizedBlackScholesProcess.getCPtr(process), process, tGrid, xGrid, dampingSteps, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc), true); 060 } 061 062 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess process, long tGrid, long xGrid, long dampingSteps) { 063 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_4(GeneralizedBlackScholesProcess.getCPtr(process), process, tGrid, xGrid, dampingSteps), true); 064 } 065 066 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess process, long tGrid, long xGrid) { 067 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_5(GeneralizedBlackScholesProcess.getCPtr(process), process, tGrid, xGrid), true); 068 } 069 070 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess process, long tGrid) { 071 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_6(GeneralizedBlackScholesProcess.getCPtr(process), process, tGrid), true); 072 } 073 074 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess process) { 075 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_7(GeneralizedBlackScholesProcess.getCPtr(process), process), true); 076 } 077 078 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess arg0, FdmQuantoHelper quantoHelper, long tGrid, long xGrid, long dampingSteps, FdmSchemeDesc schemeDesc, boolean localVol, double illegalLocalVolOverwrite, FdBlackScholesVanillaEngine.CashDividendModel cashDividendModel) { 079 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_8(GeneralizedBlackScholesProcess.getCPtr(arg0), arg0, FdmQuantoHelper.getCPtr(quantoHelper), quantoHelper, tGrid, xGrid, dampingSteps, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc, localVol, illegalLocalVolOverwrite, cashDividendModel.swigValue()), true); 080 } 081 082 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess arg0, FdmQuantoHelper quantoHelper, long tGrid, long xGrid, long dampingSteps, FdmSchemeDesc schemeDesc, boolean localVol, double illegalLocalVolOverwrite) { 083 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_9(GeneralizedBlackScholesProcess.getCPtr(arg0), arg0, FdmQuantoHelper.getCPtr(quantoHelper), quantoHelper, tGrid, xGrid, dampingSteps, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc, localVol, illegalLocalVolOverwrite), true); 084 } 085 086 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess arg0, FdmQuantoHelper quantoHelper, long tGrid, long xGrid, long dampingSteps, FdmSchemeDesc schemeDesc, boolean localVol) { 087 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_10(GeneralizedBlackScholesProcess.getCPtr(arg0), arg0, FdmQuantoHelper.getCPtr(quantoHelper), quantoHelper, tGrid, xGrid, dampingSteps, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc, localVol), true); 088 } 089 090 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess arg0, FdmQuantoHelper quantoHelper, long tGrid, long xGrid, long dampingSteps, FdmSchemeDesc schemeDesc) { 091 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_11(GeneralizedBlackScholesProcess.getCPtr(arg0), arg0, FdmQuantoHelper.getCPtr(quantoHelper), quantoHelper, tGrid, xGrid, dampingSteps, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc), true); 092 } 093 094 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess arg0, FdmQuantoHelper quantoHelper, long tGrid, long xGrid, long dampingSteps) { 095 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_12(GeneralizedBlackScholesProcess.getCPtr(arg0), arg0, FdmQuantoHelper.getCPtr(quantoHelper), quantoHelper, tGrid, xGrid, dampingSteps), true); 096 } 097 098 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess arg0, FdmQuantoHelper quantoHelper, long tGrid, long xGrid) { 099 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_13(GeneralizedBlackScholesProcess.getCPtr(arg0), arg0, FdmQuantoHelper.getCPtr(quantoHelper), quantoHelper, tGrid, xGrid), true); 100 } 101 102 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess arg0, FdmQuantoHelper quantoHelper, long tGrid) { 103 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_14(GeneralizedBlackScholesProcess.getCPtr(arg0), arg0, FdmQuantoHelper.getCPtr(quantoHelper), quantoHelper, tGrid), true); 104 } 105 106 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess arg0, FdmQuantoHelper quantoHelper) { 107 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_15(GeneralizedBlackScholesProcess.getCPtr(arg0), arg0, FdmQuantoHelper.getCPtr(quantoHelper), quantoHelper), true); 108 } 109 110 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess process, DividendSchedule dividends, long tGrid, long xGrid, long dampingSteps, FdmSchemeDesc schemeDesc, boolean localVol, double illegalLocalVolOverwrite, FdBlackScholesVanillaEngine.CashDividendModel cashDividendModel) { 111 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_16(GeneralizedBlackScholesProcess.getCPtr(process), process, DividendSchedule.getCPtr(dividends), dividends, tGrid, xGrid, dampingSteps, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc, localVol, illegalLocalVolOverwrite, cashDividendModel.swigValue()), true); 112 } 113 114 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess process, DividendSchedule dividends, long tGrid, long xGrid, long dampingSteps, FdmSchemeDesc schemeDesc, boolean localVol, double illegalLocalVolOverwrite) { 115 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_17(GeneralizedBlackScholesProcess.getCPtr(process), process, DividendSchedule.getCPtr(dividends), dividends, tGrid, xGrid, dampingSteps, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc, localVol, illegalLocalVolOverwrite), true); 116 } 117 118 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess process, DividendSchedule dividends, long tGrid, long xGrid, long dampingSteps, FdmSchemeDesc schemeDesc, boolean localVol) { 119 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_18(GeneralizedBlackScholesProcess.getCPtr(process), process, DividendSchedule.getCPtr(dividends), dividends, tGrid, xGrid, dampingSteps, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc, localVol), true); 120 } 121 122 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess process, DividendSchedule dividends, long tGrid, long xGrid, long dampingSteps, FdmSchemeDesc schemeDesc) { 123 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_19(GeneralizedBlackScholesProcess.getCPtr(process), process, DividendSchedule.getCPtr(dividends), dividends, tGrid, xGrid, dampingSteps, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc), true); 124 } 125 126 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess process, DividendSchedule dividends, long tGrid, long xGrid, long dampingSteps) { 127 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_20(GeneralizedBlackScholesProcess.getCPtr(process), process, DividendSchedule.getCPtr(dividends), dividends, tGrid, xGrid, dampingSteps), true); 128 } 129 130 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess process, DividendSchedule dividends, long tGrid, long xGrid) { 131 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_21(GeneralizedBlackScholesProcess.getCPtr(process), process, DividendSchedule.getCPtr(dividends), dividends, tGrid, xGrid), true); 132 } 133 134 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess process, DividendSchedule dividends, long tGrid) { 135 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_22(GeneralizedBlackScholesProcess.getCPtr(process), process, DividendSchedule.getCPtr(dividends), dividends, tGrid), true); 136 } 137 138 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess process, DividendSchedule dividends) { 139 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_23(GeneralizedBlackScholesProcess.getCPtr(process), process, DividendSchedule.getCPtr(dividends), dividends), true); 140 } 141 142 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess arg0, DividendSchedule dividends, FdmQuantoHelper quantoHelper, long tGrid, long xGrid, long dampingSteps, FdmSchemeDesc schemeDesc, boolean localVol, double illegalLocalVolOverwrite, FdBlackScholesVanillaEngine.CashDividendModel cashDividendModel) { 143 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_24(GeneralizedBlackScholesProcess.getCPtr(arg0), arg0, DividendSchedule.getCPtr(dividends), dividends, FdmQuantoHelper.getCPtr(quantoHelper), quantoHelper, tGrid, xGrid, dampingSteps, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc, localVol, illegalLocalVolOverwrite, cashDividendModel.swigValue()), true); 144 } 145 146 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess arg0, DividendSchedule dividends, FdmQuantoHelper quantoHelper, long tGrid, long xGrid, long dampingSteps, FdmSchemeDesc schemeDesc, boolean localVol, double illegalLocalVolOverwrite) { 147 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_25(GeneralizedBlackScholesProcess.getCPtr(arg0), arg0, DividendSchedule.getCPtr(dividends), dividends, FdmQuantoHelper.getCPtr(quantoHelper), quantoHelper, tGrid, xGrid, dampingSteps, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc, localVol, illegalLocalVolOverwrite), true); 148 } 149 150 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess arg0, DividendSchedule dividends, FdmQuantoHelper quantoHelper, long tGrid, long xGrid, long dampingSteps, FdmSchemeDesc schemeDesc, boolean localVol) { 151 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_26(GeneralizedBlackScholesProcess.getCPtr(arg0), arg0, DividendSchedule.getCPtr(dividends), dividends, FdmQuantoHelper.getCPtr(quantoHelper), quantoHelper, tGrid, xGrid, dampingSteps, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc, localVol), true); 152 } 153 154 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess arg0, DividendSchedule dividends, FdmQuantoHelper quantoHelper, long tGrid, long xGrid, long dampingSteps, FdmSchemeDesc schemeDesc) { 155 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_27(GeneralizedBlackScholesProcess.getCPtr(arg0), arg0, DividendSchedule.getCPtr(dividends), dividends, FdmQuantoHelper.getCPtr(quantoHelper), quantoHelper, tGrid, xGrid, dampingSteps, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc), true); 156 } 157 158 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess arg0, DividendSchedule dividends, FdmQuantoHelper quantoHelper, long tGrid, long xGrid, long dampingSteps) { 159 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_28(GeneralizedBlackScholesProcess.getCPtr(arg0), arg0, DividendSchedule.getCPtr(dividends), dividends, FdmQuantoHelper.getCPtr(quantoHelper), quantoHelper, tGrid, xGrid, dampingSteps), true); 160 } 161 162 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess arg0, DividendSchedule dividends, FdmQuantoHelper quantoHelper, long tGrid, long xGrid) { 163 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_29(GeneralizedBlackScholesProcess.getCPtr(arg0), arg0, DividendSchedule.getCPtr(dividends), dividends, FdmQuantoHelper.getCPtr(quantoHelper), quantoHelper, tGrid, xGrid), true); 164 } 165 166 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess arg0, DividendSchedule dividends, FdmQuantoHelper quantoHelper, long tGrid) { 167 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_30(GeneralizedBlackScholesProcess.getCPtr(arg0), arg0, DividendSchedule.getCPtr(dividends), dividends, FdmQuantoHelper.getCPtr(quantoHelper), quantoHelper, tGrid), true); 168 } 169 170 public FdBlackScholesVanillaEngine(GeneralizedBlackScholesProcess arg0, DividendSchedule dividends, FdmQuantoHelper quantoHelper) { 171 this(QuantLibJNI.new_FdBlackScholesVanillaEngine__SWIG_31(GeneralizedBlackScholesProcess.getCPtr(arg0), arg0, DividendSchedule.getCPtr(dividends), dividends, FdmQuantoHelper.getCPtr(quantoHelper), quantoHelper), true); 172 } 173 174 public final static class CashDividendModel { 175 public final static FdBlackScholesVanillaEngine.CashDividendModel Spot = new FdBlackScholesVanillaEngine.CashDividendModel("Spot"); 176 public final static FdBlackScholesVanillaEngine.CashDividendModel Escrowed = new FdBlackScholesVanillaEngine.CashDividendModel("Escrowed"); 177 178 public final int swigValue() { 179 return swigValue; 180 } 181 182 public String toString() { 183 return swigName; 184 } 185 186 public static CashDividendModel swigToEnum(int swigValue) { 187 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 188 return swigValues[swigValue]; 189 for (int i = 0; i < swigValues.length; i++) 190 if (swigValues[i].swigValue == swigValue) 191 return swigValues[i]; 192 throw new IllegalArgumentException("No enum " + CashDividendModel.class + " with value " + swigValue); 193 } 194 195 private CashDividendModel(String swigName) { 196 this.swigName = swigName; 197 this.swigValue = swigNext++; 198 } 199 200 private CashDividendModel(String swigName, int swigValue) { 201 this.swigName = swigName; 202 this.swigValue = swigValue; 203 swigNext = swigValue+1; 204 } 205 206 private CashDividendModel(String swigName, CashDividendModel swigEnum) { 207 this.swigName = swigName; 208 this.swigValue = swigEnum.swigValue; 209 swigNext = this.swigValue+1; 210 } 211 212 private static CashDividendModel[] swigValues = { Spot, Escrowed }; 213 private static int swigNext = 0; 214 private final int swigValue; 215 private final String swigName; 216 } 217 218}