/src/main/java/net/finmath/montecarlo/interestrate/products/SwaptionGeneralizedAnalyticApproximation.java
cachedSwaprateDerivativeDiscountCurve = new WeakReference<>( discountCurve) ;cachedSwaprateDerivativeForwardCurve = new WeakReference<>( forwardCurve) ;
cachedSwaprateDerivativeForwardCurve = new WeakReference<> ( forwardCurve ) ;
&& forwardCurve == cachedSwaprateDerivativeForwardCurve.get() ) { return cachedSwaprateDerivative; } cachedSwaprateDerivativeTimeDiscretization = new WeakReference<>(liborPeriodDiscretization); cachedSwaprateDerivativeDiscountCurve = new WeakReference<>(discountCurve); <extra_id_0> if(discountCurve == null) { discountCurve = new DiscountCurveFromForwardCurve(forwardCurve.getName()); } final double swapStart = swapTenor[0]; final double swapEnd = swapTenor[swapTenor.length-1]; final int swapStartIndex = liborPeriodDiscretization.getTimeIndex(swapStart);