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 AbcdFunction extends AbcdMathFunction implements org.quantlib.helpers.QuantLibJNIHelpers.AutoCloseable { 012 private transient long swigCPtr; 013 014 protected AbcdFunction(long cPtr, boolean cMemoryOwn) { 015 super(QuantLibJNI.AbcdFunction_SWIGUpcast(cPtr), cMemoryOwn); 016 swigCPtr = cPtr; 017 } 018 019 protected static long getCPtr(AbcdFunction obj) { 020 return (obj == null) ? 0 : obj.swigCPtr; 021 } 022 023 protected static long swigRelease(AbcdFunction obj) { 024 long ptr = 0; 025 if (obj != null) { 026 if (!obj.swigCMemOwn) 027 throw new RuntimeException("Cannot release ownership as memory is not owned"); 028 ptr = obj.swigCPtr; 029 obj.swigCMemOwn = false; 030 obj.delete(); 031 } 032 return ptr; 033 } 034 035 @SuppressWarnings("deprecation") 036 protected void finalize() { 037 delete(); 038 } 039 040 public synchronized void delete() { 041 if (swigCPtr != 0) { 042 if (swigCMemOwn) { 043 swigCMemOwn = false; 044 QuantLibJNI.delete_AbcdFunction(swigCPtr); 045 } 046 swigCPtr = 0; 047 } 048 super.delete(); 049 } 050 051 public AbcdFunction(double a, double b, double c, double d) { 052 this(QuantLibJNI.new_AbcdFunction__SWIG_0(a, b, c, d), true); 053 } 054 055 public AbcdFunction(double a, double b, double c) { 056 this(QuantLibJNI.new_AbcdFunction__SWIG_1(a, b, c), true); 057 } 058 059 public AbcdFunction(double a, double b) { 060 this(QuantLibJNI.new_AbcdFunction__SWIG_2(a, b), true); 061 } 062 063 public AbcdFunction(double a) { 064 this(QuantLibJNI.new_AbcdFunction__SWIG_3(a), true); 065 } 066 067 public AbcdFunction() { 068 this(QuantLibJNI.new_AbcdFunction__SWIG_4(), true); 069 } 070 071 public double maximumVolatility() { 072 return QuantLibJNI.AbcdFunction_maximumVolatility(swigCPtr, this); 073 } 074 075 public double shortTermVolatility() { 076 return QuantLibJNI.AbcdFunction_shortTermVolatility(swigCPtr, this); 077 } 078 079 public double longTermVolatility() { 080 return QuantLibJNI.AbcdFunction_longTermVolatility(swigCPtr, this); 081 } 082 083 public double covariance(double t, double T, double S) { 084 return QuantLibJNI.AbcdFunction_covariance__SWIG_0(swigCPtr, this, t, T, S); 085 } 086 087 public double covariance(double t1, double t2, double T, double S) { 088 return QuantLibJNI.AbcdFunction_covariance__SWIG_1(swigCPtr, this, t1, t2, T, S); 089 } 090 091 public double volatility(double tMin, double tMax, double T) { 092 return QuantLibJNI.AbcdFunction_volatility(swigCPtr, this, tMin, tMax, T); 093 } 094 095 public double variance(double tMin, double tMax, double T) { 096 return QuantLibJNI.AbcdFunction_variance(swigCPtr, this, tMin, tMax, T); 097 } 098 099 public double instantaneousVolatility(double t, double T) { 100 return QuantLibJNI.AbcdFunction_instantaneousVolatility(swigCPtr, this, t, T); 101 } 102 103 public double instantaneousVariance(double t, double T) { 104 return QuantLibJNI.AbcdFunction_instantaneousVariance(swigCPtr, this, t, T); 105 } 106 107 public double instantaneousCovariance(double u, double T, double S) { 108 return QuantLibJNI.AbcdFunction_instantaneousCovariance(swigCPtr, this, u, T, S); 109 } 110 111 public double primitive(double t, double T, double S) { 112 return QuantLibJNI.AbcdFunction_primitive(swigCPtr, this, t, T, S); 113 } 114 115}