Skip to content

Commit 525d656

Browse files
committed
Features:
Bug Fixes/Re-organization: - Special Function Hypergeometric Euler Quadrature Estimator - Derivative (34, 35, 36) - Special Function Hypergeometric Euler Quadrature Estimator - Albinate (37, 38) - Special Function Hypergeometric Series Estimator #1 (39, 40, 41) - Special Function Hypergeometric Series Estimator #2 (42, 43) - Special Function Hypergeometric Series Estimator - Constructor (44, 45) - Special Function Hypergeometric Series Estimator - Pochhammer (46, 47, 48) - Special Function Hypergeometric Pochhammer Series Term (49, 50, 51) - Special Function Hypergeometric Pochhammer Series Term - Parameters (52, 53) - Special Function Hypergeometric Pochhammer Series Term - Constructor (54, 55) - Special Function Hypergeometric Pochhammer Series Term - Value (56, 57, 58) - Special Function Hypergeometric Pochhammer Series (59, 60) Samples: IdeaDRIP: - Currencies as Risk Factors in Global Portfolios (1-33)
1 parent c0dc26e commit 525d656

File tree

6 files changed

+156
-118
lines changed

6 files changed

+156
-118
lines changed

ReleaseNotes/07_27_2023.txt

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
Features:
3+
4+
Bug Fixes/Re-organization:
5+
6+
- Special Function Hypergeometric Euler Quadrature Estimator - Derivative (34, 35, 36)
7+
- Special Function Hypergeometric Euler Quadrature Estimator - Albinate (37, 38)
8+
- Special Function Hypergeometric Series Estimator #1 (39, 40, 41)
9+
- Special Function Hypergeometric Series Estimator #2 (42, 43)
10+
- Special Function Hypergeometric Series Estimator - Constructor (44, 45)
11+
- Special Function Hypergeometric Series Estimator - Pochhammer (46, 47, 48)
12+
- Special Function Hypergeometric Pochhammer Series Term (49, 50, 51)
13+
- Special Function Hypergeometric Pochhammer Series Term - Parameters (52, 53)
14+
- Special Function Hypergeometric Pochhammer Series Term - Constructor (54, 55)
15+
- Special Function Hypergeometric Pochhammer Series Term - Value (56, 57, 58)
16+
- Special Function Hypergeometric Pochhammer Series (59, 60)
17+
18+
19+
Samples:
20+
21+
IdeaDRIP:
22+
23+
- Currencies as Risk Factors in Global Portfolios (1-33)

ScheduleSheet.xlsx

12 Bytes
Binary file not shown.

src/main/java/org/drip/specialfunction/hypergeometric/EulerQuadratureEstimator.java

+14-30
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,9 @@ public R2ToR1 logBetaEstimator()
221221
@Override public double derivative (
222222
final double z,
223223
final int order)
224-
throws java.lang.Exception
224+
throws Exception
225225
{
226-
org.drip.specialfunction.definition.HypergeometricParameters hypergeometricParameters =
227-
hypergeometricParameters();
226+
HypergeometricParameters hypergeometricParameters = hypergeometricParameters();
228227

229228
double a = hypergeometricParameters.a();
230229

@@ -233,49 +232,34 @@ public R2ToR1 logBetaEstimator()
233232
double c = hypergeometricParameters.c();
234233

235234
return new EulerQuadratureEstimator (
236-
new org.drip.specialfunction.definition.HypergeometricParameters (
237-
a + order,
238-
b + order,
239-
c + order
240-
),
235+
new HypergeometricParameters (a + order, b + order, c + order),
241236
_logBetaEstimator,
242237
_quadratureCount
243-
).regularHypergeometric (z) * org.drip.numerical.common.NumberUtil.PochhammerSymbol (
244-
a,
245-
order
246-
) * org.drip.numerical.common.NumberUtil.PochhammerSymbol (
247-
b,
248-
order
249-
) / org.drip.numerical.common.NumberUtil.PochhammerSymbol (
250-
c,
251-
order
252-
);
238+
).regularHypergeometric (z) * NumberUtil.PochhammerSymbol (a, order) *
239+
NumberUtil.PochhammerSymbol (b, order) /
240+
NumberUtil.PochhammerSymbol (c, order);
253241
}
254242

255-
@Override public org.drip.specialfunction.definition.RegularHypergeometricEstimator albinate (
256-
final org.drip.specialfunction.definition.HypergeometricParameters hypergeometricParametersAlbinate,
257-
final org.drip.function.definition.R1ToR1 valueScaler,
258-
final org.drip.function.definition.R1ToR1 zTransformer)
243+
@Override public RegularHypergeometricEstimator albinate (
244+
final HypergeometricParameters hypergeometricParametersAlbinate,
245+
final R1ToR1 valueScaler,
246+
final R1ToR1 zTransformer)
259247
{
260-
try
261-
{
248+
try {
262249
return new EulerQuadratureEstimator (
263250
hypergeometricParametersAlbinate,
264251
_logBetaEstimator,
265-
_quadratureCount
266-
)
252+
_quadratureCount)
267253
{
268254
@Override public double regularHypergeometric (
269255
final double z)
270-
throws java.lang.Exception
256+
throws Exception
271257
{
272258
return (null == valueScaler ? 1. : valueScaler.evaluate (z)) *
273259
super.regularHypergeometric (null == zTransformer ? z : zTransformer.evaluate (z));
274260
}
275261
};
276-
}
277-
catch (java.lang.Exception e)
278-
{
262+
} catch (Exception e) {
279263
e.printStackTrace();
280264
}
281265

src/main/java/org/drip/specialfunction/hypergeometric/PochhammerSeries.java

+35-23
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11

22
package org.drip.specialfunction.hypergeometric;
33

4+
import java.util.TreeMap;
5+
6+
import org.drip.numerical.estimation.R1ToR1Series;
7+
import org.drip.specialfunction.definition.HypergeometricParameters;
8+
49
/*
510
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
611
*/
712

813
/*!
14+
* Copyright (C) 2025 Lakshmi Krishnamurthy
15+
* Copyright (C) 2024 Lakshmi Krishnamurthy
16+
* Copyright (C) 2023 Lakshmi Krishnamurthy
917
* Copyright (C) 2022 Lakshmi Krishnamurthy
1018
* Copyright (C) 2021 Lakshmi Krishnamurthy
1119
* Copyright (C) 2020 Lakshmi Krishnamurthy
@@ -78,7 +86,7 @@
7886

7987
/**
8088
* <i>PochhammerSeries</i> refers to the Estimation of the Hyper-geometric Function using the Pochhammer
81-
* Series Expansion. The References are:
89+
* Series Expansion. The References are:
8290
*
8391
* <br><br>
8492
* <ul>
@@ -103,15 +111,27 @@
103111
* Wikipedia (2019): Hyper-geometric Function https://en.wikipedia.org/wiki/Hypergeometric_function
104112
* </li>
105113
* </ul>
114+
*
115+
* It provides the following functionality:
106116
*
107-
* <br><br>
108117
* <ul>
109-
* <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></li>
110-
* <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FunctionAnalysisLibrary.md">Function Analysis Library</a></li>
111-
* <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>
112-
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/hypergeometric/README.md">Hyper-geometric Function Estimation Schemes</a></li>
118+
* <li>Construct the R<sup>1</sup> To R<sup>1</sup> Pochhammer Cumulative Series</li>
113119
* </ul>
114120
*
121+
* <br>
122+
* <style>table, td, th {
123+
* padding: 1px; border: 2px solid #008000; border-radius: 8px; background-color: #dfff00;
124+
* text-align: center; color: #0000ff;
125+
* }
126+
* </style>
127+
*
128+
* <table style="border:1px solid black;margin-left:auto;margin-right:auto;">
129+
* <tr><td><b>Module </b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></td></tr>
130+
* <tr><td><b>Library</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FunctionAnalysisLibrary.md">Function Analysis Library</a></td></tr>
131+
* <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>
132+
* <tr><td><b>Package</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/hypergeometric/README.md">Hyper-geometric Function Estimation Schemes</a></td></tr>
133+
* </table>
134+
*
115135
* @author Lakshmi Krishnamurthy
116136
*/
117137

@@ -127,31 +147,23 @@ public class PochhammerSeries
127147
* @return The R<sup>1</sup> To R<sup>1</sup> Pochhammer Cumulative Series
128148
*/
129149

130-
public static final org.drip.numerical.estimation.R1ToR1Series Create (
131-
final org.drip.specialfunction.definition.HypergeometricParameters hypergeometricParameters,
150+
public static final R1ToR1Series Create (
151+
final HypergeometricParameters hypergeometricParameters,
132152
final int termCount)
133153
{
134-
try
135-
{
136-
java.util.TreeMap<java.lang.Integer, java.lang.Double> termWeightMap = new
137-
java.util.TreeMap<java.lang.Integer, java.lang.Double>();
154+
try {
155+
TreeMap<Integer, Double> termWeightMap = new TreeMap<Integer, Double>();
138156

139-
for (int termIndex = 0; termIndex <= termCount; ++termIndex)
140-
{
141-
termWeightMap.put (
142-
termIndex,
143-
1.
144-
);
157+
for (int termIndex = 0; termIndex <= termCount; ++termIndex) {
158+
termWeightMap.put (termIndex, 1.);
145159
}
146160

147-
return new org.drip.numerical.estimation.R1ToR1Series (
148-
new org.drip.specialfunction.hypergeometric.PochhammerSeriesTerm (hypergeometricParameters),
161+
return new R1ToR1Series (
162+
new PochhammerSeriesTerm (hypergeometricParameters),
149163
false,
150164
termWeightMap
151165
);
152-
}
153-
catch (java.lang.Exception e)
154-
{
166+
} catch (Exception e) {
155167
e.printStackTrace();
156168
}
157169

src/main/java/org/drip/specialfunction/hypergeometric/PochhammerSeriesTerm.java

+43-35
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11

22
package org.drip.specialfunction.hypergeometric;
33

4+
import org.drip.numerical.common.NumberUtil;
5+
import org.drip.numerical.estimation.R1ToR1SeriesTerm;
6+
import org.drip.specialfunction.definition.HypergeometricParameters;
7+
48
/*
59
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
610
*/
711

812
/*!
13+
* Copyright (C) 2025 Lakshmi Krishnamurthy
14+
* Copyright (C) 2024 Lakshmi Krishnamurthy
15+
* Copyright (C) 2023 Lakshmi Krishnamurthy
916
* Copyright (C) 2022 Lakshmi Krishnamurthy
1017
* Copyright (C) 2021 Lakshmi Krishnamurthy
1118
* Copyright (C) 2020 Lakshmi Krishnamurthy
@@ -78,7 +85,7 @@
7885

7986
/**
8087
* <i>PochhammerSeriesTerm</i> refers to a Single Series Term in the Pochhammer Series Expansion of the
81-
* Hyper-geometric Function. The References are:
88+
* Hyper-geometric Function. The References are:
8289
*
8390
* <br><br>
8491
* <ul>
@@ -103,37 +110,49 @@
103110
* Wikipedia (2019): Hyper-geometric Function https://en.wikipedia.org/wiki/Hypergeometric_function
104111
* </li>
105112
* </ul>
113+
*
114+
* It provides the following functionality:
106115
*
107-
* <br><br>
108116
* <ul>
109-
* <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></li>
110-
* <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FunctionAnalysisLibrary.md">Function Analysis Library</a></li>
111-
* <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>
112-
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/hypergeometric/README.md">Hyper-geometric Function Estimation Schemes</a></li>
117+
* <li><i>PochhammerSeriesTerm</i> Constructor</li>
118+
* <li>Retrieve the Hyper-geometric Parameters</li>
113119
* </ul>
114120
*
121+
* <br>
122+
* <style>table, td, th {
123+
* padding: 1px; border: 2px solid #008000; border-radius: 8px; background-color: #dfff00;
124+
* text-align: center; color: #0000ff;
125+
* }
126+
* </style>
127+
*
128+
* <table style="border:1px solid black;margin-left:auto;margin-right:auto;">
129+
* <tr><td><b>Module </b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></td></tr>
130+
* <tr><td><b>Library</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FunctionAnalysisLibrary.md">Function Analysis Library</a></td></tr>
131+
* <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>
132+
* <tr><td><b>Package</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/hypergeometric/README.md">Hyper-geometric Function Estimation Schemes</a></td></tr>
133+
* </table>
134+
*
115135
* @author Lakshmi Krishnamurthy
116136
*/
117137

118-
public class PochhammerSeriesTerm extends org.drip.numerical.estimation.R1ToR1SeriesTerm
138+
public class PochhammerSeriesTerm extends R1ToR1SeriesTerm
119139
{
120-
private org.drip.specialfunction.definition.HypergeometricParameters _hypergeometricParameters = null;
140+
private HypergeometricParameters _hypergeometricParameters = null;
121141

122142
/**
123-
* PochhammerSeriesTerm Constructor
143+
* <i>PochhammerSeriesTerm</i> Constructor
124144
*
125145
* @param hypergeometricParameters The Hyper-geometric Parameters
126146
*
127-
* @throws java.lang.Exception Thrown if the Inputs are Invalid
147+
* @throws Exception Thrown if the Inputs are Invalid
128148
*/
129149

130150
public PochhammerSeriesTerm (
131-
final org.drip.specialfunction.definition.HypergeometricParameters hypergeometricParameters)
132-
throws java.lang.Exception
151+
final HypergeometricParameters hypergeometricParameters)
152+
throws Exception
133153
{
134-
if (null == (_hypergeometricParameters = hypergeometricParameters))
135-
{
136-
throw new java.lang.Exception ("PochhammerSeriesTerm Constructor => Invalid Inputs");
154+
if (null == (_hypergeometricParameters = hypergeometricParameters)) {
155+
throw new Exception ("PochhammerSeriesTerm Constructor => Invalid Inputs");
137156
}
138157
}
139158

@@ -143,36 +162,25 @@ public PochhammerSeriesTerm (
143162
* @return The Hyper-geometric Parameters
144163
*/
145164

146-
public org.drip.specialfunction.definition.HypergeometricParameters hypergeometricParameters()
165+
public HypergeometricParameters hypergeometricParameters()
147166
{
148167
return _hypergeometricParameters;
149168
}
150169

151170
@Override public double value (
152171
final int order,
153172
final double z)
154-
throws java.lang.Exception
173+
throws Exception
155174
{
156-
if (0 > order)
157-
{
158-
throw new java.lang.Exception ("PochhammerSeriesTerm::value => Invalid Inputs");
175+
if (0 > order) {
176+
throw new Exception ("PochhammerSeriesTerm::value => Invalid Inputs");
159177
}
160178

161-
org.drip.specialfunction.definition.HypergeometricParameters hypergeometricParameters =
162-
hypergeometricParameters();
179+
HypergeometricParameters hypergeometricParameters = hypergeometricParameters();
163180

164-
return org.drip.numerical.common.NumberUtil.RisingPochhammerSymbol (
165-
hypergeometricParameters.a(),
166-
order
167-
) * org.drip.numerical.common.NumberUtil.RisingPochhammerSymbol (
168-
hypergeometricParameters.b(),
169-
order
170-
) / org.drip.numerical.common.NumberUtil.RisingPochhammerSymbol (
171-
hypergeometricParameters.c(),
172-
order
173-
) * java.lang.Math.pow (
174-
z,
175-
order
176-
) / org.drip.numerical.common.NumberUtil.Factorial (order);
181+
return NumberUtil.RisingPochhammerSymbol (hypergeometricParameters.a(), order) *
182+
NumberUtil.RisingPochhammerSymbol (hypergeometricParameters.b(), order) /
183+
NumberUtil.RisingPochhammerSymbol (hypergeometricParameters.c(), order) *
184+
Math.pow (z, order) / NumberUtil.Factorial (order);
177185
}
178186
}

0 commit comments

Comments
 (0)