diff --git a/Docs/Internal/NumericalAnalysis/NumericalAnalysis_v6.44.pdf b/Docs/Internal/NumericalAnalysis/NumericalAnalysis_v6.45.pdf similarity index 66% rename from Docs/Internal/NumericalAnalysis/NumericalAnalysis_v6.44.pdf rename to Docs/Internal/NumericalAnalysis/NumericalAnalysis_v6.45.pdf index ecf8d8a5ffd9..148e9a684103 100644 Binary files a/Docs/Internal/NumericalAnalysis/NumericalAnalysis_v6.44.pdf and b/Docs/Internal/NumericalAnalysis/NumericalAnalysis_v6.45.pdf differ diff --git a/Docs/Internal/NumericalAnalysis/Shruti/Source/NumericalAnalysis_v6.45.docx b/Docs/Internal/NumericalAnalysis/Shruti/Source/NumericalAnalysis_v6.45.docx new file mode 100644 index 000000000000..3197b2344979 Binary files /dev/null and b/Docs/Internal/NumericalAnalysis/Shruti/Source/NumericalAnalysis_v6.45.docx differ diff --git a/IdeaDRIP/NumericalAnalysis/NA_v0.07 b/IdeaDRIP/NumericalAnalysis/NA_v0.07 new file mode 100644 index 000000000000..b96a1998267c --- /dev/null +++ b/IdeaDRIP/NumericalAnalysis/NA_v0.07 @@ -0,0 +1,192 @@ + + -------------------------- + #1 - Successive Over-Relaxation + -------------------------- + -------------------------- + 1.1) Successive Over-Relaxation Method for A.x = b; A - n x n square matrix, x - unknown vector, b - RHS vector + 1.2) Decompose A into Diagonal, Lower, and upper Triangular Matrices; A = D + L + U + 1.3) SOR Scheme uses omega input + 1.4) Forward subsitution scheme to iteratively determine the x_i's + 1.5) SOR Scheme Linear System Convergence: Inputs A and D, Jacobi Iteration Matrix Spectral Radius, omega + - Construct Jacobi Iteration Matrix: C_Jacobian = I - (Inverse D) A + - Convergence Verification #1: Ensure that Jacobi Iteration Matrix Spectral Radius is < 1 + - Convergence Verification #2: Ensure omega between 0 and 2 + - Optimal Relaxation Parameter Expression in terms of Jacobi Iteration Matrix Spectral Radius + - Omega Based Convergence Rate Expression + - Gauss-Seidel omega = 1; corresponding Convergence Rate + - Optimal Omega Convergence Rate + 1.6) Generic Iterative Solver Method: + - Inputs: Iterator Function(x) and omega + - Unrelaxed Iterated variable: x_n+1 = f(x_n) + - SOR Based Iterated variable: x_n+1 = (1-omega).x_n + omega.f(x_n) + - SOR Based Iterated variable for Unknown Vector x: x_n+1 = (1-omega).x_n + omega.(L_star inverse)(b - U.x_n) + -------------------------- + + -------------------------- + #2 - Successive Over-Relaxation + -------------------------- + -------------------------- + 2.1) SSOR Algorithm - Inputs; A, omega, and gamma + - Decompose into D and L + - Pre-conditioner Matrix: Expression from SSOR + - Finally SSOR Iteration Formula + -------------------------- + + ---------------------------- + #7 - Tridiagonal matrix algorithm + ---------------------------- + ---------------------------- + 7.1) Is Tridiagonal Check + 7.2) Core Algorithm: + - C Prime's and D Prime's Calculation + - Back Substitution for the Result + - Modified better Book-keeping algorithm + 7.3) Sherman-Morrison Algorithm: + - Choice of gamma + - Construct Tridiagonal B from A and gamma + - u Column from gamma and c_n + - v Column from a_1 and gamma + - Solve for y from By=d + - Solve for q from Bq=u + - Use Sherman Morrison Formula to extract x + 7.4) Alternate Boundary Condition Algorithm: + - Solve Au=d for u + - Solve Av={-a_2, 0, ..., -c_n} for v + - Full solution is x_i = u_i + x_1 * v_i + - x_1 if computed using formula + ---------------------------- + + ---------------------------- + #8 - Triangular Matrix + ---------------------------- + ---------------------------- + 8.1) Description: + - Lower/Left Triangular Verification + - Upper/Right Triangular Verification + - Diagonal Matrix Verification + - Upper/Lower Trapezoidal Verification + 8.2) Forward/Back Substitution: + - Inputs => L and b + - Forward Substitution + - Inputs => U and b + - Back Substitution + 8.3) Properties: + - Is Matrix Normal, i.e., A times A transpose = A transpose times A + - Characteristic Polynomial + - Determinant/Permanent + 8.4) Special Forms: + - Upper/Lower Unitriangular Matrix Verification + - Upper/Lower Strictly Matrix Verification + - Upper/Lower Atomic Matrix Verification + ---------------------------- + + ---------------------------- + #9 - Sylvester Equation + ---------------------------- + ---------------------------- + 9.1) Matrix Form: + - Inputs: A, B, and C + - Size Constraints Verification + 9.2) Solution Criteria: + - Co-joint EigenSpectrum between A and B + 9.3) Numerical Solution: + - Decomposition of A/B using Schur Decomposition into Triangular Form + - Forward/Back Substitution + ---------------------------- + + ---------------------------- + #10 - Bartels-Stewart Algorithm + ---------------------------- + ---------------------------- + 10.1) Matrix Form: + - Inputs: A, B, and C + - Size Constraints Verification + 10.2) Schur Decompositions: + - R = U^T A U - emits U and R + - S = V^T B^T V - emits V and S + - F = U^T C V + - Y = U^T X V + - Solution to R.Y - Y.S^T = F + - Finally X = U.Y.V^T + 10.3) Computational Costs: + - Flops cost for Schur decomposition + - Flops cost overall + 10.4) Hessenberg-Schur Decompositions: + - R = U^T A U becomes H = Q^T A Q - thus emits Q and H (Upper Hessenberg) + - Computational Costs + ---------------------------- + + ---------------------------- + #11 - Gershgorin Circle Theorem + ---------------------------- + ---------------------------- + 11.1) Gershgorin Disc: + - Diagonal Entry + - Radius + - One disc per Row/Column in Square Matrix + - Optimal Disc based on Row/Column + 11.2) Tolerance based Gershgorin Convergence Criterion + 11.3) Joint and Disjoint Discs + 11.4) Gershgorin Strengthener + 11.5) Row/Column Diagonal Dominance + ---------------------------- + + ---------------------------- + #12 - Condition Number + ---------------------------- + ---------------------------- + 12.1) Condition Number Calculation: + - Absolute Error + - Relative Error + - Absolute Condition Number + - Relative Condition Number + 12.2) Matrix Condition Number Calculation: + - Condition Number as a Product of Regular and Inverse Norms + - L2 Norm + - L2 Norm for Normal Matrix + - L2 Norm for Unitary Matrix + - Default Condition Number + - L Infinity Norm + - L Infinity Norm Triangular Matrix + 12.3) Non-linear + - One Variable + - Basic Formula + - Condition Numbers for Common Functions + - Multi Variables + ---------------------------- + + -------------------------- + #13 - Crank–Nicolson method + -------------------------- + -------------------------- + 13.1) von Neumann Stability Validator - Inputs; time-step, diffusivity, space step + - 1D => time step * diffusivity / space step ^2 < 0.5 + - nD => time step * diffusivity / (space step hypotenuse) ^ 2 < 0.5 + 13.2) Set up: + - Input: Spatial variable x + - Input: Time variable t + - Inputs: State variable u, du/dx, d2u/dx2 - all at time t + - Second Order, 1D => du/dt = F (u, x, t, du/dx, d2u/dx2) + 13.3) Finite Difference Evolution Scheme: + - Time Step delta_t, space step delta_x + - Forward Difference: F calculated at x + - Backward Difference: F calculated at x + delta_x + - Crank Nicolson: Average of Forward/Backward + 13.4) 1D Diffusion: + - Inputs: 1D von Neumann Stability Validator, Number of time/space steps + - Time Index n, Space Index i + - Explicit Tridiagonal form for the discretization - State concentration at n+1 given state concentration at n + - Non-linear diffusion coefficient: + - Linearization across x_i and x_i+1 + - Quasi-explicit forms accommodation + 13.5) 2D Diffusion: + - Inputs: 2D von Neumann Stability Validator, Number of time/space steps + - Time Index n, Space Index i, j + - Explicit Tridiagonal form for the discretization - State concentration at n+1 given state concentration at n + - Explicit Solution using the Alternative Difference Implicit Scheme + 13.6) Extension to Iterative Solver Schemes above: + - Input: State Space "velocity" dF/du + - Input: State "Step Size" delta_u + - Fixed Point Iterative Location Scheme + - Relaxation Scheme based Robustness => Input: Relaxation Parameter + -------------------------- diff --git a/NumericalAnalysisLibrary.md b/NumericalAnalysisLibrary.md index 14684ec9f333..150627d03f22 100644 --- a/NumericalAnalysisLibrary.md +++ b/NumericalAnalysisLibrary.md @@ -11,7 +11,7 @@ Numerical Analysis Library contains the supporting Functionality for Numerical M | Document | Link | |-------------------------|------| - | Technical Specification | [*Latest*](https://github.com/lakshmiDRIP/DROP/blob/master/Docs/Internal/NumericalAnalysis/NumericalAnalysis_v6.44.pdf) [*Previous*](https://github.com/lakshmiDRIP/DROP/blob/master/Docs/Internal/NumericalAnalysis) | + | Technical Specification | [*Latest*](https://github.com/lakshmiDRIP/DROP/blob/master/Docs/Internal/NumericalAnalysis/NumericalAnalysis_v6.45.pdf) [*Previous*](https://github.com/lakshmiDRIP/DROP/blob/master/Docs/Internal/NumericalAnalysis) | | User Guide | | | API | [*Javadoc*](https://lakshmidrip.github.io/DROP/Javadoc/index.html)| @@ -408,6 +408,14 @@ Numerical Analysis Library contains the supporting Functionality for Numerical M * Application * Example * References + * Condition Number + * Introduction + * General Definition in the Context of Error Analysis + * Matrices + * Non-linear + * One variable + * Several variables + * References ## DROP Specifications diff --git a/ReleaseNotes/03_04_2024.txt b/ReleaseNotes/03_04_2024.txt new file mode 100644 index 000000000000..541697efcbfc --- /dev/null +++ b/ReleaseNotes/03_04_2024.txt @@ -0,0 +1,16 @@ + +Features: + +Bug Fixes/Re-organization: + +Samples: + +IdeaDRIP: + + - Condition Number Matrices #1 (1-33) + - Condition Number Non-linear (34-35) + - Condition Number Non-linear - One Variable (36-45) + - Condition Number Non-linear - Several Variables (46-53) + - Condition Number Matrices - Introduction (54-77) + - Condition Number General Definition in the Context of Error Analysis (78-81) + - Condition Number Matrices #2 (82-120) diff --git a/ReleaseNotes/03_05_2024.txt b/ReleaseNotes/03_05_2024.txt new file mode 100644 index 000000000000..6c976d761e38 --- /dev/null +++ b/ReleaseNotes/03_05_2024.txt @@ -0,0 +1,63 @@ + +Features: + + - R^1 -> R^1 Function Definition Condition Number (26, 27, 28) + - R^1 -> R^1 Addition Operator Function #1 (29, 30, 31) + - R^1 -> R^1 Addition Operator Function #2 (32, 33, 34) + - R^1 -> R^1 Addition Operator Function Evaluate (35, 36) + - R^1 -> R^1 Addition Operator Function a (37, 38) + - R^1 -> R^1 Addition Operator Function Constructor (39, 40, 41) + - R^1 -> R^1 Addition Operator Function Condition Number (42, 43, 44) + - R^1 -> R^1 Addition Operator Function Derivative (45, 46) + - Built-in R^1 -> R^1 Operator Functions (47) + - R^1 -> R^1 Scale Operator Function Shell (59, 60) + - R^1 -> R^1 Scale Operator Function "a" (61, 62) + - R^1 -> R^1 Scale Operator Function Constructor (63, 64) + - R^1 -> R^1 Scale Operator Function Evaluate (65, 66) + - R^1 -> R^1 Scale Operator Function Derivative (67, 68) + - R^1 -> R^1 Scale Operator Function Condition Number (69, 70) + - R^1 -> R^1 Reciprocal Operator Function Condition Number (71, 72) + - R^1 -> R^1 Exponential Operator Function Shell (73, 74) + - R^1 -> R^1 Exponential Operator Function Constructor (75, 76) + - R^1 -> R^1 Exponential Operator Function Evaluate (77, 78) + - R^1 -> R^1 Exponential Operator Function Derivative (79, 80) + - R^1 -> R^1 Exponential Operator Function Condition Number (81, 82) + - R^1 -> R^1 Natural Logarithm Operator Function Shell (83, 84) + - R^1 -> R^1 Natural Logarithm Operator Function Constructor (85, 86) + - R^1 -> R^1 Natural Logarithm Operator Function Evaluate (87, 88) + - R^1 -> R^1 Natural Logarithm Operator Function Condition Number (89, 90) + - Built-in R^1 -> R^1 Trigonometric Functions (91, 92) + - R^1 -> R^1 Sine Trigonometric Function Shell (93, 94) + - R^1 -> R^1 Sine Trigonometric Function Constructor (95, 96) + - R^1 -> R^1 Sine Trigonometric Function Evaluate (97, 98) + - R^1 -> R^1 Sine Trigonometric Function Condition Number (99, 100) + - R^1 -> R^1 Cosine Trigonometric Function Shell (101, 102) + - R^1 -> R^1 Cosine Trigonometric Function Constructor (103, 104) + - R^1 -> R^1 Cosine Trigonometric Function Evaluate (105, 106) + - R^1 -> R^1 Cosine Trigonometric Function Condition Number (107, 108) + - R^1 -> R^1 Tangent Trigonometric Function Shell (109, 110) + - R^1 -> R^1 Tangent Trigonometric Function Constructor (111, 112) + - R^1 -> R^1 Tangent Trigonometric Function Evaluate (113, 114) + - R^1 -> R^1 Tangent Trigonometric Function Condition Number (115, 116) + - R^1 -> R^1 Inverse Sine Trigonometric Function Shell (117, 118) + - R^1 -> R^1 Inverse Sine Trigonometric Function Constructor (119, 120) + + +Bug Fixes/Re-organization: + + - R^1 -> R^1 Addition Operator Function Migration (48, 49) + - R^1 -> R^1 Flat Operator Function Migration (50, 51) + - R^1 -> R^1 Offset Idempotent Operator Migration (52) + - R^1 -> R^1 Convolution Operator Function Migration (53, 54) + - R^1 -> R^1 Reciprocal Operator Function Migration (55, 56) + - R^1 -> R^1 Reflection Operator Function Migration (57, 58) + + +Samples: + +IdeaDRIP: + + - Condition Number Matrices (1-5) + - Condition Number Non-linear (6-7) + - Condition Number Non-linear - One Variable (8-17) + - Condition Number Non-linear - Several Variables (18-25) diff --git a/src/main/java/org/drip/execution/adaptive/CoordinatedVariationTrajectoryGenerator.java b/src/main/java/org/drip/execution/adaptive/CoordinatedVariationTrajectoryGenerator.java index 850e3def88ab..fd352be3b8c5 100644 --- a/src/main/java/org/drip/execution/adaptive/CoordinatedVariationTrajectoryGenerator.java +++ b/src/main/java/org/drip/execution/adaptive/CoordinatedVariationTrajectoryGenerator.java @@ -146,7 +146,7 @@ private org.drip.execution.dynamics.LinearPermanentExpectationParameters realize try { return new org.drip.execution.dynamics.LinearPermanentExpectationParameters (new org.drip.execution.parameters.ArithmeticPriceDynamicsSettings (0., new - org.drip.function.r1tor1.FlatUnivariate (_cv.referenceVolatility() * java.lang.Math.exp + org.drip.function.r1tor1operator.Flat (_cv.referenceVolatility() * java.lang.Math.exp (-0.5 * dblMarketState)), 0.), new org.drip.execution.profiletime.UniformParticipationRateLinear (org.drip.execution.impact.ParticipationRateLinear.NoImpact()), new diff --git a/src/main/java/org/drip/execution/athl/DynamicsParameters.java b/src/main/java/org/drip/execution/athl/DynamicsParameters.java index 132fcd1d6c9c..f9bd6dce472e 100644 --- a/src/main/java/org/drip/execution/athl/DynamicsParameters.java +++ b/src/main/java/org/drip/execution/athl/DynamicsParameters.java @@ -158,7 +158,7 @@ public org.drip.execution.dynamics.LinearPermanentExpectationParameters almgren2 try { return org.drip.execution.dynamics.ArithmeticPriceEvolutionParametersBuilder.Almgren2003 (new org.drip.execution.parameters.ArithmeticPriceDynamicsSettings (0., new - org.drip.function.r1tor1.FlatUnivariate (_afp.dailyVolatility()), 0.), new + org.drip.function.r1tor1operator.Flat (_afp.dailyVolatility()), 0.), new org.drip.execution.profiletime.UniformParticipationRateLinear (new org.drip.execution.athl.PermanentImpactNoArbitrage (_afp)), new org.drip.execution.profiletime.UniformParticipationRate (new diff --git a/src/main/java/org/drip/execution/dynamics/ArithmeticPriceEvolutionParametersBuilder.java b/src/main/java/org/drip/execution/dynamics/ArithmeticPriceEvolutionParametersBuilder.java index b23d5c57758e..919171cd39e7 100644 --- a/src/main/java/org/drip/execution/dynamics/ArithmeticPriceEvolutionParametersBuilder.java +++ b/src/main/java/org/drip/execution/dynamics/ArithmeticPriceEvolutionParametersBuilder.java @@ -195,7 +195,7 @@ public static final org.drip.execution.dynamics.LinearPermanentExpectationParame try { return new org.drip.execution.dynamics.ArithmeticPriceEvolutionParameters (new org.drip.execution.parameters.ArithmeticPriceDynamicsSettings (0., new - org.drip.function.r1tor1.FlatUnivariate (dblPriceVolatility), 0.), new + org.drip.function.r1tor1operator.Flat (dblPriceVolatility), 0.), new org.drip.execution.profiletime.UniformParticipationRate (org.drip.execution.impact.ParticipationRateLinear.NoImpact()), bprlTemporaryExpectation, new @@ -255,7 +255,7 @@ public static final org.drip.execution.dynamics.ArithmeticPriceEvolutionParamete final org.drip.execution.tradingtime.CoordinatedVariation cv) { try { - return CoordinatedVariation (new org.drip.function.r1tor1.FlatUnivariate (dblPriceVolatility), + return CoordinatedVariation (new org.drip.function.r1tor1operator.Flat (dblPriceVolatility), cv); } catch (java.lang.Exception e) { e.printStackTrace(); @@ -281,7 +281,7 @@ public static final org.drip.execution.dynamics.ArithmeticPriceEvolutionParamete try { return new org.drip.execution.dynamics.LinearPermanentExpectationParameters (new org.drip.execution.parameters.ArithmeticPriceDynamicsSettings (0., new - org.drip.function.r1tor1.FlatUnivariate (cv.referenceVolatility()), 0.), new + org.drip.function.r1tor1operator.Flat (cv.referenceVolatility()), 0.), new org.drip.execution.profiletime.UniformParticipationRateLinear (org.drip.execution.impact.ParticipationRateLinear.NoImpact()), new org.drip.execution.profiletime.UniformParticipationRateLinear diff --git a/src/main/java/org/drip/execution/parameters/ArithmeticPriceDynamicsSettings.java b/src/main/java/org/drip/execution/parameters/ArithmeticPriceDynamicsSettings.java index 9d59b52419ea..8e5525bc739b 100644 --- a/src/main/java/org/drip/execution/parameters/ArithmeticPriceDynamicsSettings.java +++ b/src/main/java/org/drip/execution/parameters/ArithmeticPriceDynamicsSettings.java @@ -147,7 +147,7 @@ public static final ArithmeticPriceDynamicsSettings FromAnnualReturnsSettings ( try { return new ArithmeticPriceDynamicsSettings (dblPrice * dblAnnualReturnsExpectation / 250., new - org.drip.function.r1tor1.FlatUnivariate (dblPrice * dblAnnualReturnsVolatility / + org.drip.function.r1tor1operator.Flat (dblPrice * dblAnnualReturnsVolatility / java.lang.Math.sqrt (250.)), dblSerialCorrelation); } catch (java.lang.Exception e) { e.printStackTrace(); diff --git a/src/main/java/org/drip/function/definition/R1ToR1.java b/src/main/java/org/drip/function/definition/R1ToR1.java index a4ab29bc5fc8..f1908a731d18 100644 --- a/src/main/java/org/drip/function/definition/R1ToR1.java +++ b/src/main/java/org/drip/function/definition/R1ToR1.java @@ -414,4 +414,21 @@ public org.drip.function.definition.PoleResidue poleResidue ( { return null; } + + /** + * Compute the Condition Number at the specified Variate + * + * @param x Variate + * + * @return The Condition Number + * + * @throws Exception Thrown if the Condition Number cannor be computed + */ + + public double conditionNumber ( + final double x) + throws Exception + { + return x * derivative (x, 1) / evaluate (x); + } } diff --git a/src/main/java/org/drip/function/r1tor1/BernsteinPolynomial.java b/src/main/java/org/drip/function/r1tor1/BernsteinPolynomial.java index c0fde8874605..02beced71d48 100644 --- a/src/main/java/org/drip/function/r1tor1/BernsteinPolynomial.java +++ b/src/main/java/org/drip/function/r1tor1/BernsteinPolynomial.java @@ -97,7 +97,7 @@ * @author Lakshmi Krishnamurthy */ -public class BernsteinPolynomial extends org.drip.function.r1tor1.UnivariateConvolution { +public class BernsteinPolynomial extends org.drip.function.r1tor1operator.Convolution { /** * Construct a BernsteinPolynomial instance @@ -114,7 +114,7 @@ public BernsteinPolynomial ( throws java.lang.Exception { super (new org.drip.function.r1tor1.NaturalLogSeriesElement (iBaseExponent), new - org.drip.function.r1tor1.UnivariateReflection (new org.drip.function.r1tor1.NaturalLogSeriesElement + org.drip.function.r1tor1operator.Reflection (new org.drip.function.r1tor1.NaturalLogSeriesElement (iComplementExponent))); } diff --git a/src/main/java/org/drip/function/r1tor1/LinearRationalTensionExponential.java b/src/main/java/org/drip/function/r1tor1/LinearRationalTensionExponential.java index c5c0c457888c..d6d58c31c8eb 100644 --- a/src/main/java/org/drip/function/r1tor1/LinearRationalTensionExponential.java +++ b/src/main/java/org/drip/function/r1tor1/LinearRationalTensionExponential.java @@ -97,7 +97,7 @@ * @author Lakshmi Krishnamurthy */ -public class LinearRationalTensionExponential extends org.drip.function.r1tor1.UnivariateConvolution { +public class LinearRationalTensionExponential extends org.drip.function.r1tor1operator.Convolution { /** * Construct a LinearRationalTensionExponential instance diff --git a/src/main/java/org/drip/function/r1tor1operator/Addition.java b/src/main/java/org/drip/function/r1tor1operator/Addition.java new file mode 100644 index 000000000000..554d05ef5cb5 --- /dev/null +++ b/src/main/java/org/drip/function/r1tor1operator/Addition.java @@ -0,0 +1,179 @@ + +package org.drip.function.r1tor1operator; + +import org.drip.function.definition.R1ToR1; +import org.drip.numerical.common.NumberUtil; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2025 Lakshmi Krishnamurthy + * + * This file is part of DROP, an open-source library targeting analytics/risk, transaction cost analytics, + * asset liability management analytics, capital, exposure, and margin analytics, valuation adjustment + * analytics, and portfolio construction analytics within and across fixed income, credit, commodity, + * equity, FX, and structured products. It also includes auxiliary libraries for algorithm support, + * numerical analysis, numerical optimization, spline builder, model validation, statistical learning, + * graph builder/navigator, and computational support. + * + * https://lakshmidrip.github.io/DROP/ + * + * DROP is composed of three modules: + * + * - DROP Product Core - https://lakshmidrip.github.io/DROP-Product-Core/ + * - DROP Portfolio Core - https://lakshmidrip.github.io/DROP-Portfolio-Core/ + * - DROP Computational Core - https://lakshmidrip.github.io/DROP-Computational-Core/ + * + * DROP Product Core implements libraries for the following: + * - Fixed Income Analytics + * - Loan Analytics + * - Transaction Cost Analytics + * + * DROP Portfolio Core implements libraries for the following: + * - Asset Allocation Analytics + * - Asset Liability Management Analytics + * - Capital Estimation Analytics + * - Exposure Analytics + * - Margin Analytics + * - XVA Analytics + * + * DROP Computational Core implements libraries for the following: + * - Algorithm Support + * - Computation Support + * - Function Analysis + * - Graph Algorithm + * - Model Validation + * - Numerical Analysis + * - Numerical Optimizer + * - Spline Builder + * - Statistical Learning + * + * Documentation for DROP is Spread Over: + * + * - Main => https://lakshmidrip.github.io/DROP/ + * - Wiki => https://github.com/lakshmiDRIP/DROP/wiki + * - GitHub => https://github.com/lakshmiDRIP/DROP + * - Repo Layout Taxonomy => https://github.com/lakshmiDRIP/DROP/blob/master/Taxonomy.md + * - Javadoc => https://lakshmidrip.github.io/DROP/Javadoc/index.html + * - Technical Specifications => https://github.com/lakshmiDRIP/DROP/tree/master/Docs/Internal + * - Release Versions => https://lakshmidrip.github.io/DROP/version.html + * - Community Credits => https://lakshmidrip.github.io/DROP/credits.html + * - Issues Catalog => https://github.com/lakshmiDRIP/DROP/issues + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Addition implements the Univariate x + a Operator Function. The References are: + * + *

+ * + * + *

+ * + *

+ * + * @author Lakshmi Krishnamurthy + */ + +public class Addition extends R1ToR1 +{ + private double _a = Double.NaN; + + /** + * Addition Constructor + * + * @param a a + * + * @throws Exception Thrown if the Input is Invalid + */ + + public Addition ( + final double a) + throws Exception + { + super (null); + + if (!NumberUtil.IsValid (_a = a)) { + throw new Exception ("Addition Constructor => Invalid Inputs"); + } + } + + /** + * Retrieve a + * + * @return a + */ + + public double a() + { + return _a; + } + + @Override public double evaluate ( + final double x) + throws Exception + { + if (!NumberUtil.IsValid (x)) { + throw new Exception ("Addition::evaluate => Invalid Inputs"); + } + + return x + _a; + } + + @Override public double derivative ( + final double x, + final int order) + throws Exception + { + return 1 == order ? 1. : 0.; + } + + @Override public double conditionNumber ( + final double x) + throws Exception + { + if (!NumberUtil.IsValid (x)) { + throw new Exception ("Addition::conditionNumber => Invalid Inputs"); + } + + return Math.abs (x / (x + _a)); + } +} diff --git a/src/main/java/org/drip/function/r1tor1/UnivariateConvolution.java b/src/main/java/org/drip/function/r1tor1operator/Convolution.java similarity index 91% rename from src/main/java/org/drip/function/r1tor1/UnivariateConvolution.java rename to src/main/java/org/drip/function/r1tor1operator/Convolution.java index 436ad19c6713..37a8a06f387c 100644 --- a/src/main/java/org/drip/function/r1tor1/UnivariateConvolution.java +++ b/src/main/java/org/drip/function/r1tor1operator/Convolution.java @@ -1,5 +1,5 @@ -package org.drip.function.r1tor1; +package org.drip.function.r1tor1operator; /* * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -83,26 +83,26 @@ */ /** - * UnivariateConvolution provides the evaluation of the Convolution au1 * au2 and its derivatives for - * a specified variate. + * Convolution provides the evaluation of the Convolution au1 * au2 and its derivatives + * for a specified variate. * *

* * * @author Lakshmi Krishnamurthy */ -public class UnivariateConvolution extends org.drip.function.definition.R1ToR1 { +public class Convolution extends org.drip.function.definition.R1ToR1 { private org.drip.function.definition.R1ToR1 _au1 = null; private org.drip.function.definition.R1ToR1 _au2 = null; /** - * Construct a PolynomialMirrorCross instance + * Construct a Convolution instance * * @param au1 Univariate Function #1 * @param au2 Univariate Function #2 @@ -110,7 +110,7 @@ public class UnivariateConvolution extends org.drip.function.definition.R1ToR1 { * @throws java.lang.Exception Thrown if the inputs are invalid */ - public UnivariateConvolution ( + public Convolution ( final org.drip.function.definition.R1ToR1 au1, final org.drip.function.definition.R1ToR1 au2) throws java.lang.Exception @@ -152,7 +152,7 @@ public UnivariateConvolution ( { if (!org.drip.numerical.common.NumberUtil.IsValid (dblBegin) || !org.drip.numerical.common.NumberUtil.IsValid (dblEnd)) - throw new java.lang.Exception ("HyperbolicTension::integrate => Invalid Inputs"); + throw new java.lang.Exception ("Convolution::integrate => Invalid Inputs"); return org.drip.numerical.integration.R1ToR1Integrator.Boole (this, dblBegin, dblEnd); } diff --git a/src/main/java/org/drip/function/r1tor1operator/Exponential.java b/src/main/java/org/drip/function/r1tor1operator/Exponential.java new file mode 100644 index 000000000000..44cec2900ec6 --- /dev/null +++ b/src/main/java/org/drip/function/r1tor1operator/Exponential.java @@ -0,0 +1,160 @@ + +package org.drip.function.r1tor1operator; + +import org.drip.function.definition.R1ToR1; +import org.drip.numerical.common.NumberUtil; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2025 Lakshmi Krishnamurthy + * + * This file is part of DROP, an open-source library targeting analytics/risk, transaction cost analytics, + * asset liability management analytics, capital, exposure, and margin analytics, valuation adjustment + * analytics, and portfolio construction analytics within and across fixed income, credit, commodity, + * equity, FX, and structured products. It also includes auxiliary libraries for algorithm support, + * numerical analysis, numerical optimization, spline builder, model validation, statistical learning, + * graph builder/navigator, and computational support. + * + * https://lakshmidrip.github.io/DROP/ + * + * DROP is composed of three modules: + * + * - DROP Product Core - https://lakshmidrip.github.io/DROP-Product-Core/ + * - DROP Portfolio Core - https://lakshmidrip.github.io/DROP-Portfolio-Core/ + * - DROP Computational Core - https://lakshmidrip.github.io/DROP-Computational-Core/ + * + * DROP Product Core implements libraries for the following: + * - Fixed Income Analytics + * - Loan Analytics + * - Transaction Cost Analytics + * + * DROP Portfolio Core implements libraries for the following: + * - Asset Allocation Analytics + * - Asset Liability Management Analytics + * - Capital Estimation Analytics + * - Exposure Analytics + * - Margin Analytics + * - XVA Analytics + * + * DROP Computational Core implements libraries for the following: + * - Algorithm Support + * - Computation Support + * - Function Analysis + * - Graph Algorithm + * - Model Validation + * - Numerical Analysis + * - Numerical Optimizer + * - Spline Builder + * - Statistical Learning + * + * Documentation for DROP is Spread Over: + * + * - Main => https://lakshmidrip.github.io/DROP/ + * - Wiki => https://github.com/lakshmiDRIP/DROP/wiki + * - GitHub => https://github.com/lakshmiDRIP/DROP + * - Repo Layout Taxonomy => https://github.com/lakshmiDRIP/DROP/blob/master/Taxonomy.md + * - Javadoc => https://lakshmidrip.github.io/DROP/Javadoc/index.html + * - Technical Specifications => https://github.com/lakshmiDRIP/DROP/tree/master/Docs/Internal + * - Release Versions => https://lakshmidrip.github.io/DROP/version.html + * - Community Credits => https://lakshmidrip.github.io/DROP/credits.html + * - Issues Catalog => https://github.com/lakshmiDRIP/DROP/issues + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Addition implements the Univariate x + a Operator Function. The References are: + * + *

+ * + * + *

+ * + *

+ * + * @author Lakshmi Krishnamurthy + */ + +public class Exponential extends R1ToR1 +{ + + /** + * Exponential Constructor + * + * @throws Exception Thrown if the Input is Invalid + */ + + public Exponential() + throws Exception + { + super (null); + } + + @Override public double evaluate ( + final double x) + throws Exception + { + if (!NumberUtil.IsValid (x)) { + throw new Exception ("Exponential::evaluate => Invalid Inputs"); + } + + return Math.exp (x); + } + + @Override public double derivative ( + final double x, + final int order) + throws Exception + { + return evaluate (x); + } + + @Override public double conditionNumber ( + final double x) + throws Exception + { + if (!NumberUtil.IsValid (x)) { + throw new Exception ("Exponential::conditionNumber => Invalid Inputs"); + } + + return Math.abs (x); + } +} diff --git a/src/main/java/org/drip/function/r1tor1/FlatUnivariate.java b/src/main/java/org/drip/function/r1tor1operator/Flat.java similarity index 89% rename from src/main/java/org/drip/function/r1tor1/FlatUnivariate.java rename to src/main/java/org/drip/function/r1tor1operator/Flat.java index 975c64ee3f37..c42aab3765a1 100644 --- a/src/main/java/org/drip/function/r1tor1/FlatUnivariate.java +++ b/src/main/java/org/drip/function/r1tor1operator/Flat.java @@ -1,5 +1,5 @@ -package org.drip.function.r1tor1; +package org.drip.function.r1tor1operator; /* * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -82,38 +82,38 @@ */ /** - * FlatUnivariate implements the level constant Univariate Function. + * Flat implements the level constant Univariate Function. * *

* * * @author Lakshmi Krishnamurthy */ -public class FlatUnivariate extends org.drip.function.definition.R1ToR1 { +public class Flat extends org.drip.function.definition.R1ToR1 { private double _dblLevel = java.lang.Double.NaN; /** - * FlatUnivariate constructor + * Flat constructor * - * @param dblLevel The FlatUnivariate Level + * @param dblLevel The Flat Level * * @throws java.lang.Exception Thrown if the Inputs are invalid */ - public FlatUnivariate ( + public Flat ( final double dblLevel) throws java.lang.Exception { super (null); if (!org.drip.numerical.common.NumberUtil.IsValid (_dblLevel = dblLevel)) - throw new java.lang.Exception ("FlatUnivariate ctr => Invalid Inputs"); + throw new java.lang.Exception ("Flat ctr => Invalid Inputs"); } @Override public double evaluate ( @@ -121,7 +121,7 @@ public FlatUnivariate ( throws java.lang.Exception { if (!org.drip.numerical.common.NumberUtil.IsValid (dblVariate)) - throw new java.lang.Exception ("FlatUnivariate::evaluate => Invalid Inputs"); + throw new java.lang.Exception ("Flat::evaluate => Invalid Inputs"); return _dblLevel; } @@ -149,7 +149,7 @@ public FlatUnivariate ( { if (!org.drip.numerical.common.NumberUtil.IsValid (dblBegin) || !org.drip.numerical.common.NumberUtil.IsValid (dblEnd)) - throw new java.lang.Exception ("FlatUnivariate::integrate => Invalid Inputs"); + throw new java.lang.Exception ("Flat::integrate => Invalid Inputs"); return (dblEnd - dblBegin) * _dblLevel; } diff --git a/src/main/java/org/drip/function/r1tor1operator/NaturalLogarithm.java b/src/main/java/org/drip/function/r1tor1operator/NaturalLogarithm.java new file mode 100644 index 000000000000..7a7f9404bf8e --- /dev/null +++ b/src/main/java/org/drip/function/r1tor1operator/NaturalLogarithm.java @@ -0,0 +1,152 @@ + +package org.drip.function.r1tor1operator; + +import org.drip.function.definition.R1ToR1; +import org.drip.numerical.common.NumberUtil; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2025 Lakshmi Krishnamurthy + * + * This file is part of DROP, an open-source library targeting analytics/risk, transaction cost analytics, + * asset liability management analytics, capital, exposure, and margin analytics, valuation adjustment + * analytics, and portfolio construction analytics within and across fixed income, credit, commodity, + * equity, FX, and structured products. It also includes auxiliary libraries for algorithm support, + * numerical analysis, numerical optimization, spline builder, model validation, statistical learning, + * graph builder/navigator, and computational support. + * + * https://lakshmidrip.github.io/DROP/ + * + * DROP is composed of three modules: + * + * - DROP Product Core - https://lakshmidrip.github.io/DROP-Product-Core/ + * - DROP Portfolio Core - https://lakshmidrip.github.io/DROP-Portfolio-Core/ + * - DROP Computational Core - https://lakshmidrip.github.io/DROP-Computational-Core/ + * + * DROP Product Core implements libraries for the following: + * - Fixed Income Analytics + * - Loan Analytics + * - Transaction Cost Analytics + * + * DROP Portfolio Core implements libraries for the following: + * - Asset Allocation Analytics + * - Asset Liability Management Analytics + * - Capital Estimation Analytics + * - Exposure Analytics + * - Margin Analytics + * - XVA Analytics + * + * DROP Computational Core implements libraries for the following: + * - Algorithm Support + * - Computation Support + * - Function Analysis + * - Graph Algorithm + * - Model Validation + * - Numerical Analysis + * - Numerical Optimizer + * - Spline Builder + * - Statistical Learning + * + * Documentation for DROP is Spread Over: + * + * - Main => https://lakshmidrip.github.io/DROP/ + * - Wiki => https://github.com/lakshmiDRIP/DROP/wiki + * - GitHub => https://github.com/lakshmiDRIP/DROP + * - Repo Layout Taxonomy => https://github.com/lakshmiDRIP/DROP/blob/master/Taxonomy.md + * - Javadoc => https://lakshmidrip.github.io/DROP/Javadoc/index.html + * - Technical Specifications => https://github.com/lakshmiDRIP/DROP/tree/master/Docs/Internal + * - Release Versions => https://lakshmidrip.github.io/DROP/version.html + * - Community Credits => https://lakshmidrip.github.io/DROP/credits.html + * - Issues Catalog => https://github.com/lakshmiDRIP/DROP/issues + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * NaturalLogarithm implements the Natural Log Operator Function. The References are: + * + *

+ * + * + *

+ * + *

+ * + * @author Lakshmi Krishnamurthy + */ + +public class NaturalLogarithm extends R1ToR1 +{ + + /** + * NaturalLogarithm Constructor + * + * @throws Exception Thrown if the Input is Invalid + */ + + public NaturalLogarithm() + throws Exception + { + super (null); + } + + @Override public double evaluate ( + final double x) + throws Exception + { + if (!NumberUtil.IsValid (x)) { + throw new Exception ("NaturalLogarithm::evaluate => Invalid Inputs"); + } + + return Math.log (x); + } + + @Override public double conditionNumber ( + final double x) + throws Exception + { + if (!NumberUtil.IsValid (x)) { + throw new Exception ("NaturalLogarithm::conditionNumber => Invalid Inputs"); + } + + return Math.abs (1. / Math.log (x)); + } +} diff --git a/src/main/java/org/drip/function/r1tor1/OffsetIdempotent.java b/src/main/java/org/drip/function/r1tor1operator/OffsetIdempotent.java similarity index 96% rename from src/main/java/org/drip/function/r1tor1/OffsetIdempotent.java rename to src/main/java/org/drip/function/r1tor1operator/OffsetIdempotent.java index 6396b15a9471..cb0cf2b6f54a 100644 --- a/src/main/java/org/drip/function/r1tor1/OffsetIdempotent.java +++ b/src/main/java/org/drip/function/r1tor1operator/OffsetIdempotent.java @@ -1,5 +1,5 @@ -package org.drip.function.r1tor1; +package org.drip.function.r1tor1operator; /* * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -88,7 +88,7 @@ *
  • Module = Computational Core Module
  • *
  • Library = Numerical Analysis Library
  • *
  • Project = Rd To Rd Function Analysis
  • - *
  • Package = Built-in R1 To R1 Functions
  • + *
  • Package = Built-in R1 To R1 Operator Functions
  • * * * @author Lakshmi Krishnamurthy diff --git a/src/main/java/org/drip/function/r1tor1/UnivariateReciprocal.java b/src/main/java/org/drip/function/r1tor1operator/Reciprocal.java similarity index 78% rename from src/main/java/org/drip/function/r1tor1/UnivariateReciprocal.java rename to src/main/java/org/drip/function/r1tor1operator/Reciprocal.java index f239a375c0f7..9c2ee0e1d0e0 100644 --- a/src/main/java/org/drip/function/r1tor1/UnivariateReciprocal.java +++ b/src/main/java/org/drip/function/r1tor1operator/Reciprocal.java @@ -1,5 +1,7 @@ -package org.drip.function.r1tor1; +package org.drip.function.r1tor1operator; + +import org.drip.numerical.common.NumberUtil; /* * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -82,37 +84,37 @@ */ /** - * UnivariateReciprocal provides the evaluation 1/f(x) instead of f(x) for a given f. + * Reciprocal provides the evaluation 1/f(x) instead of f(x) for a given f. * *

    * * * @author Lakshmi Krishnamurthy */ -public class UnivariateReciprocal extends org.drip.function.definition.R1ToR1 { +public class Reciprocal extends org.drip.function.definition.R1ToR1 { private org.drip.function.definition.R1ToR1 _au = null; /** - * UnivariateReciprocal constructor + * Reciprocal constructor * * @param au Univariate Function * * @throws java.lang.Exception Thrown if the input is invalid */ - public UnivariateReciprocal ( + public Reciprocal ( final org.drip.function.definition.R1ToR1 au) throws java.lang.Exception { super (null); - if (null == (_au = au)) throw new java.lang.Exception ("UnivariateReciprocal ctr: Invalid Inputs"); + if (null == (_au = au)) throw new java.lang.Exception ("Reciprocal ctr: Invalid Inputs"); } @Override public double evaluate ( @@ -122,23 +124,14 @@ public UnivariateReciprocal ( return 1. / _au.evaluate (dblVariate); } - /* public static final void main ( - final java.lang.String[] astrArgs) - throws java.lang.Exception + @Override public double conditionNumber ( + final double x) + throws Exception { - UnivariateReciprocal ur = new UnivariateReciprocal (new - org.drip.function.r1tor1.NaturalLogSeriesElement (1)); - - System.out.println ("UnivariateReciprocal[0.0] = " + ur.evaluate (0.0)); - - System.out.println ("UnivariateReciprocal[0.5] = " + ur.evaluate (0.5)); + if (!NumberUtil.IsValid (x)) { + throw new Exception ("Reciprocal::conditionNumber => Invalid Inputs"); + } - System.out.println ("UnivariateReciprocal[1.0] = " + ur.evaluate (1.0)); - - System.out.println ("UnivariateReciprocalDeriv[0.0] = " + ur.derivative (0.0, 3)); - - System.out.println ("UnivariateReciprocalDeriv[0.5] = " + ur.derivative (0.5, 3)); - - System.out.println ("UnivariateReciprocalDeriv[1.0] = " + ur.derivative (1.0, 3)); - } */ + return 1.; + } } diff --git a/src/main/java/org/drip/function/r1tor1/UnivariateReflection.java b/src/main/java/org/drip/function/r1tor1operator/Reflection.java similarity index 78% rename from src/main/java/org/drip/function/r1tor1/UnivariateReflection.java rename to src/main/java/org/drip/function/r1tor1operator/Reflection.java index 41d463c462b7..e6663330e371 100644 --- a/src/main/java/org/drip/function/r1tor1/UnivariateReflection.java +++ b/src/main/java/org/drip/function/r1tor1operator/Reflection.java @@ -1,5 +1,5 @@ -package org.drip.function.r1tor1; +package org.drip.function.r1tor1operator; /* * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -83,37 +83,37 @@ */ /** - * UnivariateReflection provides the evaluation f(1-x) instead of f(x) for a given f. + * Reflection provides the evaluation f(1-x) instead of f(x) for a given f. * *

    * * * @author Lakshmi Krishnamurthy */ -public class UnivariateReflection extends org.drip.function.definition.R1ToR1 { +public class Reflection extends org.drip.function.definition.R1ToR1 { private org.drip.function.definition.R1ToR1 _au = null; /** - * UnivariateReflection constructor + * Reflection constructor * * @param au Univariate Function * * @throws java.lang.Exception Thrown if the input is invalid */ - public UnivariateReflection ( + public Reflection ( final org.drip.function.definition.R1ToR1 au) throws java.lang.Exception { super (null); - if (null == (_au = au)) throw new java.lang.Exception ("UnivariateReflection ctr: Invalid Inputs"); + if (null == (_au = au)) throw new java.lang.Exception ("Reflection ctr: Invalid Inputs"); } @Override public double evaluate ( @@ -121,7 +121,7 @@ public UnivariateReflection ( throws java.lang.Exception { if (!org.drip.numerical.common.NumberUtil.IsValid (dblVariate)) - throw new java.lang.Exception ("UnivariateReflection::evaluate => Invalid Inputs"); + throw new java.lang.Exception ("Reflection::evaluate => Invalid Inputs"); return _au.evaluate (1. - dblVariate); } @@ -132,7 +132,7 @@ public UnivariateReflection ( throws java.lang.Exception { if (!org.drip.numerical.common.NumberUtil.IsValid (dblVariate) || 0 >= iOrder) - throw new java.lang.Exception ("UnivariateReflection::derivative => Invalid Inputs"); + throw new java.lang.Exception ("Reflection::derivative => Invalid Inputs"); return java.lang.Math.pow (-1., iOrder) * _au.derivative (1. - dblVariate, iOrder); } @@ -144,27 +144,8 @@ public UnivariateReflection ( { if (!org.drip.numerical.common.NumberUtil.IsValid (dblBegin) || !org.drip.numerical.common.NumberUtil.IsValid (dblEnd)) - throw new java.lang.Exception ("UnivariateReflection::integrate => Invalid Inputs"); + throw new java.lang.Exception ("Reflection::integrate => Invalid Inputs"); return -1. * _au.integrate (1. - dblBegin, 1. - dblEnd); } - - /* public static final void main ( - final java.lang.String[] astrArgs) - throws java.lang.Exception - { - UnivariateReflection ur = new UnivariateReflection (new Polynomial (4)); - - System.out.println ("UnivariateReflection[0.0] = " + ur.evaluate (0.0)); - - System.out.println ("UnivariateReflection[0.5] = " + ur.evaluate (0.5)); - - System.out.println ("UnivariateReflection[1.0] = " + ur.evaluate (1.0)); - - System.out.println ("UnivariateReflectionDeriv[0.0] = " + ur.derivative (0.0, 3)); - - System.out.println ("UnivariateReflectionDeriv[0.5] = " + ur.derivative (0.5, 3)); - - System.out.println ("UnivariateReflectionDeriv[1.0] = " + ur.derivative (1.0, 3)); - } */ } diff --git a/src/main/java/org/drip/function/r1tor1operator/Scaler.java b/src/main/java/org/drip/function/r1tor1operator/Scaler.java new file mode 100644 index 000000000000..ce376ad0e099 --- /dev/null +++ b/src/main/java/org/drip/function/r1tor1operator/Scaler.java @@ -0,0 +1,179 @@ + +package org.drip.function.r1tor1operator; + +import org.drip.function.definition.R1ToR1; +import org.drip.numerical.common.NumberUtil; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2025 Lakshmi Krishnamurthy + * + * This file is part of DROP, an open-source library targeting analytics/risk, transaction cost analytics, + * asset liability management analytics, capital, exposure, and margin analytics, valuation adjustment + * analytics, and portfolio construction analytics within and across fixed income, credit, commodity, + * equity, FX, and structured products. It also includes auxiliary libraries for algorithm support, + * numerical analysis, numerical optimization, spline builder, model validation, statistical learning, + * graph builder/navigator, and computational support. + * + * https://lakshmidrip.github.io/DROP/ + * + * DROP is composed of three modules: + * + * - DROP Product Core - https://lakshmidrip.github.io/DROP-Product-Core/ + * - DROP Portfolio Core - https://lakshmidrip.github.io/DROP-Portfolio-Core/ + * - DROP Computational Core - https://lakshmidrip.github.io/DROP-Computational-Core/ + * + * DROP Product Core implements libraries for the following: + * - Fixed Income Analytics + * - Loan Analytics + * - Transaction Cost Analytics + * + * DROP Portfolio Core implements libraries for the following: + * - Asset Allocation Analytics + * - Asset Liability Management Analytics + * - Capital Estimation Analytics + * - Exposure Analytics + * - Margin Analytics + * - XVA Analytics + * + * DROP Computational Core implements libraries for the following: + * - Algorithm Support + * - Computation Support + * - Function Analysis + * - Graph Algorithm + * - Model Validation + * - Numerical Analysis + * - Numerical Optimizer + * - Spline Builder + * - Statistical Learning + * + * Documentation for DROP is Spread Over: + * + * - Main => https://lakshmidrip.github.io/DROP/ + * - Wiki => https://github.com/lakshmiDRIP/DROP/wiki + * - GitHub => https://github.com/lakshmiDRIP/DROP + * - Repo Layout Taxonomy => https://github.com/lakshmiDRIP/DROP/blob/master/Taxonomy.md + * - Javadoc => https://lakshmidrip.github.io/DROP/Javadoc/index.html + * - Technical Specifications => https://github.com/lakshmiDRIP/DROP/tree/master/Docs/Internal + * - Release Versions => https://lakshmidrip.github.io/DROP/version.html + * - Community Credits => https://lakshmidrip.github.io/DROP/credits.html + * - Issues Catalog => https://github.com/lakshmiDRIP/DROP/issues + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Scaler implements the a.x Operator Function. The References are: + * + *

    + * + * + *

    + * + *

    + * + * @author Lakshmi Krishnamurthy + */ + +public class Scaler extends R1ToR1 +{ + private double _a = Double.NaN; + + /** + * Scaler Constructor + * + * @param a a + * + * @throws Exception Thrown if the Inout is Invalid + */ + + public Scaler ( + final double a) + throws Exception + { + super (null); + + if (!NumberUtil.IsValid (_a = a)) { + throw new Exception ("Scaler Constructor => Invalid Inputs"); + } + } + + /** + * Retrieve a + * + * @return a + */ + + public double a() + { + return _a; + } + + @Override public double evaluate ( + final double x) + throws Exception + { + if (!NumberUtil.IsValid (x)) { + throw new Exception ("Scaler::evaluate => Invalid Inputs"); + } + + return _a * x; + } + + @Override public double derivative ( + final double x, + final int order) + throws Exception + { + return 1 == order ? _a : 0.; + } + + @Override public double conditionNumber ( + final double x) + throws Exception + { + if (!NumberUtil.IsValid (x)) { + throw new Exception ("Scaler::conditionNumber => Invalid Inputs"); + } + + return 1.; + } +} diff --git a/src/main/java/org/drip/function/r1tor1operator/package-info.java b/src/main/java/org/drip/function/r1tor1operator/package-info.java new file mode 100644 index 000000000000..ac1604f63bc4 --- /dev/null +++ b/src/main/java/org/drip/function/r1tor1operator/package-info.java @@ -0,0 +1,8 @@ + +/** + * Built-in R1 To R1 Operator Functions + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.function.r1tor1operator; diff --git a/src/main/java/org/drip/function/r1tor1trigonometric/Cosine.java b/src/main/java/org/drip/function/r1tor1trigonometric/Cosine.java new file mode 100644 index 000000000000..060c0b5a8461 --- /dev/null +++ b/src/main/java/org/drip/function/r1tor1trigonometric/Cosine.java @@ -0,0 +1,152 @@ + +package org.drip.function.r1tor1trigonometric; + +import org.drip.function.definition.R1ToR1; +import org.drip.numerical.common.NumberUtil; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2025 Lakshmi Krishnamurthy + * + * This file is part of DROP, an open-source library targeting analytics/risk, transaction cost analytics, + * asset liability management analytics, capital, exposure, and margin analytics, valuation adjustment + * analytics, and portfolio construction analytics within and across fixed income, credit, commodity, + * equity, FX, and structured products. It also includes auxiliary libraries for algorithm support, + * numerical analysis, numerical optimization, spline builder, model validation, statistical learning, + * graph builder/navigator, and computational support. + * + * https://lakshmidrip.github.io/DROP/ + * + * DROP is composed of three modules: + * + * - DROP Product Core - https://lakshmidrip.github.io/DROP-Product-Core/ + * - DROP Portfolio Core - https://lakshmidrip.github.io/DROP-Portfolio-Core/ + * - DROP Computational Core - https://lakshmidrip.github.io/DROP-Computational-Core/ + * + * DROP Product Core implements libraries for the following: + * - Fixed Income Analytics + * - Loan Analytics + * - Transaction Cost Analytics + * + * DROP Portfolio Core implements libraries for the following: + * - Asset Allocation Analytics + * - Asset Liability Management Analytics + * - Capital Estimation Analytics + * - Exposure Analytics + * - Margin Analytics + * - XVA Analytics + * + * DROP Computational Core implements libraries for the following: + * - Algorithm Support + * - Computation Support + * - Function Analysis + * - Graph Algorithm + * - Model Validation + * - Numerical Analysis + * - Numerical Optimizer + * - Spline Builder + * - Statistical Learning + * + * Documentation for DROP is Spread Over: + * + * - Main => https://lakshmidrip.github.io/DROP/ + * - Wiki => https://github.com/lakshmiDRIP/DROP/wiki + * - GitHub => https://github.com/lakshmiDRIP/DROP + * - Repo Layout Taxonomy => https://github.com/lakshmiDRIP/DROP/blob/master/Taxonomy.md + * - Javadoc => https://lakshmidrip.github.io/DROP/Javadoc/index.html + * - Technical Specifications => https://github.com/lakshmiDRIP/DROP/tree/master/Docs/Internal + * - Release Versions => https://lakshmidrip.github.io/DROP/version.html + * - Community Credits => https://lakshmidrip.github.io/DROP/credits.html + * - Issues Catalog => https://github.com/lakshmiDRIP/DROP/issues + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Cosine implements the Trigonometric Cosine Function. The References are: + * + *

    + * + * + *

    + * + *

    + * + * @author Lakshmi Krishnamurthy + */ + +public class Cosine extends R1ToR1 +{ + + /** + * Cosine Constructor + * + * @throws Exception Thrown if the Input is Invalid + */ + + public Cosine() + throws Exception + { + super (null); + } + + @Override public double evaluate ( + final double x) + throws Exception + { + if (!NumberUtil.IsValid (x)) { + throw new Exception ("Cosine::evaluate => Invalid Inputs"); + } + + return Math.cos (x); + } + + @Override public double conditionNumber ( + final double x) + throws Exception + { + if (!NumberUtil.IsValid (x)) { + throw new Exception ("Cosine::conditionNumber => Invalid Inputs"); + } + + return Math.abs (x * Math.tan (x)); + } +} diff --git a/src/main/java/org/drip/function/r1tor1trigonometric/InverseSine.java b/src/main/java/org/drip/function/r1tor1trigonometric/InverseSine.java new file mode 100644 index 000000000000..bec4e6bc531b --- /dev/null +++ b/src/main/java/org/drip/function/r1tor1trigonometric/InverseSine.java @@ -0,0 +1,152 @@ + +package org.drip.function.r1tor1trigonometric; + +import org.drip.function.definition.R1ToR1; +import org.drip.numerical.common.NumberUtil; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2025 Lakshmi Krishnamurthy + * + * This file is part of DROP, an open-source library targeting analytics/risk, transaction cost analytics, + * asset liability management analytics, capital, exposure, and margin analytics, valuation adjustment + * analytics, and portfolio construction analytics within and across fixed income, credit, commodity, + * equity, FX, and structured products. It also includes auxiliary libraries for algorithm support, + * numerical analysis, numerical optimization, spline builder, model validation, statistical learning, + * graph builder/navigator, and computational support. + * + * https://lakshmidrip.github.io/DROP/ + * + * DROP is composed of three modules: + * + * - DROP Product Core - https://lakshmidrip.github.io/DROP-Product-Core/ + * - DROP Portfolio Core - https://lakshmidrip.github.io/DROP-Portfolio-Core/ + * - DROP Computational Core - https://lakshmidrip.github.io/DROP-Computational-Core/ + * + * DROP Product Core implements libraries for the following: + * - Fixed Income Analytics + * - Loan Analytics + * - Transaction Cost Analytics + * + * DROP Portfolio Core implements libraries for the following: + * - Asset Allocation Analytics + * - Asset Liability Management Analytics + * - Capital Estimation Analytics + * - Exposure Analytics + * - Margin Analytics + * - XVA Analytics + * + * DROP Computational Core implements libraries for the following: + * - Algorithm Support + * - Computation Support + * - Function Analysis + * - Graph Algorithm + * - Model Validation + * - Numerical Analysis + * - Numerical Optimizer + * - Spline Builder + * - Statistical Learning + * + * Documentation for DROP is Spread Over: + * + * - Main => https://lakshmidrip.github.io/DROP/ + * - Wiki => https://github.com/lakshmiDRIP/DROP/wiki + * - GitHub => https://github.com/lakshmiDRIP/DROP + * - Repo Layout Taxonomy => https://github.com/lakshmiDRIP/DROP/blob/master/Taxonomy.md + * - Javadoc => https://lakshmidrip.github.io/DROP/Javadoc/index.html + * - Technical Specifications => https://github.com/lakshmiDRIP/DROP/tree/master/Docs/Internal + * - Release Versions => https://lakshmidrip.github.io/DROP/version.html + * - Community Credits => https://lakshmidrip.github.io/DROP/credits.html + * - Issues Catalog => https://github.com/lakshmiDRIP/DROP/issues + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * InverseSine implements the Trigonometric Inverse Sine Function. The References are: + * + *

    + * + * + *

    + * + *

    + * + * @author Lakshmi Krishnamurthy + */ + +public class InverseSine extends R1ToR1 +{ + + /** + * InverseSine Constructor + * + * @throws Exception Thrown if the Input is Invalid + */ + + public InverseSine() + throws Exception + { + super (null); + } + + @Override public double evaluate ( + final double x) + throws Exception + { + if (!NumberUtil.IsValid (x)) { + throw new Exception ("InverseSine::evaluate => Invalid Inputs"); + } + + return Math.asin (x); + } + + @Override public double conditionNumber ( + final double x) + throws Exception + { + if (!NumberUtil.IsValid (x)) { + throw new Exception ("InverseSine::conditionNumber => Invalid Inputs"); + } + + return x / (Math.asin (x) * Math.sqrt (1. - x * x)); + } +} diff --git a/src/main/java/org/drip/function/r1tor1trigonometric/Sine.java b/src/main/java/org/drip/function/r1tor1trigonometric/Sine.java new file mode 100644 index 000000000000..e2f5601e5105 --- /dev/null +++ b/src/main/java/org/drip/function/r1tor1trigonometric/Sine.java @@ -0,0 +1,152 @@ + +package org.drip.function.r1tor1trigonometric; + +import org.drip.function.definition.R1ToR1; +import org.drip.numerical.common.NumberUtil; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2025 Lakshmi Krishnamurthy + * + * This file is part of DROP, an open-source library targeting analytics/risk, transaction cost analytics, + * asset liability management analytics, capital, exposure, and margin analytics, valuation adjustment + * analytics, and portfolio construction analytics within and across fixed income, credit, commodity, + * equity, FX, and structured products. It also includes auxiliary libraries for algorithm support, + * numerical analysis, numerical optimization, spline builder, model validation, statistical learning, + * graph builder/navigator, and computational support. + * + * https://lakshmidrip.github.io/DROP/ + * + * DROP is composed of three modules: + * + * - DROP Product Core - https://lakshmidrip.github.io/DROP-Product-Core/ + * - DROP Portfolio Core - https://lakshmidrip.github.io/DROP-Portfolio-Core/ + * - DROP Computational Core - https://lakshmidrip.github.io/DROP-Computational-Core/ + * + * DROP Product Core implements libraries for the following: + * - Fixed Income Analytics + * - Loan Analytics + * - Transaction Cost Analytics + * + * DROP Portfolio Core implements libraries for the following: + * - Asset Allocation Analytics + * - Asset Liability Management Analytics + * - Capital Estimation Analytics + * - Exposure Analytics + * - Margin Analytics + * - XVA Analytics + * + * DROP Computational Core implements libraries for the following: + * - Algorithm Support + * - Computation Support + * - Function Analysis + * - Graph Algorithm + * - Model Validation + * - Numerical Analysis + * - Numerical Optimizer + * - Spline Builder + * - Statistical Learning + * + * Documentation for DROP is Spread Over: + * + * - Main => https://lakshmidrip.github.io/DROP/ + * - Wiki => https://github.com/lakshmiDRIP/DROP/wiki + * - GitHub => https://github.com/lakshmiDRIP/DROP + * - Repo Layout Taxonomy => https://github.com/lakshmiDRIP/DROP/blob/master/Taxonomy.md + * - Javadoc => https://lakshmidrip.github.io/DROP/Javadoc/index.html + * - Technical Specifications => https://github.com/lakshmiDRIP/DROP/tree/master/Docs/Internal + * - Release Versions => https://lakshmidrip.github.io/DROP/version.html + * - Community Credits => https://lakshmidrip.github.io/DROP/credits.html + * - Issues Catalog => https://github.com/lakshmiDRIP/DROP/issues + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Sine implements the Trigonometric Sine Function. The References are: + * + *

    + * + * + *

    + * + *

    + * + * @author Lakshmi Krishnamurthy + */ + +public class Sine extends R1ToR1 +{ + + /** + * Sine Constructor + * + * @throws Exception Thrown if the Input is Invalid + */ + + public Sine() + throws Exception + { + super (null); + } + + @Override public double evaluate ( + final double x) + throws Exception + { + if (!NumberUtil.IsValid (x)) { + throw new Exception ("Sine::evaluate => Invalid Inputs"); + } + + return Math.sin (x); + } + + @Override public double conditionNumber ( + final double x) + throws Exception + { + if (!NumberUtil.IsValid (x)) { + throw new Exception ("Sine::conditionNumber => Invalid Inputs"); + } + + return Math.abs (x / Math.tan (x)); + } +} diff --git a/src/main/java/org/drip/function/r1tor1trigonometric/Tangent.java b/src/main/java/org/drip/function/r1tor1trigonometric/Tangent.java new file mode 100644 index 000000000000..0104fcd8dc40 --- /dev/null +++ b/src/main/java/org/drip/function/r1tor1trigonometric/Tangent.java @@ -0,0 +1,154 @@ + +package org.drip.function.r1tor1trigonometric; + +import org.drip.function.definition.R1ToR1; +import org.drip.numerical.common.NumberUtil; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2025 Lakshmi Krishnamurthy + * + * This file is part of DROP, an open-source library targeting analytics/risk, transaction cost analytics, + * asset liability management analytics, capital, exposure, and margin analytics, valuation adjustment + * analytics, and portfolio construction analytics within and across fixed income, credit, commodity, + * equity, FX, and structured products. It also includes auxiliary libraries for algorithm support, + * numerical analysis, numerical optimization, spline builder, model validation, statistical learning, + * graph builder/navigator, and computational support. + * + * https://lakshmidrip.github.io/DROP/ + * + * DROP is composed of three modules: + * + * - DROP Product Core - https://lakshmidrip.github.io/DROP-Product-Core/ + * - DROP Portfolio Core - https://lakshmidrip.github.io/DROP-Portfolio-Core/ + * - DROP Computational Core - https://lakshmidrip.github.io/DROP-Computational-Core/ + * + * DROP Product Core implements libraries for the following: + * - Fixed Income Analytics + * - Loan Analytics + * - Transaction Cost Analytics + * + * DROP Portfolio Core implements libraries for the following: + * - Asset Allocation Analytics + * - Asset Liability Management Analytics + * - Capital Estimation Analytics + * - Exposure Analytics + * - Margin Analytics + * - XVA Analytics + * + * DROP Computational Core implements libraries for the following: + * - Algorithm Support + * - Computation Support + * - Function Analysis + * - Graph Algorithm + * - Model Validation + * - Numerical Analysis + * - Numerical Optimizer + * - Spline Builder + * - Statistical Learning + * + * Documentation for DROP is Spread Over: + * + * - Main => https://lakshmidrip.github.io/DROP/ + * - Wiki => https://github.com/lakshmiDRIP/DROP/wiki + * - GitHub => https://github.com/lakshmiDRIP/DROP + * - Repo Layout Taxonomy => https://github.com/lakshmiDRIP/DROP/blob/master/Taxonomy.md + * - Javadoc => https://lakshmidrip.github.io/DROP/Javadoc/index.html + * - Technical Specifications => https://github.com/lakshmiDRIP/DROP/tree/master/Docs/Internal + * - Release Versions => https://lakshmidrip.github.io/DROP/version.html + * - Community Credits => https://lakshmidrip.github.io/DROP/credits.html + * - Issues Catalog => https://github.com/lakshmiDRIP/DROP/issues + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Tangent implements the Trigonometric Tangent Function. The References are: + * + *

    + * + * + *

    + * + *

    + * + * @author Lakshmi Krishnamurthy + */ + +public class Tangent extends R1ToR1 +{ + + /** + * Tangent Constructor + * + * @throws Exception Thrown if the Input is Invalid + */ + + public Tangent() + throws Exception + { + super (null); + } + + @Override public double evaluate ( + final double x) + throws Exception + { + if (!NumberUtil.IsValid (x)) { + throw new Exception ("Tangent::evaluate => Invalid Inputs"); + } + + return Math.tan (x); + } + + @Override public double conditionNumber ( + final double x) + throws Exception + { + if (!NumberUtil.IsValid (x)) { + throw new Exception ("Tangent::conditionNumber => Invalid Inputs"); + } + + double tan = Math.tan (x); + + return Math.abs (x / (tan + (1. / tan))); + } +} diff --git a/src/main/java/org/drip/function/r1tor1trigonometric/package-info.java b/src/main/java/org/drip/function/r1tor1trigonometric/package-info.java new file mode 100644 index 000000000000..10a210eb4a31 --- /dev/null +++ b/src/main/java/org/drip/function/r1tor1trigonometric/package-info.java @@ -0,0 +1,8 @@ + +/** + * Built-in R1 To R1 Trigonometric Functions + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.function.r1tor1trigonometric; diff --git a/src/main/java/org/drip/sample/almgren2003/ContinuousTrajectoryConcaveImpact.java b/src/main/java/org/drip/sample/almgren2003/ContinuousTrajectoryConcaveImpact.java index 6f701a17b78a..dbfad89b0a16 100644 --- a/src/main/java/org/drip/sample/almgren2003/ContinuousTrajectoryConcaveImpact.java +++ b/src/main/java/org/drip/sample/almgren2003/ContinuousTrajectoryConcaveImpact.java @@ -7,7 +7,7 @@ import org.drip.execution.optimum.PowerImpactContinuous; import org.drip.execution.parameters.*; import org.drip.execution.profiletime.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -200,7 +200,7 @@ public static final void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.Almgren2003 ( new ArithmeticPriceDynamicsSettings ( dblDrift, - new FlatUnivariate (dblVolatility), + new Flat (dblVolatility), dblSerialCorrelation ), new UniformParticipationRateLinear ( diff --git a/src/main/java/org/drip/sample/almgren2003/ContinuousTrajectoryConvexImpact.java b/src/main/java/org/drip/sample/almgren2003/ContinuousTrajectoryConvexImpact.java index b9b51e46c02e..528c20406d6d 100644 --- a/src/main/java/org/drip/sample/almgren2003/ContinuousTrajectoryConvexImpact.java +++ b/src/main/java/org/drip/sample/almgren2003/ContinuousTrajectoryConvexImpact.java @@ -7,7 +7,7 @@ import org.drip.execution.optimum.PowerImpactContinuous; import org.drip.execution.parameters.*; import org.drip.execution.profiletime.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -200,7 +200,7 @@ public static final void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.Almgren2003 ( new ArithmeticPriceDynamicsSettings ( dblDrift, - new FlatUnivariate (dblVolatility), + new Flat (dblVolatility), dblSerialCorrelation ), new UniformParticipationRateLinear ( diff --git a/src/main/java/org/drip/sample/almgren2003/ContinuousTrajectoryLinearImpact.java b/src/main/java/org/drip/sample/almgren2003/ContinuousTrajectoryLinearImpact.java index 965719b6f6a2..bc4c45f12e5e 100644 --- a/src/main/java/org/drip/sample/almgren2003/ContinuousTrajectoryLinearImpact.java +++ b/src/main/java/org/drip/sample/almgren2003/ContinuousTrajectoryLinearImpact.java @@ -7,7 +7,7 @@ import org.drip.execution.optimum.PowerImpactContinuous; import org.drip.execution.parameters.*; import org.drip.execution.profiletime.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -200,7 +200,7 @@ public static final void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.Almgren2003 ( new ArithmeticPriceDynamicsSettings ( dblDrift, - new FlatUnivariate (dblVolatility), + new Flat (dblVolatility), dblSerialCorrelation ), new UniformParticipationRateLinear ( diff --git a/src/main/java/org/drip/sample/almgren2003/PowerLawOptimalTrajectory.java b/src/main/java/org/drip/sample/almgren2003/PowerLawOptimalTrajectory.java index e35446ef5938..058c8d3fff7e 100644 --- a/src/main/java/org/drip/sample/almgren2003/PowerLawOptimalTrajectory.java +++ b/src/main/java/org/drip/sample/almgren2003/PowerLawOptimalTrajectory.java @@ -8,7 +8,7 @@ import org.drip.execution.parameters.ArithmeticPriceDynamicsSettings; import org.drip.execution.profiletime.*; import org.drip.function.definition.R1ToR1; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -185,7 +185,7 @@ private static final void RiskAversionRun ( ArithmeticPriceDynamicsSettings apds = new ArithmeticPriceDynamicsSettings ( dblDrift, - new FlatUnivariate (dblVolatility), + new Flat (dblVolatility), dblSerialCorrelation ); diff --git a/src/main/java/org/drip/sample/almgren2009/HighUrgencyTrajectoryComparison.java b/src/main/java/org/drip/sample/almgren2009/HighUrgencyTrajectoryComparison.java index 8dfff9497880..97962b15d4db 100644 --- a/src/main/java/org/drip/sample/almgren2009/HighUrgencyTrajectoryComparison.java +++ b/src/main/java/org/drip/sample/almgren2009/HighUrgencyTrajectoryComparison.java @@ -8,7 +8,7 @@ import org.drip.execution.parameters.*; import org.drip.execution.profiletime.UniformParticipationRateLinear; import org.drip.function.definition.R1ToR1; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -191,7 +191,7 @@ public static void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.LinearExpectation ( new ArithmeticPriceDynamicsSettings ( 0., - new FlatUnivariate (dblSigma), + new Flat (dblSigma), 0. ), new UniformParticipationRateLinear (prlPermanent), diff --git a/src/main/java/org/drip/sample/almgren2009/LowUrgencyTrajectoryComparison.java b/src/main/java/org/drip/sample/almgren2009/LowUrgencyTrajectoryComparison.java index e0818c6b0447..3ceeb191b297 100644 --- a/src/main/java/org/drip/sample/almgren2009/LowUrgencyTrajectoryComparison.java +++ b/src/main/java/org/drip/sample/almgren2009/LowUrgencyTrajectoryComparison.java @@ -8,7 +8,7 @@ import org.drip.execution.parameters.*; import org.drip.execution.profiletime.UniformParticipationRateLinear; import org.drip.function.definition.R1ToR1; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -191,7 +191,7 @@ public static void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.LinearExpectation ( new ArithmeticPriceDynamicsSettings ( 0., - new FlatUnivariate (dblSigma), + new Flat (dblSigma), 0. ), new UniformParticipationRateLinear (prlPermanent), diff --git a/src/main/java/org/drip/sample/almgren2009/StaticContinuousOptimalTrajectory.java b/src/main/java/org/drip/sample/almgren2009/StaticContinuousOptimalTrajectory.java index d9d9c37206f8..51c1f547936f 100644 --- a/src/main/java/org/drip/sample/almgren2009/StaticContinuousOptimalTrajectory.java +++ b/src/main/java/org/drip/sample/almgren2009/StaticContinuousOptimalTrajectory.java @@ -8,7 +8,7 @@ import org.drip.execution.parameters.*; import org.drip.execution.profiletime.UniformParticipationRateLinear; import org.drip.function.definition.R1ToR1; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -192,7 +192,7 @@ public static void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.LinearExpectation ( new ArithmeticPriceDynamicsSettings ( 0., - new FlatUnivariate (dblSigma), + new Flat (dblSigma), 0. ), new UniformParticipationRateLinear (prlPermanent), diff --git a/src/main/java/org/drip/sample/almgrenchriss/EfficientFrontierNoDrift.java b/src/main/java/org/drip/sample/almgrenchriss/EfficientFrontierNoDrift.java index 0756e52a7dbf..c7b327190174 100644 --- a/src/main/java/org/drip/sample/almgrenchriss/EfficientFrontierNoDrift.java +++ b/src/main/java/org/drip/sample/almgrenchriss/EfficientFrontierNoDrift.java @@ -7,7 +7,7 @@ import org.drip.execution.optimum.AlmgrenChrissDiscrete; import org.drip.execution.parameters.ArithmeticPriceDynamicsSettings; import org.drip.execution.profiletime.UniformParticipationRateLinear; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -192,7 +192,7 @@ public static void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.LinearExpectation ( new ArithmeticPriceDynamicsSettings ( dblAlpha, - new FlatUnivariate (dblSigma), + new Flat (dblSigma), 0. ), new UniformParticipationRateLinear ( diff --git a/src/main/java/org/drip/sample/almgrenchriss/EfficientFrontierWithDrift.java b/src/main/java/org/drip/sample/almgrenchriss/EfficientFrontierWithDrift.java index 8fe0d824fd33..41dd7a5564b6 100644 --- a/src/main/java/org/drip/sample/almgrenchriss/EfficientFrontierWithDrift.java +++ b/src/main/java/org/drip/sample/almgrenchriss/EfficientFrontierWithDrift.java @@ -7,7 +7,7 @@ import org.drip.execution.optimum.AlmgrenChrissDriftDiscrete; import org.drip.execution.parameters.ArithmeticPriceDynamicsSettings; import org.drip.execution.profiletime.UniformParticipationRateLinear; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -192,7 +192,7 @@ public static void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.LinearExpectation ( new ArithmeticPriceDynamicsSettings ( dblAlpha, - new FlatUnivariate (dblSigma), + new Flat (dblSigma), 0. ), new UniformParticipationRateLinear ( diff --git a/src/main/java/org/drip/sample/almgrenchriss/OptimalSerialCorrelationImpact.java b/src/main/java/org/drip/sample/almgrenchriss/OptimalSerialCorrelationImpact.java index 2352651a27ae..159d3d8f99d9 100644 --- a/src/main/java/org/drip/sample/almgrenchriss/OptimalSerialCorrelationImpact.java +++ b/src/main/java/org/drip/sample/almgrenchriss/OptimalSerialCorrelationImpact.java @@ -9,7 +9,7 @@ import org.drip.execution.optimum.AlmgrenChrissDiscrete; import org.drip.execution.parameters.*; import org.drip.execution.profiletime.UniformParticipationRateLinear; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -192,7 +192,7 @@ public static void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.LinearExpectation ( new ArithmeticPriceDynamicsSettings ( 0., - new FlatUnivariate (dblSigma), + new Flat (dblSigma), dblSerialCorrelation ), new UniformParticipationRateLinear (prlPermanent), diff --git a/src/main/java/org/drip/sample/almgrenchriss/OptimalTrajectoryNoDrift.java b/src/main/java/org/drip/sample/almgrenchriss/OptimalTrajectoryNoDrift.java index 85015434bc25..94c241ab3a9b 100644 --- a/src/main/java/org/drip/sample/almgrenchriss/OptimalTrajectoryNoDrift.java +++ b/src/main/java/org/drip/sample/almgrenchriss/OptimalTrajectoryNoDrift.java @@ -8,7 +8,7 @@ import org.drip.execution.optimum.AlmgrenChrissDiscrete; import org.drip.execution.parameters.*; import org.drip.execution.profiletime.UniformParticipationRateLinear; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.measure.gaussian.R1UnivariateNormal; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -192,7 +192,7 @@ public static void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.LinearExpectation ( new ArithmeticPriceDynamicsSettings ( 0., - new FlatUnivariate (dblSigma), + new Flat (dblSigma), 0. ), new UniformParticipationRateLinear (prlPermanent), diff --git a/src/main/java/org/drip/sample/almgrenchriss/OptimalTrajectoryWithDrift.java b/src/main/java/org/drip/sample/almgrenchriss/OptimalTrajectoryWithDrift.java index 32abef077221..627f2d5e60b7 100644 --- a/src/main/java/org/drip/sample/almgrenchriss/OptimalTrajectoryWithDrift.java +++ b/src/main/java/org/drip/sample/almgrenchriss/OptimalTrajectoryWithDrift.java @@ -8,7 +8,7 @@ import org.drip.execution.optimum.AlmgrenChrissDriftDiscrete; import org.drip.execution.parameters.*; import org.drip.execution.profiletime.UniformParticipationRateLinear; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.measure.gaussian.R1UnivariateNormal; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -191,7 +191,7 @@ public static void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.LinearExpectation ( new ArithmeticPriceDynamicsSettings ( dblAlpha, - new FlatUnivariate (dblSigma), + new Flat (dblSigma), 0. ), new UniformParticipationRateLinear (prlPermanent), diff --git a/src/main/java/org/drip/sample/almgrenchriss/TrajectoryComparisonNoDrift.java b/src/main/java/org/drip/sample/almgrenchriss/TrajectoryComparisonNoDrift.java index 84455067462a..8fae555fb3fd 100644 --- a/src/main/java/org/drip/sample/almgrenchriss/TrajectoryComparisonNoDrift.java +++ b/src/main/java/org/drip/sample/almgrenchriss/TrajectoryComparisonNoDrift.java @@ -7,7 +7,7 @@ import org.drip.execution.optimum.AlmgrenChrissDiscrete; import org.drip.execution.parameters.*; import org.drip.execution.profiletime.UniformParticipationRateLinear; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -223,7 +223,7 @@ public static void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.LinearExpectation ( new ArithmeticPriceDynamicsSettings ( dblAlpha, - new FlatUnivariate (dblSigma), + new Flat (dblSigma), 0. ), new UniformParticipationRateLinear (prlPermanent), diff --git a/src/main/java/org/drip/sample/almgrenchriss/TrajectoryComparisonWithDrift.java b/src/main/java/org/drip/sample/almgrenchriss/TrajectoryComparisonWithDrift.java index 8d624ad5776a..9398c4291ba2 100644 --- a/src/main/java/org/drip/sample/almgrenchriss/TrajectoryComparisonWithDrift.java +++ b/src/main/java/org/drip/sample/almgrenchriss/TrajectoryComparisonWithDrift.java @@ -7,7 +7,7 @@ import org.drip.execution.optimum.AlmgrenChrissDriftDiscrete; import org.drip.execution.parameters.*; import org.drip.execution.profiletime.UniformParticipationRateLinear; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -223,7 +223,7 @@ public static void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.LinearExpectation ( new ArithmeticPriceDynamicsSettings ( dblAlpha, - new FlatUnivariate (dblSigma), + new Flat (dblSigma), 0. ), new UniformParticipationRateLinear (prlPermanent), diff --git a/src/main/java/org/drip/sample/capfloor/FRAStdCapFloor.java b/src/main/java/org/drip/sample/capfloor/FRAStdCapFloor.java index 957b2123009c..dad87773bb16 100644 --- a/src/main/java/org/drip/sample/capfloor/FRAStdCapFloor.java +++ b/src/main/java/org/drip/sample/capfloor/FRAStdCapFloor.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.*; import org.drip.analytics.support.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.param.creator.*; import org.drip.param.market.CurveSurfaceQuoteContainer; @@ -599,7 +599,7 @@ private static final void SetVolCorrelation ( mktParams.setForwardFundingCorrelation ( fri, fundingLabel, - new FlatUnivariate (dblForwardFundingCorr) + new Flat (dblForwardFundingCorr) ); } diff --git a/src/main/java/org/drip/sample/capfloor/FRAStdCapFloorAnalysis.java b/src/main/java/org/drip/sample/capfloor/FRAStdCapFloorAnalysis.java index 4b65ed4f6e6a..268a5f890594 100644 --- a/src/main/java/org/drip/sample/capfloor/FRAStdCapFloorAnalysis.java +++ b/src/main/java/org/drip/sample/capfloor/FRAStdCapFloorAnalysis.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.*; import org.drip.analytics.support.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.param.creator.*; import org.drip.param.market.CurveSurfaceQuoteContainer; @@ -599,7 +599,7 @@ private static final void SetVolCorrelation ( mktParams.setForwardFundingCorrelation ( fri, fundingLabel, - new FlatUnivariate (dblForwardFundingCorr) + new Flat (dblForwardFundingCorr) ); } diff --git a/src/main/java/org/drip/sample/cms/FixFloatVarianceAnalysis.java b/src/main/java/org/drip/sample/cms/FixFloatVarianceAnalysis.java index 306393b6ea78..f5f660c93bde 100644 --- a/src/main/java/org/drip/sample/cms/FixFloatVarianceAnalysis.java +++ b/src/main/java/org/drip/sample/cms/FixFloatVarianceAnalysis.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.*; import org.drip.analytics.support.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.param.market.CurveSurfaceQuoteContainer; import org.drip.param.period.*; @@ -418,7 +418,7 @@ private static final void SetMarketParams ( mktParams.setForwardFundingCorrelation ( forwardLabel, fundingLabel, - new FlatUnivariate (dblForwardFundingCorr) + new Flat (dblForwardFundingCorr) ); } diff --git a/src/main/java/org/drip/sample/cms/FloatFloatVarianceAnalysis.java b/src/main/java/org/drip/sample/cms/FloatFloatVarianceAnalysis.java index d9819a3005c4..e8f3bd262212 100644 --- a/src/main/java/org/drip/sample/cms/FloatFloatVarianceAnalysis.java +++ b/src/main/java/org/drip/sample/cms/FloatFloatVarianceAnalysis.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.*; import org.drip.analytics.support.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.param.market.CurveSurfaceQuoteContainer; import org.drip.param.period.*; @@ -405,7 +405,7 @@ private static final void SetMarketParams ( mktParams.setForwardFundingCorrelation ( forwardLabel, fundingLabel, - new FlatUnivariate (dblForwardFundingCorr) + new Flat (dblForwardFundingCorr) ); } diff --git a/src/main/java/org/drip/sample/cross/CrossFixedPlainFloat.java b/src/main/java/org/drip/sample/cross/CrossFixedPlainFloat.java index b349431e1bff..3ef150973588 100644 --- a/src/main/java/org/drip/sample/cross/CrossFixedPlainFloat.java +++ b/src/main/java/org/drip/sample/cross/CrossFixedPlainFloat.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.JulianDate; import org.drip.analytics.support.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.numerical.common.*; import org.drip.param.market.CurveSurfaceQuoteContainer; import org.drip.param.period.*; @@ -350,7 +350,7 @@ public static final void main ( mktParams.setForwardFundingCorrelation ( fri3MUSD, fundingLabelUSD, - new FlatUnivariate (dblUSD3MUSDFundingCorr) + new Flat (dblUSD3MUSDFundingCorr) ); mktParams.setFundingState (dcEURCollatDomestic); @@ -393,7 +393,7 @@ public static final void main ( mktParams.setFundingFXCorrelation ( fundingLabelUSD, fxLabel, - new FlatUnivariate (dblUSDFundingUSDEURFXCorr) + new Flat (dblUSDFundingUSDEURFXCorr) ); CaseInsensitiveTreeMap mapMTMOutput = fixMTMFloat.value ( diff --git a/src/main/java/org/drip/sample/cross/CrossFixedPlainFloatAnalysis.java b/src/main/java/org/drip/sample/cross/CrossFixedPlainFloatAnalysis.java index 8fc46d15db64..7a365f1a5df0 100644 --- a/src/main/java/org/drip/sample/cross/CrossFixedPlainFloatAnalysis.java +++ b/src/main/java/org/drip/sample/cross/CrossFixedPlainFloatAnalysis.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.JulianDate; import org.drip.analytics.support.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.param.market.CurveSurfaceQuoteContainer; import org.drip.param.period.*; import org.drip.param.valuation.*; @@ -278,19 +278,19 @@ private static final void SetMarketParams ( mktParams.setForwardFundingCorrelation ( forwardLabel, fundingLabel, - new FlatUnivariate (dblForwardFundingCorr) + new Flat (dblForwardFundingCorr) ); mktParams.setForwardFXCorrelation ( forwardLabel, fxLabel, - new FlatUnivariate (dblForwardFXCorr) + new Flat (dblForwardFXCorr) ); mktParams.setFundingFXCorrelation ( fundingLabel, fxLabel, - new FlatUnivariate (dblFundingFXCorr) + new Flat (dblFundingFXCorr) ); } diff --git a/src/main/java/org/drip/sample/cross/CrossFloatCrossFloat.java b/src/main/java/org/drip/sample/cross/CrossFloatCrossFloat.java index 957cb6e88e02..e0507244f270 100644 --- a/src/main/java/org/drip/sample/cross/CrossFloatCrossFloat.java +++ b/src/main/java/org/drip/sample/cross/CrossFloatCrossFloat.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.JulianDate; import org.drip.analytics.support.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.numerical.common.*; import org.drip.param.market.CurveSurfaceQuoteContainer; import org.drip.param.period.*; @@ -391,31 +391,31 @@ public static final void main ( mktParams.setForwardFundingCorrelation ( friEUR3M, fundingLabelUSD, - new FlatUnivariate (dblUSDFundingEUR3MCorr) + new Flat (dblUSDFundingEUR3MCorr) ); mktParams.setForwardFundingCorrelation ( friEUR6M, fundingLabelUSD, - new FlatUnivariate (dblUSDFundingEUR6MCorr) + new Flat (dblUSDFundingEUR6MCorr) ); mktParams.setForwardFXCorrelation ( friEUR3M, fxLabel, - new FlatUnivariate (dblEUR3MUSDEURFXCorr) + new Flat (dblEUR3MUSDEURFXCorr) ); mktParams.setForwardFXCorrelation ( friEUR6M, fxLabel, - new FlatUnivariate (dblEUR6MUSDEURFXCorr) + new Flat (dblEUR6MUSDEURFXCorr) ); mktParams.setFundingFXCorrelation ( fundingLabelUSD, fxLabel, - new FlatUnivariate (dblUSDFundingUSDEURFXCorr) + new Flat (dblUSDFundingUSDEURFXCorr) ); CaseInsensitiveTreeMap mapMTMOutput = floatFloatMTM.value ( diff --git a/src/main/java/org/drip/sample/cross/CrossFloatCrossFloatAnalysis.java b/src/main/java/org/drip/sample/cross/CrossFloatCrossFloatAnalysis.java index fcddcc21dee9..234be7693ac4 100644 --- a/src/main/java/org/drip/sample/cross/CrossFloatCrossFloatAnalysis.java +++ b/src/main/java/org/drip/sample/cross/CrossFloatCrossFloatAnalysis.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.JulianDate; import org.drip.analytics.support.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.param.market.CurveSurfaceQuoteContainer; import org.drip.param.period.*; import org.drip.param.valuation.*; @@ -284,31 +284,31 @@ private static final void SetMarketParams ( mktParams.setForwardFundingCorrelation ( forwardLabel1, fundingLabel, - new FlatUnivariate (dblForward1FundingCorr) + new Flat (dblForward1FundingCorr) ); mktParams.setForwardFundingCorrelation ( forwardLabel2, fundingLabel, - new FlatUnivariate (dblForward2FundingCorr) + new Flat (dblForward2FundingCorr) ); mktParams.setForwardFXCorrelation ( forwardLabel1, fxLabel, - new FlatUnivariate (dblForward1FXCorr) + new Flat (dblForward1FXCorr) ); mktParams.setForwardFXCorrelation ( forwardLabel2, fxLabel, - new FlatUnivariate (dblForward2FXCorr) + new Flat (dblForward2FXCorr) ); mktParams.setFundingFXCorrelation ( fundingLabel, fxLabel, - new FlatUnivariate (dblFundingFXCorr) + new Flat (dblFundingFXCorr) ); } diff --git a/src/main/java/org/drip/sample/cross/FixFloatFixFloat.java b/src/main/java/org/drip/sample/cross/FixFloatFixFloat.java index 440cb28dbb15..975a1c0282ca 100644 --- a/src/main/java/org/drip/sample/cross/FixFloatFixFloat.java +++ b/src/main/java/org/drip/sample/cross/FixFloatFixFloat.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.JulianDate; import org.drip.analytics.support.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.numerical.common.*; import org.drip.param.market.CurveSurfaceQuoteContainer; import org.drip.param.period.*; @@ -409,25 +409,25 @@ public static final void main ( mktParams.setForwardFundingCorrelation ( fri3MUSD, fundingLabelUSD, - new FlatUnivariate (dblUSD3MForwardUSDFundingCorr) + new Flat (dblUSD3MForwardUSDFundingCorr) ); mktParams.setForwardFundingCorrelation ( fri3MEUR, fundingLabelUSD, - new FlatUnivariate (dblEUR3MForwardUSDFundingCorr) + new Flat (dblEUR3MForwardUSDFundingCorr) ); mktParams.setForwardFXCorrelation ( fri3MEUR, fxLabel, - new FlatUnivariate (dblEUR3MForwardUSDEURFXCorr) + new Flat (dblEUR3MForwardUSDEURFXCorr) ); mktParams.setFundingFXCorrelation ( fundingLabelUSD, fxLabel, - new FlatUnivariate (dblUSDFundingUSDEURFXCorr) + new Flat (dblUSDFundingUSDEURFXCorr) ); CaseInsensitiveTreeMap mapMTMOutput = cpMTM.value ( diff --git a/src/main/java/org/drip/sample/cross/FixFloatFixFloatAnalysis.java b/src/main/java/org/drip/sample/cross/FixFloatFixFloatAnalysis.java index c97d749c6804..4ee4c588cd1d 100644 --- a/src/main/java/org/drip/sample/cross/FixFloatFixFloatAnalysis.java +++ b/src/main/java/org/drip/sample/cross/FixFloatFixFloatAnalysis.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.JulianDate; import org.drip.analytics.support.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.param.market.CurveSurfaceQuoteContainer; import org.drip.param.period.*; import org.drip.param.valuation.*; @@ -285,25 +285,25 @@ private static final void SetMarketParams ( mktParams.setForwardFundingCorrelation ( forwardLabel1, fundingLabel, - new FlatUnivariate (dblForward1FundingCorr) + new Flat (dblForward1FundingCorr) ); mktParams.setForwardFundingCorrelation ( forwardLabel2, fundingLabel, - new FlatUnivariate (dblForward2FundingCorr) + new Flat (dblForward2FundingCorr) ); mktParams.setForwardFXCorrelation ( forwardLabel2, fxLabel, - new FlatUnivariate (dblForward2FXCorr) + new Flat (dblForward2FXCorr) ); mktParams.setFundingFXCorrelation ( fundingLabel, fxLabel, - new FlatUnivariate (dblFundingFXCorr) + new Flat (dblFundingFXCorr) ); } diff --git a/src/main/java/org/drip/sample/cross/FloatFloatFloatFloat.java b/src/main/java/org/drip/sample/cross/FloatFloatFloatFloat.java index 549f27ef7857..11a7521ccf23 100644 --- a/src/main/java/org/drip/sample/cross/FloatFloatFloatFloat.java +++ b/src/main/java/org/drip/sample/cross/FloatFloatFloatFloat.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.JulianDate; import org.drip.analytics.support.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.numerical.common.*; import org.drip.param.market.CurveSurfaceQuoteContainer; import org.drip.param.period.*; @@ -478,55 +478,55 @@ public static final void main ( mktParams.setForwardFundingCorrelation ( fri3MReference, fundingLabelReference, - new FlatUnivariate (dblReference3MForwardFundingCorr) + new Flat (dblReference3MForwardFundingCorr) ); mktParams.setForwardFundingCorrelation ( fri6MReference, fundingLabelReference, - new FlatUnivariate (dblReference6MForwardFundingCorr) + new Flat (dblReference6MForwardFundingCorr) ); mktParams.setForwardFundingCorrelation ( fri3MDerived, fundingLabelReference, - new FlatUnivariate (dblDerived3MForwardFundingCorr) + new Flat (dblDerived3MForwardFundingCorr) ); mktParams.setForwardFundingCorrelation ( fri6MDerived, fundingLabelReference, - new FlatUnivariate (dblDerived6MForwardFundingCorr) + new Flat (dblDerived6MForwardFundingCorr) ); mktParams.setForwardFXCorrelation ( fri3MReference, fxLabel, - new FlatUnivariate (dblReference3MForwardFXCorr) + new Flat (dblReference3MForwardFXCorr) ); mktParams.setForwardFXCorrelation ( fri6MReference, fxLabel, - new FlatUnivariate (dblReference6MForwardFXCorr) + new Flat (dblReference6MForwardFXCorr) ); mktParams.setForwardFXCorrelation ( fri3MDerived, fxLabel, - new FlatUnivariate (dblDerived3MForwardFXCorr) + new Flat (dblDerived3MForwardFXCorr) ); mktParams.setForwardFXCorrelation ( fri6MDerived, fxLabel, - new FlatUnivariate (dblDerived6MForwardFXCorr) + new Flat (dblDerived6MForwardFXCorr) ); mktParams.setFundingFXCorrelation ( fundingLabelReference, fxLabel, - new FlatUnivariate (dblFundingFXCorr) + new Flat (dblFundingFXCorr) ); CaseInsensitiveTreeMap mapMTMOutput = cpMTM.value ( diff --git a/src/main/java/org/drip/sample/cross/FloatFloatFloatFloatAnalysis.java b/src/main/java/org/drip/sample/cross/FloatFloatFloatFloatAnalysis.java index 8f51f8af3c6f..2bfb0194bd25 100644 --- a/src/main/java/org/drip/sample/cross/FloatFloatFloatFloatAnalysis.java +++ b/src/main/java/org/drip/sample/cross/FloatFloatFloatFloatAnalysis.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.JulianDate; import org.drip.analytics.support.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.param.market.CurveSurfaceQuoteContainer; import org.drip.param.period.*; import org.drip.param.valuation.*; @@ -308,55 +308,55 @@ private static final void SetMarketParams ( mktParams.setForwardFundingCorrelation ( forwardReferenceLabel1, fundingLabel, - new FlatUnivariate (dblForwardReference1FundingCorr) + new Flat (dblForwardReference1FundingCorr) ); mktParams.setForwardFundingCorrelation ( forwardReferenceLabel2, fundingLabel, - new FlatUnivariate (dblForwardReference2FundingCorr) + new Flat (dblForwardReference2FundingCorr) ); mktParams.setForwardFundingCorrelation ( forwardDerivedLabel1, fundingLabel, - new FlatUnivariate (dblForwardDerived1FundingCorr) + new Flat (dblForwardDerived1FundingCorr) ); mktParams.setForwardFundingCorrelation ( forwardDerivedLabel2, fundingLabel, - new FlatUnivariate (dblForwardDerived2FundingCorr) + new Flat (dblForwardDerived2FundingCorr) ); mktParams.setForwardFXCorrelation ( forwardReferenceLabel1, fxLabel, - new FlatUnivariate (dblForwardReference1FXCorr) + new Flat (dblForwardReference1FXCorr) ); mktParams.setForwardFXCorrelation ( forwardReferenceLabel2, fxLabel, - new FlatUnivariate (dblForwardReference2FXCorr) + new Flat (dblForwardReference2FXCorr) ); mktParams.setForwardFXCorrelation ( forwardDerivedLabel1, fxLabel, - new FlatUnivariate (dblForwardDerived1FXCorr) + new Flat (dblForwardDerived1FXCorr) ); mktParams.setForwardFXCorrelation ( forwardDerivedLabel2, fxLabel, - new FlatUnivariate (dblForwardDerived2FXCorr) + new Flat (dblForwardDerived2FXCorr) ); mktParams.setFundingFXCorrelation ( fundingLabel, fxLabel, - new FlatUnivariate (dblFundingFXCorr) + new Flat (dblFundingFXCorr) ); } diff --git a/src/main/java/org/drip/sample/efronstein/GlivenkoCantelliSupremumBound.java b/src/main/java/org/drip/sample/efronstein/GlivenkoCantelliSupremumBound.java index 6640c2e35f9b..74a8ed446605 100644 --- a/src/main/java/org/drip/sample/efronstein/GlivenkoCantelliSupremumBound.java +++ b/src/main/java/org/drip/sample/efronstein/GlivenkoCantelliSupremumBound.java @@ -2,7 +2,7 @@ package org.drip.sample.efronstein; import org.drip.function.definition.R1ToR1; -import org.drip.function.r1tor1.OffsetIdempotent; +import org.drip.function.r1tor1operator.OffsetIdempotent; import org.drip.sequence.custom.GlivenkoCantelliFunctionSupremum; import org.drip.sequence.functional.*; import org.drip.sequence.metrics.SingleSequenceAgnosticMetrics; diff --git a/src/main/java/org/drip/sample/efronstein/KernelDensityL1Bound.java b/src/main/java/org/drip/sample/efronstein/KernelDensityL1Bound.java index 483453190e86..5ea71ed5b4eb 100644 --- a/src/main/java/org/drip/sample/efronstein/KernelDensityL1Bound.java +++ b/src/main/java/org/drip/sample/efronstein/KernelDensityL1Bound.java @@ -1,7 +1,7 @@ package org.drip.sample.efronstein; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.sequence.custom.KernelDensityEstimationL1; import org.drip.sequence.functional.*; import org.drip.sequence.metrics.SingleSequenceAgnosticMetrics; @@ -127,10 +127,10 @@ private static final KernelDensityEstimationL1 KernelDensityL1Function ( throws Exception { return new KernelDensityEstimationL1 ( - new FlatUnivariate (0.), + new Flat (0.), 1., iNumVariate, - new FlatUnivariate (-2.) + new Flat (-2.) ); } diff --git a/src/main/java/org/drip/sample/execution/ConcaveImpactNoDrift.java b/src/main/java/org/drip/sample/execution/ConcaveImpactNoDrift.java index 274c88038275..c20a3e211436 100644 --- a/src/main/java/org/drip/sample/execution/ConcaveImpactNoDrift.java +++ b/src/main/java/org/drip/sample/execution/ConcaveImpactNoDrift.java @@ -9,7 +9,7 @@ import org.drip.execution.profiletime.*; import org.drip.execution.risk.MeanVarianceObjectiveUtility; import org.drip.execution.strategy.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -175,7 +175,7 @@ public static final void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.Almgren2003 ( new ArithmeticPriceDynamicsSettings ( dblDrift, - new FlatUnivariate (dblVolatility), + new Flat (dblVolatility), 0. ), new UniformParticipationRateLinear ((ParticipationRateLinear) pmip.permanentTransactionFunction()), diff --git a/src/main/java/org/drip/sample/execution/LinearImpactNoDrift.java b/src/main/java/org/drip/sample/execution/LinearImpactNoDrift.java index 22965208e871..52a7eb4ffc5b 100644 --- a/src/main/java/org/drip/sample/execution/LinearImpactNoDrift.java +++ b/src/main/java/org/drip/sample/execution/LinearImpactNoDrift.java @@ -10,7 +10,7 @@ import org.drip.execution.profiletime.UniformParticipationRateLinear; import org.drip.execution.risk.MeanVarianceObjectiveUtility; import org.drip.execution.strategy.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.measure.gaussian.R1UnivariateNormal; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -198,7 +198,7 @@ public static void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.LinearExpectation ( new ArithmeticPriceDynamicsSettings ( 0., - new FlatUnivariate (dblSigma), + new Flat (dblSigma), 0. ), new UniformParticipationRateLinear (prlPermanent), diff --git a/src/main/java/org/drip/sample/execution/LinearImpactWithDrift.java b/src/main/java/org/drip/sample/execution/LinearImpactWithDrift.java index 0b6c3da6115f..31904641ff02 100644 --- a/src/main/java/org/drip/sample/execution/LinearImpactWithDrift.java +++ b/src/main/java/org/drip/sample/execution/LinearImpactWithDrift.java @@ -10,7 +10,7 @@ import org.drip.execution.profiletime.UniformParticipationRateLinear; import org.drip.execution.risk.MeanVarianceObjectiveUtility; import org.drip.execution.strategy.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.measure.gaussian.R1UnivariateNormal; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -198,7 +198,7 @@ public static void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.LinearExpectation ( new ArithmeticPriceDynamicsSettings ( dblAlpha, - new FlatUnivariate (dblSigma), + new Flat (dblSigma), 0. ), new UniformParticipationRateLinear (prlPermanent), diff --git a/src/main/java/org/drip/sample/fedfund/FedFundOvernightCompounding.java b/src/main/java/org/drip/sample/fedfund/FedFundOvernightCompounding.java index b324f2dd8591..1f6a977a9ebd 100644 --- a/src/main/java/org/drip/sample/fedfund/FedFundOvernightCompounding.java +++ b/src/main/java/org/drip/sample/fedfund/FedFundOvernightCompounding.java @@ -9,6 +9,7 @@ import org.drip.analytics.output.CompositePeriodCouponMetrics; import org.drip.analytics.support.*; import org.drip.function.r1tor1.*; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.definition.OvernightIndex; import org.drip.market.otc.*; import org.drip.param.creator.*; @@ -743,7 +744,7 @@ public static final void main ( mktParams.setForwardFundingCorrelation ( fri, fundingLabel, - new FlatUnivariate (dblUSDFundingUSDOISCorrelation) + new Flat (dblUSDFundingUSDOISCorrelation) ); System.out.println ( diff --git a/src/main/java/org/drip/sample/fixfloatoption/MultiCurvePayerReceiver.java b/src/main/java/org/drip/sample/fixfloatoption/MultiCurvePayerReceiver.java index f0cdfa0b56fd..73cf0e4e788d 100644 --- a/src/main/java/org/drip/sample/fixfloatoption/MultiCurvePayerReceiver.java +++ b/src/main/java/org/drip/sample/fixfloatoption/MultiCurvePayerReceiver.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.*; import org.drip.analytics.support.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.param.creator.*; import org.drip.param.market.CurveSurfaceQuoteContainer; @@ -789,7 +789,7 @@ public static final void main ( mktParams.setForwardFundingCorrelation ( fri, fundingLabel, - new FlatUnivariate (dblForwardFundingCorr) + new Flat (dblForwardFundingCorr) ); Map mapSTIROutput = stir.value ( diff --git a/src/main/java/org/drip/sample/fixfloatoption/MultiCurvePayerReceiverAnalysis.java b/src/main/java/org/drip/sample/fixfloatoption/MultiCurvePayerReceiverAnalysis.java index f21dc42f0387..04ae7b76ed36 100644 --- a/src/main/java/org/drip/sample/fixfloatoption/MultiCurvePayerReceiverAnalysis.java +++ b/src/main/java/org/drip/sample/fixfloatoption/MultiCurvePayerReceiverAnalysis.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.*; import org.drip.analytics.support.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.param.creator.*; import org.drip.param.market.CurveSurfaceQuoteContainer; @@ -725,7 +725,7 @@ private static final void VolCorrScenario ( mktParams.setForwardFundingCorrelation ( fri, fundingLabel, - new FlatUnivariate (dblForwardFundingCorr) + new Flat (dblForwardFundingCorr) ); Map mapSTIROutput = stir.value ( diff --git a/src/main/java/org/drip/sample/forwardratefutures/JurisdictionVenueOptionValuation.java b/src/main/java/org/drip/sample/forwardratefutures/JurisdictionVenueOptionValuation.java index 97c35ec09153..6c23eb96f2e3 100644 --- a/src/main/java/org/drip/sample/forwardratefutures/JurisdictionVenueOptionValuation.java +++ b/src/main/java/org/drip/sample/forwardratefutures/JurisdictionVenueOptionValuation.java @@ -4,7 +4,7 @@ import java.util.*; import org.drip.analytics.date.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.param.creator.*; import org.drip.param.market.CurveSurfaceQuoteContainer; @@ -396,7 +396,7 @@ private static final void SetVolCorrelation ( mktParams.setForwardFundingCorrelation ( fri, fundingLabel, - new FlatUnivariate (dblForwardFundingCorr) + new Flat (dblForwardFundingCorr) ); } diff --git a/src/main/java/org/drip/sample/fra/FRAStandardOption.java b/src/main/java/org/drip/sample/fra/FRAStandardOption.java index 26a218c2c103..244e30582bb5 100644 --- a/src/main/java/org/drip/sample/fra/FRAStandardOption.java +++ b/src/main/java/org/drip/sample/fra/FRAStandardOption.java @@ -5,6 +5,7 @@ import org.drip.analytics.date.*; import org.drip.function.r1tor1.*; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.param.creator.*; import org.drip.param.market.CurveSurfaceQuoteContainer; @@ -665,7 +666,7 @@ public static final void main ( new ExponentialDecay ( dtToday.julian(), dblCorrMeanReverterHazard), - new FlatUnivariate (dblForwardFundingCorr) + new Flat (dblForwardFundingCorr) ) ); diff --git a/src/main/java/org/drip/sample/fra/FRAStandardOptionAnalysis.java b/src/main/java/org/drip/sample/fra/FRAStandardOptionAnalysis.java index d66140dce327..d1a83a440d25 100644 --- a/src/main/java/org/drip/sample/fra/FRAStandardOptionAnalysis.java +++ b/src/main/java/org/drip/sample/fra/FRAStandardOptionAnalysis.java @@ -4,7 +4,7 @@ import java.util.*; import org.drip.analytics.date.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.param.creator.*; import org.drip.param.market.CurveSurfaceQuoteContainer; @@ -590,7 +590,7 @@ private static final void VolCorrScenario ( mktParams.setForwardFundingCorrelation ( fri, fundingLabel, - new FlatUnivariate (dblForwardFundingCorr) + new Flat (dblForwardFundingCorr) ); double dblStrike = 0.0189; diff --git a/src/main/java/org/drip/sample/fra/MultiCurveFRAMarket.java b/src/main/java/org/drip/sample/fra/MultiCurveFRAMarket.java index c73d43a6064c..3dfc480b7c39 100644 --- a/src/main/java/org/drip/sample/fra/MultiCurveFRAMarket.java +++ b/src/main/java/org/drip/sample/fra/MultiCurveFRAMarket.java @@ -4,7 +4,7 @@ import java.util.*; import org.drip.analytics.date.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.param.creator.*; import org.drip.param.market.CurveSurfaceQuoteContainer; import org.drip.param.valuation.ValuationParams; @@ -204,7 +204,7 @@ public static final void main ( mktParams.setForwardFundingCorrelation ( fri, fundingLabel, - new FlatUnivariate (dblEONIAEURIBOR6MCorrelation) + new Flat (dblEONIAEURIBOR6MCorrelation) ); Map mapFRAOutput = fra.value ( diff --git a/src/main/java/org/drip/sample/fra/MultiCurveFRAMarketAnalysis.java b/src/main/java/org/drip/sample/fra/MultiCurveFRAMarketAnalysis.java index c26dc30e22e4..1d24b34f40e9 100644 --- a/src/main/java/org/drip/sample/fra/MultiCurveFRAMarketAnalysis.java +++ b/src/main/java/org/drip/sample/fra/MultiCurveFRAMarketAnalysis.java @@ -4,7 +4,7 @@ import java.util.Map; import org.drip.analytics.date.*; -import org.drip.function.r1tor1.*; +import org.drip.function.r1tor1operator.Flat; import org.drip.param.creator.MarketParamsBuilder; import org.drip.param.market.CurveSurfaceQuoteContainer; import org.drip.param.valuation.ValuationParams; @@ -206,7 +206,7 @@ private static final FRAMktConvexityCorrection FRAMktMetric ( mktParams.setForwardFundingCorrelation ( fri, fundingLabel, - new FlatUnivariate (dblEONIAEURIBOR6MCorrelation) + new Flat (dblEONIAEURIBOR6MCorrelation) ); Map mapFRAOutput = fra.value ( diff --git a/src/main/java/org/drip/sample/fra/MultiCurveFRAStandard.java b/src/main/java/org/drip/sample/fra/MultiCurveFRAStandard.java index 3f39a023e042..5e92479fbd4b 100644 --- a/src/main/java/org/drip/sample/fra/MultiCurveFRAStandard.java +++ b/src/main/java/org/drip/sample/fra/MultiCurveFRAStandard.java @@ -4,7 +4,7 @@ import java.util.*; import org.drip.analytics.date.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.param.creator.*; import org.drip.param.market.CurveSurfaceQuoteContainer; @@ -651,7 +651,7 @@ public static final void main ( mktParams.setForwardFundingCorrelation ( fri, fundingLabel, - new FlatUnivariate (dblForwardFundingCorr) + new Flat (dblForwardFundingCorr) ); Map mapFRAOutput = fra.value ( diff --git a/src/main/java/org/drip/sample/fra/MultiCurveFRAStandardAnalysis.java b/src/main/java/org/drip/sample/fra/MultiCurveFRAStandardAnalysis.java index 2f222450a507..cc121f0e9076 100644 --- a/src/main/java/org/drip/sample/fra/MultiCurveFRAStandardAnalysis.java +++ b/src/main/java/org/drip/sample/fra/MultiCurveFRAStandardAnalysis.java @@ -4,7 +4,7 @@ import java.util.*; import org.drip.analytics.date.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.param.creator.*; import org.drip.param.market.CurveSurfaceQuoteContainer; @@ -596,7 +596,7 @@ private static final void RunWithVolCorrelation ( mktParams.setForwardFundingCorrelation ( fri, fundingLabel, - new FlatUnivariate (dblForwardFundingCorr) + new Flat (dblForwardFundingCorr) ); Map mapFRAOutput = fra.value ( diff --git a/src/main/java/org/drip/sample/hjm/G2PlusPlusDynamics.java b/src/main/java/org/drip/sample/hjm/G2PlusPlusDynamics.java index 5ecd5264c95e..4c77be0ec23d 100644 --- a/src/main/java/org/drip/sample/hjm/G2PlusPlusDynamics.java +++ b/src/main/java/org/drip/sample/hjm/G2PlusPlusDynamics.java @@ -3,7 +3,7 @@ import org.drip.analytics.date.*; import org.drip.dynamics.hjm.G2PlusPlus; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.sequence.random.*; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -130,7 +130,7 @@ private static final G2PlusPlus G2PlusPlusEvolver ( ) }, dblRho, - new FlatUnivariate (dblStartingForwardRate) + new Flat (dblStartingForwardRate) ); } diff --git a/src/main/java/org/drip/sample/hjm/MultiFactorDynamics.java b/src/main/java/org/drip/sample/hjm/MultiFactorDynamics.java index 0c1804c67d7b..243f7dc0e6a1 100644 --- a/src/main/java/org/drip/sample/hjm/MultiFactorDynamics.java +++ b/src/main/java/org/drip/sample/hjm/MultiFactorDynamics.java @@ -5,7 +5,7 @@ import org.drip.analytics.definition.MarketSurface; import org.drip.dynamics.hjm.*; import org.drip.function.definition.R1ToR1; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.sequence.random.*; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -413,7 +413,7 @@ public static final void main ( mktSurfFlatVol1, mktSurfFlatVol2, mktSurfFlatVol3, - new FlatUnivariate (dblFlatForwardRate) + new Flat (dblFlatForwardRate) ); Evolve ( diff --git a/src/main/java/org/drip/sample/hjm/MultiFactorQMDynamics.java b/src/main/java/org/drip/sample/hjm/MultiFactorQMDynamics.java index 0a37d9bf9a18..0ed26df8e564 100644 --- a/src/main/java/org/drip/sample/hjm/MultiFactorQMDynamics.java +++ b/src/main/java/org/drip/sample/hjm/MultiFactorQMDynamics.java @@ -6,7 +6,7 @@ import org.drip.analytics.support.Helper; import org.drip.dynamics.hjm.*; import org.drip.function.definition.R1ToR1; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.sequence.random.*; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -394,7 +394,7 @@ public static final void main ( mktSurfFlatVol1, mktSurfFlatVol2, mktSurfFlatVol3, - new FlatUnivariate (dblFlatForwardRate) + new Flat (dblFlatForwardRate) ); ShortForwardRateUpdate qmInitial = InitQMSnap ( diff --git a/src/main/java/org/drip/sample/hjm/PrincipalComponentDynamics.java b/src/main/java/org/drip/sample/hjm/PrincipalComponentDynamics.java index 7d11a04053ac..4f4d35599ebd 100644 --- a/src/main/java/org/drip/sample/hjm/PrincipalComponentDynamics.java +++ b/src/main/java/org/drip/sample/hjm/PrincipalComponentDynamics.java @@ -5,7 +5,7 @@ import org.drip.analytics.definition.MarketSurface; import org.drip.dynamics.hjm.*; import org.drip.function.definition.R1ToR1; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.sequence.random.*; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -421,7 +421,7 @@ public static final void main ( mktSurfFlatVol1, mktSurfFlatVol2, mktSurfFlatVol3, - new FlatUnivariate (dblFlatForwardRate), + new Flat (dblFlatForwardRate), iNumFactor ); diff --git a/src/main/java/org/drip/sample/hjm/PrincipalComponentQMDynamics.java b/src/main/java/org/drip/sample/hjm/PrincipalComponentQMDynamics.java index c4235ac4fdc2..8afa7d36a0ac 100644 --- a/src/main/java/org/drip/sample/hjm/PrincipalComponentQMDynamics.java +++ b/src/main/java/org/drip/sample/hjm/PrincipalComponentQMDynamics.java @@ -6,7 +6,7 @@ import org.drip.analytics.support.Helper; import org.drip.dynamics.hjm.*; import org.drip.function.definition.R1ToR1; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.sequence.random.*; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -413,7 +413,7 @@ public static final void main ( mktSurfFlatVol1, mktSurfFlatVol2, mktSurfFlatVol3, - new FlatUnivariate (dblFlatForwardRate), + new Flat (dblFlatForwardRate), iNumFactor ); diff --git a/src/main/java/org/drip/sample/hullwhite/EvolutionMetrics.java b/src/main/java/org/drip/sample/hullwhite/EvolutionMetrics.java index d0901eba7376..5ce19493be1e 100644 --- a/src/main/java/org/drip/sample/hullwhite/EvolutionMetrics.java +++ b/src/main/java/org/drip/sample/hullwhite/EvolutionMetrics.java @@ -3,7 +3,7 @@ import org.drip.analytics.date.*; import org.drip.dynamics.hullwhite.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.sequence.random.BoxMullerGaussian; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -117,7 +117,7 @@ private static final SingleFactorStateEvolver HullWhiteEvolver ( FundingLabel.Standard (strCurrency), dblSigma, dblA, - new FlatUnivariate (dblStartingForwardRate), + new Flat (dblStartingForwardRate), new BoxMullerGaussian ( 0., 1. diff --git a/src/main/java/org/drip/sample/hullwhite/ShortRateDynamics.java b/src/main/java/org/drip/sample/hullwhite/ShortRateDynamics.java index bae2e007a052..f8db4a0b347c 100644 --- a/src/main/java/org/drip/sample/hullwhite/ShortRateDynamics.java +++ b/src/main/java/org/drip/sample/hullwhite/ShortRateDynamics.java @@ -3,7 +3,7 @@ import org.drip.analytics.date.*; import org.drip.dynamics.hullwhite.SingleFactorStateEvolver; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.sequence.random.BoxMullerGaussian; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -117,7 +117,7 @@ private static final SingleFactorStateEvolver HullWhiteEvolver ( FundingLabel.Standard (strCurrency), dblSigma, dblA, - new FlatUnivariate (dblStartingForwardRate), + new Flat (dblStartingForwardRate), new BoxMullerGaussian ( 0., 1. diff --git a/src/main/java/org/drip/sample/hullwhite/TrinomialTreeCalibration.java b/src/main/java/org/drip/sample/hullwhite/TrinomialTreeCalibration.java index 094692cd282d..91592a338616 100644 --- a/src/main/java/org/drip/sample/hullwhite/TrinomialTreeCalibration.java +++ b/src/main/java/org/drip/sample/hullwhite/TrinomialTreeCalibration.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.*; import org.drip.dynamics.hullwhite.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.sequence.random.BoxMullerGaussian; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -135,7 +135,7 @@ private static final SingleFactorStateEvolver HullWhiteEvolver ( FundingLabel.Standard (strCurrency), dblSigma, dblA, - new FlatUnivariate (dblStartingForwardRate), + new Flat (dblStartingForwardRate), new BoxMullerGaussian ( 0., 1. diff --git a/src/main/java/org/drip/sample/hullwhite/TrinomialTreeEvolution.java b/src/main/java/org/drip/sample/hullwhite/TrinomialTreeEvolution.java index 88ac88573e0e..9ceeb1de6fc1 100644 --- a/src/main/java/org/drip/sample/hullwhite/TrinomialTreeEvolution.java +++ b/src/main/java/org/drip/sample/hullwhite/TrinomialTreeEvolution.java @@ -3,7 +3,7 @@ import org.drip.analytics.date.*; import org.drip.dynamics.hullwhite.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.sequence.random.BoxMullerGaussian; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -117,7 +117,7 @@ private static final SingleFactorStateEvolver HullWhiteEvolver ( FundingLabel.Standard (strCurrency), dblSigma, dblA, - new FlatUnivariate (dblStartingForwardRate), + new Flat (dblStartingForwardRate), new BoxMullerGaussian ( 0., 1. diff --git a/src/main/java/org/drip/sample/lvar/OptimalTrajectoryNoDrift.java b/src/main/java/org/drip/sample/lvar/OptimalTrajectoryNoDrift.java index f77e84b929f9..1b881d84e345 100644 --- a/src/main/java/org/drip/sample/lvar/OptimalTrajectoryNoDrift.java +++ b/src/main/java/org/drip/sample/lvar/OptimalTrajectoryNoDrift.java @@ -10,7 +10,7 @@ import org.drip.execution.profiletime.UniformParticipationRateLinear; import org.drip.execution.risk.PowerVarianceObjectiveUtility; import org.drip.execution.strategy.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.measure.gaussian.R1UnivariateNormal; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -174,7 +174,7 @@ public static void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.LinearExpectation ( new ArithmeticPriceDynamicsSettings ( 0., - new FlatUnivariate (dblSigma), + new Flat (dblSigma), 0. ), new UniformParticipationRateLinear ( diff --git a/src/main/java/org/drip/sample/lvar/OptimalTrajectoryWithDrift.java b/src/main/java/org/drip/sample/lvar/OptimalTrajectoryWithDrift.java index 2eb7d6a8f486..8c97bee3abe1 100644 --- a/src/main/java/org/drip/sample/lvar/OptimalTrajectoryWithDrift.java +++ b/src/main/java/org/drip/sample/lvar/OptimalTrajectoryWithDrift.java @@ -10,7 +10,7 @@ import org.drip.execution.profiletime.UniformParticipationRateLinear; import org.drip.execution.risk.PowerVarianceObjectiveUtility; import org.drip.execution.strategy.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.measure.gaussian.R1UnivariateNormal; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -174,7 +174,7 @@ public static void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.LinearExpectation ( new ArithmeticPriceDynamicsSettings ( dblAlpha, - new FlatUnivariate (dblSigma), + new Flat (dblSigma), 0. ), new UniformParticipationRateLinear ( diff --git a/src/main/java/org/drip/sample/multicurve/FixFloatSwap.java b/src/main/java/org/drip/sample/multicurve/FixFloatSwap.java index 433facd2420b..687506339206 100644 --- a/src/main/java/org/drip/sample/multicurve/FixFloatSwap.java +++ b/src/main/java/org/drip/sample/multicurve/FixFloatSwap.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.*; import org.drip.analytics.support.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.param.creator.*; import org.drip.param.market.CurveSurfaceQuoteContainer; @@ -709,7 +709,7 @@ private static final void RunWithVolCorrelation ( mktParams.setForwardFundingCorrelation ( fri, fundingLabel, - new FlatUnivariate (dblForwardFundingCorr) + new Flat (dblForwardFundingCorr) ); Map mapSTIROutput = stir.value ( diff --git a/src/main/java/org/drip/sample/multicurve/FixFloatSwapAnalysis.java b/src/main/java/org/drip/sample/multicurve/FixFloatSwapAnalysis.java index c0dd4a5ef85b..c71fcf13c834 100644 --- a/src/main/java/org/drip/sample/multicurve/FixFloatSwapAnalysis.java +++ b/src/main/java/org/drip/sample/multicurve/FixFloatSwapAnalysis.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.*; import org.drip.analytics.support.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.param.creator.*; import org.drip.param.market.CurveSurfaceQuoteContainer; @@ -711,7 +711,7 @@ private static final double RunWithVolCorrelation ( mktParams.setForwardFundingCorrelation ( fri, fundingLabel, - new FlatUnivariate (dblForwardFundingCorr) + new Flat (dblForwardFundingCorr) ); Map mapIRSOutput = irs.value ( diff --git a/src/main/java/org/drip/sample/multicurve/FixFloatSwapIMM.java b/src/main/java/org/drip/sample/multicurve/FixFloatSwapIMM.java index 32775d9130b3..a4938be552d3 100644 --- a/src/main/java/org/drip/sample/multicurve/FixFloatSwapIMM.java +++ b/src/main/java/org/drip/sample/multicurve/FixFloatSwapIMM.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.*; import org.drip.analytics.support.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.param.creator.*; import org.drip.param.market.CurveSurfaceQuoteContainer; @@ -705,7 +705,7 @@ private static final void RunWithVolCorrelation ( mktParams.setForwardFundingCorrelation ( fri, fundingLabel, - new FlatUnivariate (dblForwardFundingCorr) + new Flat (dblForwardFundingCorr) ); Map mapSTIROutput = stir.value ( diff --git a/src/main/java/org/drip/sample/ois/CrossOvernightFloatingStream.java b/src/main/java/org/drip/sample/ois/CrossOvernightFloatingStream.java index 70ef1939bf59..d38d37f955f1 100644 --- a/src/main/java/org/drip/sample/ois/CrossOvernightFloatingStream.java +++ b/src/main/java/org/drip/sample/ois/CrossOvernightFloatingStream.java @@ -7,6 +7,7 @@ import org.drip.analytics.daycount.Convention; import org.drip.analytics.support.*; import org.drip.function.r1tor1.*; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.definition.OvernightIndex; import org.drip.market.otc.*; import org.drip.numerical.common.*; @@ -507,7 +508,7 @@ private static final Map CompoundingRun ( mktParams.setForwardFundingCorrelation ( fri, fundingLabelUSD, - new FlatUnivariate (dblUSDFundingUSDOISCorrelation) + new Flat (dblUSDFundingUSDOISCorrelation) ); return floatStream.value ( diff --git a/src/main/java/org/drip/sample/ois/OvernightArithmeticCompoundingConvexity.java b/src/main/java/org/drip/sample/ois/OvernightArithmeticCompoundingConvexity.java index 929d28499585..fb40c3a763a1 100644 --- a/src/main/java/org/drip/sample/ois/OvernightArithmeticCompoundingConvexity.java +++ b/src/main/java/org/drip/sample/ois/OvernightArithmeticCompoundingConvexity.java @@ -7,6 +7,7 @@ import org.drip.analytics.date.*; import org.drip.analytics.support.*; import org.drip.function.r1tor1.*; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.param.creator.*; import org.drip.param.market.*; @@ -473,7 +474,7 @@ private static final void SetMarketParams ( mktParams.setForwardFundingCorrelation ( fri, fundingLabel, - new FlatUnivariate (dblUSDFundingUSDOISCorrelation) + new Flat (dblUSDFundingUSDOISCorrelation) ); } diff --git a/src/main/java/org/drip/sample/option/ATMTermStructureSpline.java b/src/main/java/org/drip/sample/option/ATMTermStructureSpline.java index ee814a58e1f6..8bccbc913911 100644 --- a/src/main/java/org/drip/sample/option/ATMTermStructureSpline.java +++ b/src/main/java/org/drip/sample/option/ATMTermStructureSpline.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.*; import org.drip.analytics.definition.NodeStructure; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.param.valuation.*; import org.drip.pricer.option.BlackScholesAlgorithm; @@ -329,7 +329,7 @@ private static final double ATMCall ( 1., false, dc, - new FlatUnivariate (dblVolatility), + new Flat (dblVolatility), new BlackScholesAlgorithm() ); diff --git a/src/main/java/org/drip/sample/option/BlackHestonForwardOption.java b/src/main/java/org/drip/sample/option/BlackHestonForwardOption.java index 9648afc07a55..4f410679a2e1 100644 --- a/src/main/java/org/drip/sample/option/BlackHestonForwardOption.java +++ b/src/main/java/org/drip/sample/option/BlackHestonForwardOption.java @@ -2,7 +2,7 @@ package org.drip.sample.option; import org.drip.analytics.date.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.numerical.fourier.PhaseAdjuster; import org.drip.param.pricer.HestonOptionPricerParams; @@ -392,7 +392,7 @@ public static final void main ( dblSpot, false, dc, - new FlatUnivariate (dblSpotVolatility), + new Flat (dblSpotVolatility), fpg ) ); @@ -409,7 +409,7 @@ public static final void main ( dblSpot, true, dc, - new FlatUnivariate (dblSpotVolatility), + new Flat (dblSpotVolatility), fpg ) ); @@ -426,7 +426,7 @@ public static final void main ( dblSpot, false, dc, - new FlatUnivariate (dblSpotVolatility), + new Flat (dblSpotVolatility), new BlackScholesAlgorithm() ) ); @@ -443,7 +443,7 @@ public static final void main ( dblSpot, true, dc, - new FlatUnivariate (dblSpotVolatility), + new Flat (dblSpotVolatility), new BlackScholesAlgorithm() ) ); diff --git a/src/main/java/org/drip/sample/option/VanillaBlackNormalPricing.java b/src/main/java/org/drip/sample/option/VanillaBlackNormalPricing.java index 6f28380575e7..2e81d14266b1 100644 --- a/src/main/java/org/drip/sample/option/VanillaBlackNormalPricing.java +++ b/src/main/java/org/drip/sample/option/VanillaBlackNormalPricing.java @@ -4,7 +4,7 @@ import java.util.*; import org.drip.analytics.date.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.param.valuation.*; import org.drip.pricer.option.*; @@ -363,7 +363,7 @@ public static final void main ( dblSpot, false, dc, - new FlatUnivariate (dblVolatility), + new Flat (dblVolatility), new BlackNormalAlgorithm() ); diff --git a/src/main/java/org/drip/sample/option/VanillaBlackScholesPricing.java b/src/main/java/org/drip/sample/option/VanillaBlackScholesPricing.java index a3f05528a5e6..ad01e6a96fb4 100644 --- a/src/main/java/org/drip/sample/option/VanillaBlackScholesPricing.java +++ b/src/main/java/org/drip/sample/option/VanillaBlackScholesPricing.java @@ -4,7 +4,7 @@ import java.util.*; import org.drip.analytics.date.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.param.valuation.*; import org.drip.pricer.option.*; @@ -366,7 +366,7 @@ public static final void main ( dblSpot, false, dc, - new FlatUnivariate (dblVolatility), + new Flat (dblVolatility), new BlackScholesAlgorithm() ); diff --git a/src/main/java/org/drip/sample/piterbarg2010/CSAImpliedMeasureDifference.java b/src/main/java/org/drip/sample/piterbarg2010/CSAImpliedMeasureDifference.java index c6c83a950959..7ce7fc44cef0 100644 --- a/src/main/java/org/drip/sample/piterbarg2010/CSAImpliedMeasureDifference.java +++ b/src/main/java/org/drip/sample/piterbarg2010/CSAImpliedMeasureDifference.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.*; import org.drip.exposure.csadynamics.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.measure.dynamics.*; import org.drip.param.valuation.ValuationParams; import org.drip.pricer.option.BlackScholesAlgorithm; @@ -403,7 +403,7 @@ public static final void main ( dblCSAForward, true, dcOvernight, - new FlatUnivariate (adblCSAImpliedVolatility[i]), + new Flat (adblCSAImpliedVolatility[i]), new BlackScholesAlgorithm() ); diff --git a/src/main/java/org/drip/sample/piterbarg2012/DeterministicCollateralChoiceZeroCoupon.java b/src/main/java/org/drip/sample/piterbarg2012/DeterministicCollateralChoiceZeroCoupon.java index 90ea94b4ad35..0503170594bd 100644 --- a/src/main/java/org/drip/sample/piterbarg2012/DeterministicCollateralChoiceZeroCoupon.java +++ b/src/main/java/org/drip/sample/piterbarg2012/DeterministicCollateralChoiceZeroCoupon.java @@ -2,7 +2,7 @@ package org.drip.sample.piterbarg2012; import org.drip.analytics.date.*; -import org.drip.function.r1tor1.*; +import org.drip.function.r1tor1operator.Flat; import org.drip.product.params.CurrencyPair; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -206,7 +206,7 @@ public static final void main ( new int[] {dtToday.julian()}, new double[] {dblFXVolatility} ), - new FlatUnivariate (dblFXForeignRatesCorrelation) + new Flat (dblFXForeignRatesCorrelation) ); DeterministicCollateralChoiceDiscountCurve dccdc = new DeterministicCollateralChoiceDiscountCurve ( diff --git a/src/main/java/org/drip/sample/piterbarg2012/DomesticCollateralForeignForex.java b/src/main/java/org/drip/sample/piterbarg2012/DomesticCollateralForeignForex.java index 5eeb262dc398..0b153e210c60 100644 --- a/src/main/java/org/drip/sample/piterbarg2012/DomesticCollateralForeignForex.java +++ b/src/main/java/org/drip/sample/piterbarg2012/DomesticCollateralForeignForex.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.*; import org.drip.analytics.support.CaseInsensitiveTreeMap; -import org.drip.function.r1tor1.*; +import org.drip.function.r1tor1operator.Flat; import org.drip.param.creator.*; import org.drip.param.market.CurveSurfaceQuoteContainer; import org.drip.param.valuation.*; @@ -210,7 +210,7 @@ public static final void main ( fxCurve, vcForeignFunding, vcFX, - new FlatUnivariate (dblFXForeignRatesCorrelation) + new Flat (dblFXForeignRatesCorrelation) ); CurveSurfaceQuoteContainer mktParams = MarketParamsBuilder.Create ( diff --git a/src/main/java/org/drip/sample/piterbarg2012/DomesticCollateralForeignForexAnalysis.java b/src/main/java/org/drip/sample/piterbarg2012/DomesticCollateralForeignForexAnalysis.java index 50e9e5928b91..afbffa0c048d 100644 --- a/src/main/java/org/drip/sample/piterbarg2012/DomesticCollateralForeignForexAnalysis.java +++ b/src/main/java/org/drip/sample/piterbarg2012/DomesticCollateralForeignForexAnalysis.java @@ -3,7 +3,7 @@ import org.drip.analytics.date.*; import org.drip.analytics.support.CaseInsensitiveTreeMap; -import org.drip.function.r1tor1.*; +import org.drip.function.r1tor1operator.Flat; import org.drip.param.creator.*; import org.drip.param.market.CurveSurfaceQuoteContainer; import org.drip.param.valuation.*; @@ -211,7 +211,7 @@ public static final void main ( fxCurve, vcForeignFunding, vcFX, - new FlatUnivariate (0.) + new Flat (0.) ); CurveSurfaceQuoteContainer mktParams = MarketParamsBuilder.Create ( @@ -313,7 +313,7 @@ public static final void main ( new int[] {dtToday.julian()}, new double[] {dblFXVolatility} ), - new FlatUnivariate (dblFXForeignRatesCorrelation) + new Flat (dblFXForeignRatesCorrelation) ); mktParams.setPayCurrencyCollateralCurrencyCurve ( diff --git a/src/main/java/org/drip/sample/piterbarg2012/ForeignCollateralDomesticForex.java b/src/main/java/org/drip/sample/piterbarg2012/ForeignCollateralDomesticForex.java index 74aabc8cd11e..c0e301c56836 100644 --- a/src/main/java/org/drip/sample/piterbarg2012/ForeignCollateralDomesticForex.java +++ b/src/main/java/org/drip/sample/piterbarg2012/ForeignCollateralDomesticForex.java @@ -5,7 +5,7 @@ import org.drip.analytics.date.*; import org.drip.analytics.support.CaseInsensitiveTreeMap; -import org.drip.function.r1tor1.*; +import org.drip.function.r1tor1operator.Flat; import org.drip.param.creator.*; import org.drip.param.market.CurveSurfaceQuoteContainer; import org.drip.param.valuation.*; @@ -210,7 +210,7 @@ public static final void main ( fxCurve, vcForeignFunding, vcFX, - new FlatUnivariate (dblFXForeignRatesCorrelation) + new Flat (dblFXForeignRatesCorrelation) ); CurveSurfaceQuoteContainer mktParams = MarketParamsBuilder.Create ( diff --git a/src/main/java/org/drip/sample/piterbarg2012/ForeignCollateralDomesticForexAnalysis.java b/src/main/java/org/drip/sample/piterbarg2012/ForeignCollateralDomesticForexAnalysis.java index 3dc959a61762..2d36933c7d2a 100644 --- a/src/main/java/org/drip/sample/piterbarg2012/ForeignCollateralDomesticForexAnalysis.java +++ b/src/main/java/org/drip/sample/piterbarg2012/ForeignCollateralDomesticForexAnalysis.java @@ -3,7 +3,7 @@ import org.drip.analytics.date.*; import org.drip.analytics.support.CaseInsensitiveTreeMap; -import org.drip.function.r1tor1.*; +import org.drip.function.r1tor1operator.Flat; import org.drip.param.creator.*; import org.drip.param.market.CurveSurfaceQuoteContainer; import org.drip.param.valuation.*; @@ -211,7 +211,7 @@ public static final void main ( fxCurve, vcForeignFunding, vcFX, - new FlatUnivariate (0.) + new Flat (0.) ); CurveSurfaceQuoteContainer mktParams = MarketParamsBuilder.Create ( @@ -313,7 +313,7 @@ public static final void main ( new int[] {dtToday.julian()}, new double[] {dblFXVolatility} ), - new FlatUnivariate (dblFXForeignRatesCorrelation) + new Flat (dblFXForeignRatesCorrelation) ); mktParams.setPayCurrencyCollateralCurrencyCurve ( diff --git a/src/main/java/org/drip/sample/piterbarg2012/ForeignCollateralizedZeroCoupon.java b/src/main/java/org/drip/sample/piterbarg2012/ForeignCollateralizedZeroCoupon.java index e6120c7f9a2c..5655d96609d7 100644 --- a/src/main/java/org/drip/sample/piterbarg2012/ForeignCollateralizedZeroCoupon.java +++ b/src/main/java/org/drip/sample/piterbarg2012/ForeignCollateralizedZeroCoupon.java @@ -2,7 +2,7 @@ package org.drip.sample.piterbarg2012; import org.drip.analytics.date.*; -import org.drip.function.r1tor1.*; +import org.drip.function.r1tor1operator.Flat; import org.drip.product.params.CurrencyPair; import org.drip.service.env.EnvManager; import org.drip.state.creator.ScenarioDiscountCurveBuilder; @@ -163,7 +163,7 @@ private static final double ZeroCouponVolCorr ( new int[] {dtSpot.julian()}, new double[] {dblFXVolatility} ), - new FlatUnivariate (dblFXForeignRatesCorrelation) + new Flat (dblFXForeignRatesCorrelation) ); double dblPrice = dcCcyDomesticCollatForeign.df (dtMaturity); diff --git a/src/main/java/org/drip/sample/principal/ImpactExponentAnalysis.java b/src/main/java/org/drip/sample/principal/ImpactExponentAnalysis.java index 537ce780da9f..1f2bfe8e2866 100644 --- a/src/main/java/org/drip/sample/principal/ImpactExponentAnalysis.java +++ b/src/main/java/org/drip/sample/principal/ImpactExponentAnalysis.java @@ -8,7 +8,7 @@ import org.drip.execution.parameters.*; import org.drip.execution.principal.Almgren2003Estimator; import org.drip.execution.profiletime.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -225,7 +225,7 @@ public static final void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.Almgren2003 ( new ArithmeticPriceDynamicsSettings ( 0., - new FlatUnivariate (dblVolatility), + new Flat (dblVolatility), 0. ), new UniformParticipationRateLinear ((ParticipationRateLinear) pmip.permanentTransactionFunction()), diff --git a/src/main/java/org/drip/sample/principal/InformationRatioAnalysis.java b/src/main/java/org/drip/sample/principal/InformationRatioAnalysis.java index 6973cd11fa85..634fea282164 100644 --- a/src/main/java/org/drip/sample/principal/InformationRatioAnalysis.java +++ b/src/main/java/org/drip/sample/principal/InformationRatioAnalysis.java @@ -8,7 +8,7 @@ import org.drip.execution.parameters.*; import org.drip.execution.principal.Almgren2003Estimator; import org.drip.execution.profiletime.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -206,7 +206,7 @@ public static final void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.Almgren2003 ( new ArithmeticPriceDynamicsSettings ( 0., - new FlatUnivariate (dblVolatility), + new Flat (dblVolatility), 0. ), new UniformParticipationRateLinear ((ParticipationRateLinear) pmip.permanentTransactionFunction()), diff --git a/src/main/java/org/drip/sample/principal/OptimalMeasuresConstantExponent.java b/src/main/java/org/drip/sample/principal/OptimalMeasuresConstantExponent.java index 36c8bbafd90e..4f13a36fd233 100644 --- a/src/main/java/org/drip/sample/principal/OptimalMeasuresConstantExponent.java +++ b/src/main/java/org/drip/sample/principal/OptimalMeasuresConstantExponent.java @@ -8,7 +8,7 @@ import org.drip.execution.parameters.*; import org.drip.execution.principal.*; import org.drip.execution.profiletime.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -204,7 +204,7 @@ public static final void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.Almgren2003 ( new ArithmeticPriceDynamicsSettings ( dblDrift, - new FlatUnivariate (dblVolatility), + new Flat (dblVolatility), dblSerialCorrelation ), new UniformParticipationRateLinear ((ParticipationRateLinear) pmip.permanentTransactionFunction()), diff --git a/src/main/java/org/drip/sample/principal/OptimalMeasuresDiscountDependence.java b/src/main/java/org/drip/sample/principal/OptimalMeasuresDiscountDependence.java index b5074056f602..4cb07180d492 100644 --- a/src/main/java/org/drip/sample/principal/OptimalMeasuresDiscountDependence.java +++ b/src/main/java/org/drip/sample/principal/OptimalMeasuresDiscountDependence.java @@ -8,7 +8,7 @@ import org.drip.execution.parameters.*; import org.drip.execution.principal.Almgren2003Estimator; import org.drip.execution.profiletime.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -197,7 +197,7 @@ public static final void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.Almgren2003 ( new ArithmeticPriceDynamicsSettings ( 0., - new FlatUnivariate (dblVolatility), + new Flat (dblVolatility), 0. ), new UniformParticipationRateLinear ((ParticipationRateLinear) pmip.permanentTransactionFunction()), diff --git a/src/main/java/org/drip/sample/principal/OptimalMeasuresReconciler.java b/src/main/java/org/drip/sample/principal/OptimalMeasuresReconciler.java index d3a368db2757..81de2e10ab0b 100644 --- a/src/main/java/org/drip/sample/principal/OptimalMeasuresReconciler.java +++ b/src/main/java/org/drip/sample/principal/OptimalMeasuresReconciler.java @@ -8,7 +8,7 @@ import org.drip.execution.parameters.*; import org.drip.execution.principal.*; import org.drip.execution.profiletime.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -200,7 +200,7 @@ public static final void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.Almgren2003 ( new ArithmeticPriceDynamicsSettings ( dblDrift, - new FlatUnivariate (dblVolatility), + new Flat (dblVolatility), dblSerialCorrelation ), new UniformParticipationRateLinear ((ParticipationRateLinear) pmip.permanentTransactionFunction()), @@ -271,7 +271,7 @@ public static final void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.Almgren2003 ( new ArithmeticPriceDynamicsSettings ( dblDrift, - new FlatUnivariate (dblVolatility), + new Flat (dblVolatility), dblSerialCorrelation ), new UniformParticipationRateLinear ((ParticipationRateLinear) pmip.permanentTransactionFunction()), diff --git a/src/main/java/org/drip/sample/principal/OptimalTrajectoryMeasures.java b/src/main/java/org/drip/sample/principal/OptimalTrajectoryMeasures.java index bd666569a0b7..ca9c76aae4fe 100644 --- a/src/main/java/org/drip/sample/principal/OptimalTrajectoryMeasures.java +++ b/src/main/java/org/drip/sample/principal/OptimalTrajectoryMeasures.java @@ -9,7 +9,7 @@ import org.drip.execution.principal.Almgren2003Estimator; import org.drip.execution.profiletime.*; import org.drip.function.definition.R1ToR1; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.service.common.FormatUtil; import org.drip.service.env.EnvManager; @@ -175,7 +175,7 @@ public static final void main ( LinearPermanentExpectationParameters lpep = ArithmeticPriceEvolutionParametersBuilder.Almgren2003 ( new ArithmeticPriceDynamicsSettings ( 0., - new FlatUnivariate (dblVolatility), + new Flat (dblVolatility), 0. ), new UniformParticipationRateLinear ((ParticipationRateLinear) pmip.permanentTransactionFunction()), diff --git a/src/main/java/org/drip/sample/stochasticvolatility/StandardHestonPricingMeasures.java b/src/main/java/org/drip/sample/stochasticvolatility/StandardHestonPricingMeasures.java index b7ee0ee17fb9..173e8a8cee93 100644 --- a/src/main/java/org/drip/sample/stochasticvolatility/StandardHestonPricingMeasures.java +++ b/src/main/java/org/drip/sample/stochasticvolatility/StandardHestonPricingMeasures.java @@ -2,7 +2,7 @@ package org.drip.sample.stochasticvolatility; import org.drip.analytics.date.*; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.numerical.fourier.PhaseAdjuster; import org.drip.param.pricer.HestonOptionPricerParams; @@ -386,7 +386,7 @@ public static final void main ( dblSpot, false, dc, - new FlatUnivariate (dblSpotVolatility), + new Flat (dblSpotVolatility), fpg ) ); diff --git a/src/main/java/org/drip/sample/xccy/OTCCrossCurrencySwaps.java b/src/main/java/org/drip/sample/xccy/OTCCrossCurrencySwaps.java index 5882c11f62a4..26097084e5ef 100644 --- a/src/main/java/org/drip/sample/xccy/OTCCrossCurrencySwaps.java +++ b/src/main/java/org/drip/sample/xccy/OTCCrossCurrencySwaps.java @@ -3,7 +3,7 @@ import org.drip.analytics.date.*; import org.drip.analytics.support.CaseInsensitiveTreeMap; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.market.otc.*; import org.drip.param.market.CurveSurfaceQuoteContainer; import org.drip.param.valuation.*; @@ -233,7 +233,7 @@ private static final void OTCCrossCurrencyRun ( mktParams.setForwardFundingCorrelation ( friDerived3M, fundingLabelReference, - new FlatUnivariate ( + new Flat ( dblReferenceFundingDerived3MCorr ) ); @@ -241,7 +241,7 @@ private static final void OTCCrossCurrencyRun ( mktParams.setForwardFXCorrelation ( friDerived3M, fxLabel, - new FlatUnivariate ( + new Flat ( dblDerived3MReferenceDerivedFXCorr ) ); @@ -249,7 +249,7 @@ private static final void OTCCrossCurrencyRun ( mktParams.setFundingFXCorrelation ( fundingLabelReference, fxLabel, - new FlatUnivariate ( + new Flat ( dblReferenceFundingReferenceDerivedFXCorr ) ); diff --git a/src/main/java/org/drip/sequence/functional/IdempotentUnivariateRandom.java b/src/main/java/org/drip/sequence/functional/IdempotentUnivariateRandom.java index d033f94134f0..9108226fec2b 100644 --- a/src/main/java/org/drip/sequence/functional/IdempotentUnivariateRandom.java +++ b/src/main/java/org/drip/sequence/functional/IdempotentUnivariateRandom.java @@ -83,7 +83,7 @@ * @author Lakshmi Krishnamurthy */ -public class IdempotentUnivariateRandom extends org.drip.function.r1tor1.OffsetIdempotent { +public class IdempotentUnivariateRandom extends org.drip.function.r1tor1operator.OffsetIdempotent { private org.drip.measure.continuous.R1Univariate _dist = null; /** diff --git a/src/main/java/org/drip/spline/basis/FunctionSetBuilder.java b/src/main/java/org/drip/spline/basis/FunctionSetBuilder.java index 9a088b99bcba..02b9693e7019 100644 --- a/src/main/java/org/drip/spline/basis/FunctionSetBuilder.java +++ b/src/main/java/org/drip/spline/basis/FunctionSetBuilder.java @@ -316,15 +316,15 @@ public static final FunctionSet KaklisPandelisBasisSet ( (1); org.drip.function.definition.R1ToR1 auReflectedLinearPoly = new - org.drip.function.r1tor1.UnivariateReflection (auLinearPoly); + org.drip.function.r1tor1operator.Reflection (auLinearPoly); org.drip.function.definition.R1ToR1 auKaklisPandelisPolynomial = new org.drip.function.r1tor1.Polynomial (kaklisPandelisSetParams.polynomialTensionDegree()); return new org.drip.spline.basis.FunctionSet (new org.drip.function.definition.R1ToR1[] - {auReflectedLinearPoly, auLinearPoly, new org.drip.function.r1tor1.UnivariateConvolution - (auLinearPoly, new org.drip.function.r1tor1.UnivariateReflection - (auKaklisPandelisPolynomial)), new org.drip.function.r1tor1.UnivariateConvolution + {auReflectedLinearPoly, auLinearPoly, new org.drip.function.r1tor1operator.Convolution + (auLinearPoly, new org.drip.function.r1tor1operator.Reflection + (auKaklisPandelisPolynomial)), new org.drip.function.r1tor1operator.Convolution (auKaklisPandelisPolynomial, auReflectedLinearPoly)}); } catch (java.lang.Exception e) { e.printStackTrace(); diff --git a/src/main/java/org/drip/spline/bspline/SegmentBasisFunctionSet.java b/src/main/java/org/drip/spline/bspline/SegmentBasisFunctionSet.java index 40c6d2c996fa..3602b4ea775d 100644 --- a/src/main/java/org/drip/spline/bspline/SegmentBasisFunctionSet.java +++ b/src/main/java/org/drip/spline/bspline/SegmentBasisFunctionSet.java @@ -3,7 +3,7 @@ import org.drip.function.definition.R1ToR1; import org.drip.function.r1tor1.Polynomial; -import org.drip.function.r1tor1.UnivariateReflection; +import org.drip.function.r1tor1operator.Reflection; import org.drip.numerical.common.NumberUtil; import org.drip.spline.basis.FunctionSet; @@ -136,7 +136,7 @@ private static final R1ToR1[] ResponseBasisArray ( basisHatFunctionArrayToUse[0] = new Polynomial (0); - basisHatFunctionArrayToUse[1] = new UnivariateReflection (new Polynomial (1)); + basisHatFunctionArrayToUse[1] = new Reflection (new Polynomial (1)); for (int basisIndex = 0; basisIndex < basisCountToUse; ++basisIndex) { basisHatFunctionArrayToUse[2 + basisIndex] = basisHatFunctionArray[basisIndex]; diff --git a/src/main/java/org/drip/xva/proto/PositionGroupSpecification.java b/src/main/java/org/drip/xva/proto/PositionGroupSpecification.java index cadeaaf2fa4e..4b94afc56910 100644 --- a/src/main/java/org/drip/xva/proto/PositionGroupSpecification.java +++ b/src/main/java/org/drip/xva/proto/PositionGroupSpecification.java @@ -2,7 +2,7 @@ package org.drip.xva.proto; import org.drip.function.definition.R1ToR1; -import org.drip.function.r1tor1.FlatUnivariate; +import org.drip.function.r1tor1operator.Flat; import org.drip.numerical.common.NumberUtil; import org.drip.service.common.StringUtil; @@ -213,8 +213,8 @@ public static final PositionGroupSpecification FixedThreshold ( name, 14, 14, - new FlatUnivariate[] {new FlatUnivariate (clientThreshold)}, - new FlatUnivariate (dealerThreshold), + new Flat[] {new Flat (clientThreshold)}, + new Flat (dealerThreshold), 0., 0., positionReplicationScheme,