Skip to content

Commit

Permalink
Features:
Browse files Browse the repository at this point in the history
Bug Fixes/Re-organization:

	- Special Function Bessel Second NIST Series Estimator - Kind (1, 2)
	- Special Function Bessel Second NIST Series Estimator - First Kind (3, 4)
	- Special Function Bessel Second NIST Series Estimator - Big Y (5)
	- Special Function Bessel Second NIST Series Estimator - Constructor (6, 7)
	- Special Function Bessel Second NIST Series Estimator - Standard (8, 9)
	- Special Function Bessel Second Watson Integral Estimator (10, 11, 12)
	- Special Function Bessel Second Watson Integral Estimator - Quadrature Count (13, 14)
	- Special Function Bessel Second Watson Integral Estimator - Constructor (15, 16)
	- Special Function Bessel Second Watson Integral Estimator - Integer Form #1 (17, 18)
	- Special Function Bessel Second Watson Integral Estimator - Integer Form #2 (19, 20)
	- Special Function Bessel Second Weber Estimator (21, 22, 23)
	- Special Function Bessel Second Weber Estimator - First Kind (24, 25)
	- Special Function Bessel Second Weber Estimator - Big Y (26, 27)
	- Special Function Bessel Second Weber Estimator - Constructor (28, 29)
	- Special Function Bessel Spherical First Estimator (30, 31, 32)
	- Special Function Bessel Spherical First Estimator - Kind (33, 34)
	- Special Function Bessel Spherical First Estimator - Small J (35)
	- Special Function Bessel Spherical First Estimator - Constructor (36, 37)
	- Special Function Bessel Spherical First Estimator - Order Minus Four (38, 39)
	- Special Function Bessel Spherical First Estimator - Order Minus Three (40, 41)
	- Special Function Bessel Spherical First Estimator - Order Plus Three (42, 43)
	- Special Function Bessel Spherical First Estimator - Order Minus Two (44, 45)
	- Special Function Bessel Spherical First Estimator - Order Plus Two (46, 47)
	- Special Function Bessel Spherical First Estimator - Order Minus One (48, 49)
	- Special Function Bessel Spherical First Estimator - Order Plus One (50, 51)
	- Special Function Bessel Spherical First Estimator - Order Zero (52, 53)
	- Special Function Bessel Spherical Second Estimator (54, 55, 56)
	- Special Function Bessel Spherical Second Estimator - Kind (57, 58)
	- Special Function Bessel Spherical Second Estimator - Small Y (59)
	- Special Function Bessel Spherical Second Estimator - Constructor (60)


Samples:

IdeaDRIP:
  • Loading branch information
Lakshmik committed Jan 20, 2024
1 parent 29199a2 commit 9d6ebef
Show file tree
Hide file tree
Showing 6 changed files with 276 additions and 208 deletions.
40 changes: 40 additions & 0 deletions ReleaseNotes/05_23_2023.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

Features:

Bug Fixes/Re-organization:

- Special Function Bessel Second NIST Series Estimator - Kind (1, 2)
- Special Function Bessel Second NIST Series Estimator - First Kind (3, 4)
- Special Function Bessel Second NIST Series Estimator - Big Y (5)
- Special Function Bessel Second NIST Series Estimator - Constructor (6, 7)
- Special Function Bessel Second NIST Series Estimator - Standard (8, 9)
- Special Function Bessel Second Watson Integral Estimator (10, 11, 12)
- Special Function Bessel Second Watson Integral Estimator - Quadrature Count (13, 14)
- Special Function Bessel Second Watson Integral Estimator - Constructor (15, 16)
- Special Function Bessel Second Watson Integral Estimator - Integer Form #1 (17, 18)
- Special Function Bessel Second Watson Integral Estimator - Integer Form #2 (19, 20)
- Special Function Bessel Second Weber Estimator (21, 22, 23)
- Special Function Bessel Second Weber Estimator - First Kind (24, 25)
- Special Function Bessel Second Weber Estimator - Big Y (26, 27)
- Special Function Bessel Second Weber Estimator - Constructor (28, 29)
- Special Function Bessel Spherical First Estimator (30, 31, 32)
- Special Function Bessel Spherical First Estimator - Kind (33, 34)
- Special Function Bessel Spherical First Estimator - Small J (35)
- Special Function Bessel Spherical First Estimator - Constructor (36, 37)
- Special Function Bessel Spherical First Estimator - Order Minus Four (38, 39)
- Special Function Bessel Spherical First Estimator - Order Minus Three (40, 41)
- Special Function Bessel Spherical First Estimator - Order Plus Three (42, 43)
- Special Function Bessel Spherical First Estimator - Order Minus Two (44, 45)
- Special Function Bessel Spherical First Estimator - Order Plus Two (46, 47)
- Special Function Bessel Spherical First Estimator - Order Minus One (48, 49)
- Special Function Bessel Spherical First Estimator - Order Plus One (50, 51)
- Special Function Bessel Spherical First Estimator - Order Zero (52, 53)
- Special Function Bessel Spherical Second Estimator (54, 55, 56)
- Special Function Bessel Spherical Second Estimator - Kind (57, 58)
- Special Function Bessel Spherical Second Estimator - Small Y (59)
- Special Function Bessel Spherical Second Estimator - Constructor (60)


Samples:

IdeaDRIP:
Binary file modified ScheduleSheet.xlsx
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@

package org.drip.specialfunction.bessel;

import org.drip.function.definition.R1ToR1;
import org.drip.numerical.common.NumberUtil;
import org.drip.numerical.integration.NewtonCotesQuadratureGenerator;
import org.drip.specialfunction.definition.BesselSecondKindEstimator;

/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*/

/*!
* Copyright (C) 2025 Lakshmi Krishnamurthy
* Copyright (C) 2024 Lakshmi Krishnamurthy
* Copyright (C) 2023 Lakshmi Krishnamurthy
* Copyright (C) 2022 Lakshmi Krishnamurthy
* Copyright (C) 2021 Lakshmi Krishnamurthy
* Copyright (C) 2020 Lakshmi Krishnamurthy
Expand Down Expand Up @@ -78,7 +86,7 @@

/**
* <i>SecondWatsonIntegralEstimator</i> implements the Integral Estimator for the Cylindrical Bessel Function
* of the Second Kind. The References are:
* of the Second Kind. The References are:
*
* <br><br>
* <ul>
Expand All @@ -102,20 +110,32 @@
* Wikipedia (2019): Bessel Function https://en.wikipedia.org/wiki/Bessel_function
* </li>
* </ul>
*
* It provides the following functionality:
*
* <br><br>
* <ul>
* <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></li>
* <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FunctionAnalysisLibrary.md">Function Analysis Library</a></li>
* <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/README.md">Special Function Implementation Analysis</a></li>
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/bessel/README.md">Ordered Bessel Function Variant Estimators</a></li>
* <li>Construct the Bessel Second Kind Estimator from the Watson Integer Integral Form</li>
* <li>Retrieve the Quadrature Count</li>
* </ul>
*
* <br>
* <style>table, td, th {
* padding: 1px; border: 2px solid #008000; border-radius: 8px; background-color: #dfff00;
* text-align: center; color: #0000ff;
* }
* </style>
*
* <table style="border:1px solid black;margin-left:auto;margin-right:auto;">
* <tr><td><b>Module </b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ProductCore.md">Product Core Module</a></td></tr>
* <tr><td><b>Library</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FixedIncomeAnalyticsLibrary.md">Fixed Income Analytics</a></td></tr>
* <tr><td><b>Project</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/README.md">Special Function Implementation and Analysis</a></td></tr>
* <tr><td><b>Package</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/bessel/README.md">Ordered Bessel Function Variant Estimators</a></td></tr>
* </table>
*
* @author Lakshmi Krishnamurthy
*/

public abstract class SecondWatsonIntegralEstimator extends
org.drip.specialfunction.definition.BesselSecondKindEstimator
public abstract class SecondWatsonIntegralEstimator extends BesselSecondKindEstimator
{
private int _quadratureCount = -1;

Expand All @@ -130,71 +150,59 @@ public abstract class SecondWatsonIntegralEstimator extends
public static final SecondWatsonIntegralEstimator IntegerForm (
final int quadratureCount)
{
try
{
return new SecondWatsonIntegralEstimator (quadratureCount)
{
try {
return new SecondWatsonIntegralEstimator (quadratureCount) {
@Override public double bigY (
final double alpha,
final double z)
throws java.lang.Exception
throws Exception
{
if (!org.drip.numerical.common.NumberUtil.IsInteger (alpha) ||
!org.drip.numerical.common.NumberUtil.IsValid (z))
{
if (!NumberUtil.IsInteger (alpha) || !NumberUtil.IsValid (z)) {
throw new java.lang.Exception
("SecondWatsonIntegralEstimator::IntegerForm::evaluate => Invalid Inputs " + alpha);
}

return (org.drip.numerical.integration.NewtonCotesQuadratureGenerator.Zero_PlusOne (
0.,
java.lang.Math.PI,
quadratureCount
).integrate (
new org.drip.function.definition.R1ToR1 (null)
{
@Override public double evaluate (
final double theta)
throws java.lang.Exception
{
if (java.lang.Double.isInfinite (theta))
return (
NewtonCotesQuadratureGenerator.Zero_PlusOne (
0.,
Math.PI,
quadratureCount
).integrate (
new R1ToR1 (null) {
@Override public double evaluate (
final double theta)
throws Exception
{
return 0.;
return Double.isInfinite (theta) ? 0. :
Math.sin (z * Math.sin (theta) - alpha * theta);
}

return java.lang.Math.sin (z * java.lang.Math.sin (theta) - alpha * theta);
}
}
) / java.lang.Math.PI) -
org.drip.numerical.integration.NewtonCotesQuadratureGenerator.GaussLaguerreLeftDefinite (
) / Math.PI
) - NewtonCotesQuadratureGenerator.GaussLaguerreLeftDefinite (
0.,
quadratureCount
).integrate (
new org.drip.function.definition.R1ToR1 (null)
{
new R1ToR1 (null) {
@Override public double evaluate (
final double t)
throws java.lang.Exception
throws Exception
{
if (java.lang.Double.isInfinite (t))
{
if (Double.isInfinite (t)) {
return 0.;
}

double ePowerAlphaT = java.lang.Math.exp (alpha * t);
double ePowerAlphaT = Math.exp (alpha * t);

double expPrefix = 0 == (alpha % 2) ? ePowerAlphaT + 1. / ePowerAlphaT :
ePowerAlphaT - 1. / ePowerAlphaT;

return expPrefix * java.lang.Math.exp (-z * java.lang.Math.sinh (t));
return expPrefix * Math.exp (-z * Math.sinh (t));
}
}
) / java.lang.Math.PI;
) / Math.PI;
}
};
}
catch (java.lang.Exception e)
{
} catch (Exception e) {
e.printStackTrace();
}

Expand All @@ -203,11 +211,10 @@ public static final SecondWatsonIntegralEstimator IntegerForm (

protected SecondWatsonIntegralEstimator (
final int quadratureCount)
throws java.lang.Exception
throws Exception
{
if (0 >= (_quadratureCount = quadratureCount))
{
throw new java.lang.Exception ("SecondWatsonIntegralEstimator Constructor => Invalid Inputs");
if (0 >= (_quadratureCount = quadratureCount)) {
throw new Exception ("SecondWatsonIntegralEstimator Constructor => Invalid Inputs");
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@

package org.drip.specialfunction.bessel;

import org.drip.numerical.common.NumberUtil;
import org.drip.specialfunction.definition.BesselFirstKindEstimator;
import org.drip.specialfunction.definition.BesselSecondKindEstimator;

/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*/

/*!
* Copyright (C) 2025 Lakshmi Krishnamurthy
* Copyright (C) 2024 Lakshmi Krishnamurthy
* Copyright (C) 2023 Lakshmi Krishnamurthy
* Copyright (C) 2022 Lakshmi Krishnamurthy
* Copyright (C) 2021 Lakshmi Krishnamurthy
* Copyright (C) 2020 Lakshmi Krishnamurthy
Expand Down Expand Up @@ -78,7 +85,7 @@

/**
* <i>SecondWeberEstimator</i> implements the Weber Estimation for the Cylindrical Bessel Function of the
* Second Kind. The References are:
* Second Kind. The References are:
*
* <br><br>
* <ul>
Expand All @@ -102,37 +109,49 @@
* Wikipedia (2019): Bessel Function https://en.wikipedia.org/wiki/Bessel_function
* </li>
* </ul>
*
* It provides the following functionality:
*
* <br><br>
* <ul>
* <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></li>
* <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FunctionAnalysisLibrary.md">Function Analysis Library</a></li>
* <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/README.md">Special Function Implementation Analysis</a></li>
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/bessel/README.md">Ordered Bessel Function Variant Estimators</a></li>
* <li><i>SecondWeberEstimator</i> Constructor</li>
* <li>Retrieve the Bessel Function First Kind Estimator</li>
* </ul>
*
* <br>
* <style>table, td, th {
* padding: 1px; border: 2px solid #008000; border-radius: 8px; background-color: #dfff00;
* text-align: center; color: #0000ff;
* }
* </style>
*
* <table style="border:1px solid black;margin-left:auto;margin-right:auto;">
* <tr><td><b>Module </b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ProductCore.md">Product Core Module</a></td></tr>
* <tr><td><b>Library</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FixedIncomeAnalyticsLibrary.md">Fixed Income Analytics</a></td></tr>
* <tr><td><b>Project</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/README.md">Special Function Implementation and Analysis</a></td></tr>
* <tr><td><b>Package</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/bessel/README.md">Ordered Bessel Function Variant Estimators</a></td></tr>
* </table>
*
* @author Lakshmi Krishnamurthy
*/

public class SecondWeberEstimator extends org.drip.specialfunction.definition.BesselSecondKindEstimator
public class SecondWeberEstimator extends BesselSecondKindEstimator
{
private org.drip.specialfunction.definition.BesselFirstKindEstimator _besselFirstKindEstimator = null;
private BesselFirstKindEstimator _besselFirstKindEstimator = null;

/**
* SecondWeberEstimator Constructor
* <i>SecondWeberEstimator</i> Constructor
*
* @param besselFirstKindEstimator Bessel Function First Kind Estimator
*
* @throws java.lang.Exception Thrown if the Inputs are Invalid
* @throws Exception Thrown if the Inputs are Invalid
*/

public SecondWeberEstimator (
final org.drip.specialfunction.definition.BesselFirstKindEstimator besselFirstKindEstimator)
throws java.lang.Exception
final BesselFirstKindEstimator besselFirstKindEstimator)
throws Exception
{
if (null == (_besselFirstKindEstimator = besselFirstKindEstimator))
{
throw new java.lang.Exception ("SecondWeberEstimator Constructor => Invalid Inputs");
if (null == (_besselFirstKindEstimator = besselFirstKindEstimator)) {
throw new Exception ("SecondWeberEstimator Constructor => Invalid Inputs");
}
}

Expand All @@ -142,30 +161,23 @@ public SecondWeberEstimator (
* @return The Bessel Function First Kind Estimator
*/

public org.drip.specialfunction.definition.BesselFirstKindEstimator besselFirstKindEstimator()
public BesselFirstKindEstimator besselFirstKindEstimator()
{
return _besselFirstKindEstimator;
}

@Override public double bigY (
final double alpha,
final double z)
throws java.lang.Exception
throws Exception
{
if (!org.drip.numerical.common.NumberUtil.IsValid (alpha) ||
!org.drip.numerical.common.NumberUtil.IsValid (z))
{
throw new java.lang.Exception ("SecondWeberEstimator::bigY => Invalid Inputs");
if (!NumberUtil.IsValid (alpha) || !NumberUtil.IsValid (z)) {
throw new Exception ("SecondWeberEstimator::bigY => Invalid Inputs");
}

return (
java.lang.Math.cos (java.lang.Math.PI * alpha) * _besselFirstKindEstimator.bigJ (
alpha,
z
) - _besselFirstKindEstimator.bigJ (
-1. * alpha,
z
)
) / java.lang.Math.sin (java.lang.Math.PI * alpha);
Math.cos (Math.PI * alpha) * _besselFirstKindEstimator.bigJ (alpha, z) -
_besselFirstKindEstimator.bigJ (-1. * alpha, z)
) / Math.sin (Math.PI * alpha);
}
}
Loading

0 comments on commit 9d6ebef

Please sign in to comment.