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 SwaptionVolatilityStructure extends VolatilityTermStructure implements org.quantlib.helpers.QuantLibJNIHelpers.AutoCloseable { 012 private transient long swigCPtr; 013 private transient boolean swigCMemOwnDerived; 014 015 protected SwaptionVolatilityStructure(long cPtr, boolean cMemoryOwn) { 016 super(QuantLibJNI.SwaptionVolatilityStructure_SWIGSmartPtrUpcast(cPtr), true); 017 swigCMemOwnDerived = cMemoryOwn; 018 swigCPtr = cPtr; 019 } 020 021 protected static long getCPtr(SwaptionVolatilityStructure 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_SwaptionVolatilityStructure(swigCPtr); 040 } 041 swigCPtr = 0; 042 } 043 super.delete(); 044 } 045 046 public double volatility(Date start, Period length, double strike, boolean extrapolate) { 047 return QuantLibJNI.SwaptionVolatilityStructure_volatility__SWIG_0(swigCPtr, this, Date.getCPtr(start), start, Period.getCPtr(length), length, strike, extrapolate); 048 } 049 050 public double volatility(Date start, Period length, double strike) { 051 return QuantLibJNI.SwaptionVolatilityStructure_volatility__SWIG_1(swigCPtr, this, Date.getCPtr(start), start, Period.getCPtr(length), length, strike); 052 } 053 054 public double volatility(double start, double length, double strike, boolean extrapolate) { 055 return QuantLibJNI.SwaptionVolatilityStructure_volatility__SWIG_2(swigCPtr, this, start, length, strike, extrapolate); 056 } 057 058 public double volatility(double start, double length, double strike) { 059 return QuantLibJNI.SwaptionVolatilityStructure_volatility__SWIG_3(swigCPtr, this, start, length, strike); 060 } 061 062 public double blackVariance(Date start, Period length, double strike, boolean extrapolate) { 063 return QuantLibJNI.SwaptionVolatilityStructure_blackVariance__SWIG_0(swigCPtr, this, Date.getCPtr(start), start, Period.getCPtr(length), length, strike, extrapolate); 064 } 065 066 public double blackVariance(Date start, Period length, double strike) { 067 return QuantLibJNI.SwaptionVolatilityStructure_blackVariance__SWIG_1(swigCPtr, this, Date.getCPtr(start), start, Period.getCPtr(length), length, strike); 068 } 069 070 public double blackVariance(double start, double length, double strike, boolean extrapolate) { 071 return QuantLibJNI.SwaptionVolatilityStructure_blackVariance__SWIG_2(swigCPtr, this, start, length, strike, extrapolate); 072 } 073 074 public double blackVariance(double start, double length, double strike) { 075 return QuantLibJNI.SwaptionVolatilityStructure_blackVariance__SWIG_3(swigCPtr, this, start, length, strike); 076 } 077 078 public Date optionDateFromTenor(Period p) { 079 return new Date(QuantLibJNI.SwaptionVolatilityStructure_optionDateFromTenor(swigCPtr, this, Period.getCPtr(p), p), true); 080 } 081 082 public double shift(Period optionTenor, Period swapTenor, boolean extrapolate) { 083 return QuantLibJNI.SwaptionVolatilityStructure_shift__SWIG_0(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, Period.getCPtr(swapTenor), swapTenor, extrapolate); 084 } 085 086 public double shift(Period optionTenor, Period swapTenor) { 087 return QuantLibJNI.SwaptionVolatilityStructure_shift__SWIG_1(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, Period.getCPtr(swapTenor), swapTenor); 088 } 089 090 public double shift(Date optionDate, Period swapTenor, boolean extrapolate) { 091 return QuantLibJNI.SwaptionVolatilityStructure_shift__SWIG_2(swigCPtr, this, Date.getCPtr(optionDate), optionDate, Period.getCPtr(swapTenor), swapTenor, extrapolate); 092 } 093 094 public double shift(Date optionDate, Period swapTenor) { 095 return QuantLibJNI.SwaptionVolatilityStructure_shift__SWIG_3(swigCPtr, this, Date.getCPtr(optionDate), optionDate, Period.getCPtr(swapTenor), swapTenor); 096 } 097 098 public double shift(double optionTime, Period swapTenor, boolean extrapolate) { 099 return QuantLibJNI.SwaptionVolatilityStructure_shift__SWIG_4(swigCPtr, this, optionTime, Period.getCPtr(swapTenor), swapTenor, extrapolate); 100 } 101 102 public double shift(double optionTime, Period swapTenor) { 103 return QuantLibJNI.SwaptionVolatilityStructure_shift__SWIG_5(swigCPtr, this, optionTime, Period.getCPtr(swapTenor), swapTenor); 104 } 105 106 public double shift(Period optionTenor, double swapLength, boolean extrapolate) { 107 return QuantLibJNI.SwaptionVolatilityStructure_shift__SWIG_6(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, swapLength, extrapolate); 108 } 109 110 public double shift(Period optionTenor, double swapLength) { 111 return QuantLibJNI.SwaptionVolatilityStructure_shift__SWIG_7(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, swapLength); 112 } 113 114 public double shift(Date optionDate, double swapLength, boolean extrapolate) { 115 return QuantLibJNI.SwaptionVolatilityStructure_shift__SWIG_8(swigCPtr, this, Date.getCPtr(optionDate), optionDate, swapLength, extrapolate); 116 } 117 118 public double shift(Date optionDate, double swapLength) { 119 return QuantLibJNI.SwaptionVolatilityStructure_shift__SWIG_9(swigCPtr, this, Date.getCPtr(optionDate), optionDate, swapLength); 120 } 121 122 public double shift(double optionTime, double swapLength, boolean extrapolate) { 123 return QuantLibJNI.SwaptionVolatilityStructure_shift__SWIG_10(swigCPtr, this, optionTime, swapLength, extrapolate); 124 } 125 126 public double shift(double optionTime, double swapLength) { 127 return QuantLibJNI.SwaptionVolatilityStructure_shift__SWIG_11(swigCPtr, this, optionTime, swapLength); 128 } 129 130 public SmileSection smileSection(Period optionTenor, Period swapTenor, boolean extr) { 131 long cPtr = QuantLibJNI.SwaptionVolatilityStructure_smileSection__SWIG_0(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, Period.getCPtr(swapTenor), swapTenor, extr); 132 return (cPtr == 0) ? null : new SmileSection(cPtr, true); 133 } 134 135 public SmileSection smileSection(Period optionTenor, Period swapTenor) { 136 long cPtr = QuantLibJNI.SwaptionVolatilityStructure_smileSection__SWIG_1(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, Period.getCPtr(swapTenor), swapTenor); 137 return (cPtr == 0) ? null : new SmileSection(cPtr, true); 138 } 139 140 public SmileSection smileSection(Date optionDate, Period swapTenor, boolean extr) { 141 long cPtr = QuantLibJNI.SwaptionVolatilityStructure_smileSection__SWIG_2(swigCPtr, this, Date.getCPtr(optionDate), optionDate, Period.getCPtr(swapTenor), swapTenor, extr); 142 return (cPtr == 0) ? null : new SmileSection(cPtr, true); 143 } 144 145 public SmileSection smileSection(Date optionDate, Period swapTenor) { 146 long cPtr = QuantLibJNI.SwaptionVolatilityStructure_smileSection__SWIG_3(swigCPtr, this, Date.getCPtr(optionDate), optionDate, Period.getCPtr(swapTenor), swapTenor); 147 return (cPtr == 0) ? null : new SmileSection(cPtr, true); 148 } 149 150 public SmileSection smileSection(double optionTime, Period swapTenor, boolean extr) { 151 long cPtr = QuantLibJNI.SwaptionVolatilityStructure_smileSection__SWIG_4(swigCPtr, this, optionTime, Period.getCPtr(swapTenor), swapTenor, extr); 152 return (cPtr == 0) ? null : new SmileSection(cPtr, true); 153 } 154 155 public SmileSection smileSection(double optionTime, Period swapTenor) { 156 long cPtr = QuantLibJNI.SwaptionVolatilityStructure_smileSection__SWIG_5(swigCPtr, this, optionTime, Period.getCPtr(swapTenor), swapTenor); 157 return (cPtr == 0) ? null : new SmileSection(cPtr, true); 158 } 159 160 public SmileSection smileSection(Period optionTenor, double swapLength, boolean extr) { 161 long cPtr = QuantLibJNI.SwaptionVolatilityStructure_smileSection__SWIG_6(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, swapLength, extr); 162 return (cPtr == 0) ? null : new SmileSection(cPtr, true); 163 } 164 165 public SmileSection smileSection(Period optionTenor, double swapLength) { 166 long cPtr = QuantLibJNI.SwaptionVolatilityStructure_smileSection__SWIG_7(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, swapLength); 167 return (cPtr == 0) ? null : new SmileSection(cPtr, true); 168 } 169 170 public SmileSection smileSection(Date optionDate, double swapLength, boolean extr) { 171 long cPtr = QuantLibJNI.SwaptionVolatilityStructure_smileSection__SWIG_8(swigCPtr, this, Date.getCPtr(optionDate), optionDate, swapLength, extr); 172 return (cPtr == 0) ? null : new SmileSection(cPtr, true); 173 } 174 175 public SmileSection smileSection(Date optionDate, double swapLength) { 176 long cPtr = QuantLibJNI.SwaptionVolatilityStructure_smileSection__SWIG_9(swigCPtr, this, Date.getCPtr(optionDate), optionDate, swapLength); 177 return (cPtr == 0) ? null : new SmileSection(cPtr, true); 178 } 179 180 public SmileSection smileSection(double optionTime, double swapLength, boolean extr) { 181 long cPtr = QuantLibJNI.SwaptionVolatilityStructure_smileSection__SWIG_10(swigCPtr, this, optionTime, swapLength, extr); 182 return (cPtr == 0) ? null : new SmileSection(cPtr, true); 183 } 184 185 public SmileSection smileSection(double optionTime, double swapLength) { 186 long cPtr = QuantLibJNI.SwaptionVolatilityStructure_smileSection__SWIG_11(swigCPtr, this, optionTime, swapLength); 187 return (cPtr == 0) ? null : new SmileSection(cPtr, true); 188 } 189 190}