diff --git a/IdeaDRIP/NumericalAnalysis/NA_v0.08 b/IdeaDRIP/NumericalAnalysis/NA_v0.08
new file mode 100644
index 000000000000..71552a141405
--- /dev/null
+++ b/IdeaDRIP/NumericalAnalysis/NA_v0.08
@@ -0,0 +1,211 @@
+
+ --------------------------
+ #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 - Unitary Matrix
+ ----------------------------
+ ----------------------------
+ 13.1) Properties:
+ - U.U conjugate = I defines unitary matrix
+ - U.U conjugate = U conjugate.U = I
+ - det U = 1
+ - Eigenvectors are orthogonal
+ - U conjugate = U inverse
+ - Norm (U.x) = Norm (x)
+ - Normal Matrix U
+ 13.2) 2x2 Elementary Matrices
+ - Wiki Representation #1
+ - Wiki Representation #2
+ - Wiki Representation #3
+ - Wiki Representation #4
+ ----------------------------
+
+ --------------------------
+ #14 - CrankâNicolson method
+ --------------------------
+ --------------------------
+ 14.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
+ 14.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)
+ 14.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
+ 14.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
+ 14.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
+ 14.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/ReleaseNotes/03_13_2024.txt b/ReleaseNotes/03_13_2024.txt
new file mode 100644
index 000000000000..16be225688ee
--- /dev/null
+++ b/ReleaseNotes/03_13_2024.txt
@@ -0,0 +1,52 @@
+
+Features:
+
+ - Implementation of R1/C1 Matrices (8, 9)
+ - Numerical R^1 Square Matrix Re-work (10, 11, 12)
+ - Numerical R^1 Tridiagonal Matrix Re-work (13, 14)
+ - Numerical R^1 Non-periodic Tridiagonal Matrix Re-work (15, 16)
+ - Numerical R^1 Periodic Tridiagonal Matrix Re-work (17, 18)
+ - Numerical R^1 Triangular Matrix Re-work (19, 20, 21)
+ - Linear Algebra R^1 Matrix Util (22, 23, 24)
+ - Implementation of Complex Number Suite (25)
+ - Numerical Complex C1 Shell #1 (26, 27, 28)
+ - Numerical Complex C1 Shell #2 (29, 30, 31)
+ - Numerical Complex Cartesian C1 Re-work (32, 33, 34)
+ - Numerical Complex C1 Cartesian Re-work (35, 36)
+ - C1 Matrix Util Add #1 (37, 38, 39)
+ - C1 Matrix Util Add #2 (40, 41, 42)
+ - C1 Matrix Util Add #3 (43, 44, 45)
+ - C1 Matrix Util Add #4 (46, 47, 48)
+ - C1 Matrix Util Scale #1 (49, 50, 51)
+ - C1 Matrix Util Scale #2 (52, 53, 54)
+ - C1 Matrix Util Scale #3 (55, 56, 57)
+ - C1 Matrix Util Scale #4 (58, 59, 60)
+ - C1 Matrix Util Subtract #1 (61, 62, 63)
+ - C1 Matrix Util Subtract #2 (64, 65, 66)
+ - C1 Matrix Util Subtract #3 (67, 68, 69)
+ - C1 Matrix Util Subtract #4 (70, 71, 72)
+ - C1 Matrix Util Multiply #1 (73, 74, 75)
+ - C1 Matrix Util Multiply #2 (76, 77, 78)
+ - C1 Matrix Util Multiply #3 (79, 80, 81)
+ - C1 Matrix Util Multiply #4 (82, 83, 84)
+ - C1 Matrix Util Divide #1 (85, 86, 87)
+ - C1 Matrix Util Divide #2 (88, 89, 90)
+ - C1 Matrix Util Divide #3 (91, 92, 93)
+ - C1 Matrix Util Divide #4 (94, 95, 96)
+ - C1 Matrix Util Square #1 (97, 98, 99)
+ - C1 Matrix Util Square #2 (100, 101, 102)
+ - C1 Matrix Util Square #3 (103, 104, 105)
+ - C1 Matrix Util Square #4 (106, 107, 108)
+ - C1 Matrix Util Square Root #1 (109, 110, 111)
+ - C1 Matrix Util Square Root #2 (112, 113, 114)
+ - C1 Matrix Util Square Root #3 (115, 116, 117)
+ - C1 Matrix Util Square Root #4 (118, 119, 120)
+
+
+Bug Fixes/Re-organization:
+
+Samples:
+
+IdeaDRIP:
+
+ - Unitary Matrix Elementary Constructions - 2x2 (1-7)
diff --git a/src/main/java/org/drip/dynamics/kolmogorov/RdFokkerPlanck.java b/src/main/java/org/drip/dynamics/kolmogorov/RdFokkerPlanck.java
index 6117bea35619..e601cf9ae60c 100644
--- a/src/main/java/org/drip/dynamics/kolmogorov/RdFokkerPlanck.java
+++ b/src/main/java/org/drip/dynamics/kolmogorov/RdFokkerPlanck.java
@@ -346,7 +346,7 @@ public org.drip.function.definition.RdToR1 steadyStatePDF()
);
final double[][] omegaInverse =
- org.drip.numerical.linearalgebra.MatrixUtil.InvertUsingGaussianElimination (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.InvertUsingGaussianElimination (
omega
);
@@ -406,9 +406,9 @@ public org.drip.function.definition.RdToR1 steadyStatePDF()
throws java.lang.Exception
{
return rdNormalizerFinal * r1ToR1Exponential.evaluate (
- org.drip.numerical.linearalgebra.MatrixUtil.DotProduct (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.DotProduct (
xArray,
- org.drip.numerical.linearalgebra.MatrixUtil.Product (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
omegaInverse,
xArray
)
diff --git a/src/main/java/org/drip/dynamics/process/RdStochasticEvolver.java b/src/main/java/org/drip/dynamics/process/RdStochasticEvolver.java
index ed65ae717c07..c165e6abab95 100644
--- a/src/main/java/org/drip/dynamics/process/RdStochasticEvolver.java
+++ b/src/main/java/org/drip/dynamics/process/RdStochasticEvolver.java
@@ -306,7 +306,7 @@ public org.drip.dynamics.ito.TimeRdVertex evolve (
return null;
}
- double[] volatilityShiftArray = org.drip.numerical.linearalgebra.MatrixUtil.Product (
+ double[] volatilityShiftArray = org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
pointVolatilityGrid (
currentVertex
),
diff --git a/src/main/java/org/drip/function/definition/CartesianComplexNumber.java b/src/main/java/org/drip/function/definition/CartesianComplexNumber.java
deleted file mode 100644
index 8deeb5dcf039..000000000000
--- a/src/main/java/org/drip/function/definition/CartesianComplexNumber.java
+++ /dev/null
@@ -1,587 +0,0 @@
-
-package org.drip.function.definition;
-
-/*
- * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- */
-
-/*!
- * Copyright (C) 2022 Lakshmi Krishnamurthy
- * Copyright (C) 2021 Lakshmi Krishnamurthy
- * Copyright (C) 2020 Lakshmi Krishnamurthy
- * Copyright (C) 2019 Lakshmi Krishnamurthy
- * Copyright (C) 2018 Lakshmi Krishnamurthy
- * Copyright (C) 2017 Lakshmi Krishnamurthy
- * Copyright (C) 2016 Lakshmi Krishnamurthy
- * Copyright (C) 2015 Lakshmi Krishnamurthy
- * Copyright (C) 2014 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.
- */
-
-/**
- * CartesianComplexNumber implements the functionality for dealing with the Cartesian Form of Complex
- * Numbers.
- *
- *
- *
- *
- *
- * @author Lakshmi Krishnamurthy
- */
-
-public class CartesianComplexNumber
-{
- private double _real = java.lang.Double.NaN;
- private double _imaginary = java.lang.Double.NaN;
-
- /**
- * Add the 2 Complex Numbers
- *
- * @param complexNumber1 The First Complex Number
- * @param complexNumber2 The Second Complex Number
- *
- * @return The Complex Number instance that is a sum of the two
- */
-
- public static final CartesianComplexNumber Add (
- final CartesianComplexNumber complexNumber1,
- final CartesianComplexNumber complexNumber2)
- {
- if (null == complexNumber1 || null == complexNumber2)
- {
- return null;
- }
-
- try
- {
- return new CartesianComplexNumber (
- complexNumber1.real() + complexNumber2.real(),
- complexNumber1.imaginary() + complexNumber2.imaginary()
- );
- }
- catch (java.lang.Exception e)
- {
- e.printStackTrace();
- }
-
- return null;
- }
-
- /**
- * Scale the Complex Number with the factor
- *
- * @param complexNumber The Complex Number
- * @param scale The Scaling Factor
- *
- * @return The Scaled Complex Number
- */
-
- public static final CartesianComplexNumber Scale (
- final CartesianComplexNumber complexNumber,
- final double scale)
- {
- if (null == complexNumber || !org.drip.numerical.common.NumberUtil.IsValid (scale))
- {
- return null;
- }
-
- try
- {
- return new CartesianComplexNumber (
- scale * complexNumber.real(),
- scale * complexNumber.imaginary()
- );
- }
- catch (java.lang.Exception e)
- {
- e.printStackTrace();
- }
-
- return null;
- }
-
- /**
- * Subtract the Second Complex Number from the First
- *
- * @param complexNumber1 The First Complex Number
- * @param complexNumber2 The Second Complex Number
- *
- * @return The "Difference" Complex Number
- */
-
- public static final CartesianComplexNumber Subtract (
- final CartesianComplexNumber complexNumber1,
- final CartesianComplexNumber complexNumber2)
- {
- if (null == complexNumber1 || null == complexNumber2)
- {
- return null;
- }
-
- try {
- return new CartesianComplexNumber (
- complexNumber1.real() - complexNumber2.real(),
- complexNumber1.imaginary() - complexNumber2.imaginary()
- );
- }
- catch (java.lang.Exception e)
- {
- e.printStackTrace();
- }
-
- return null;
- }
-
- /**
- * Multiply the 2 Complex Numbers
- *
- * @param complexNumber1 The First Complex Number
- * @param complexNumber2 The Second Complex Number
- *
- * @return The Complex Number instance that is a product of the two
- */
-
- public static final CartesianComplexNumber Multiply (
- final CartesianComplexNumber complexNumber1,
- final CartesianComplexNumber complexNumber2)
- {
- if (null == complexNumber1 || null == complexNumber2)
- {
- return null;
- }
-
- double real1 = complexNumber1.real();
-
- double real2 = complexNumber2.real();
-
- double imaginary1 = complexNumber1.imaginary();
-
- double imaginary2 = complexNumber2.imaginary();
-
- try
- {
- return new CartesianComplexNumber (
- real1 * real2 - imaginary1 * imaginary2,
- real1 * imaginary2 + real2 * imaginary1
- );
- }
- catch (java.lang.Exception e)
- {
- e.printStackTrace();
- }
-
- return null;
- }
-
- /**
- * Divide the Numerator Complex Number by the Denominator Complex Number
- *
- * @param numerator The Numerator Complex Number
- * @param denominator The Denominator Complex Number
- *
- * @return The "Divided" Complex Number
- */
-
- public static final CartesianComplexNumber Divide (
- final CartesianComplexNumber numerator,
- final CartesianComplexNumber denominator)
- {
- if (null == numerator || null == denominator)
- {
- return null;
- }
-
- double numeratorReal = numerator.real();
-
- double denominatorReal = denominator.real();
-
- double numeratorImaginary = numerator.imaginary();
-
- double denominatorImaginary = denominator.imaginary();
-
- if (0. == denominatorReal && 0. == denominatorImaginary)
- {
- return null;
- }
-
- double inverseDenominatorModulus = 1. / denominator.modulus();
-
- try
- {
- return new CartesianComplexNumber (
- (numeratorReal * denominatorReal + numeratorImaginary * denominatorImaginary) *
- inverseDenominatorModulus,
- (denominatorReal * numeratorImaginary - numeratorReal * denominatorImaginary) *
- inverseDenominatorModulus
- );
- }
- catch (java.lang.Exception e)
- {
- e.printStackTrace();
- }
-
- return null;
- }
-
- /**
- * Square the Complex Number
- *
- * @param complexNumber The Complex Number
- *
- * @return The Squared Complex Number Instance
- */
-
- public static final CartesianComplexNumber Square (
- final CartesianComplexNumber complexNumber)
- {
- if (null == complexNumber)
- {
- return null;
- }
-
- double modulus = complexNumber.modulus();
-
- if (0. == modulus)
- {
- try
- {
- return new CartesianComplexNumber (
- 0.,
- 0.
- );
- }
- catch (java.lang.Exception e)
- {
- e.printStackTrace();
- }
-
- return null;
- }
-
- double argument = 2. * complexNumber.argument();
-
- try
- {
- return new CartesianComplexNumber (
- modulus * java.lang.Math.cos (argument),
- modulus * java.lang.Math.sin (argument)
- );
- }
- catch (java.lang.Exception e)
- {
- e.printStackTrace();
- }
-
- return null;
- }
-
- /**
- * Compute the Square Root of the Complex Number
- *
- * @param complexNumber The Complex Number
- *
- * @return The Square Root Complex Number Instance
- */
-
- public static final CartesianComplexNumber SquareRoot (
- final CartesianComplexNumber complexNumber)
- {
- if (null == complexNumber)
- {
- return null;
- }
-
- double modulus = java.lang.Math.sqrt (complexNumber.modulus());
-
- if (0. == modulus)
- {
- try
- {
- return new CartesianComplexNumber (
- 0.,
- 0.
- );
- }
- catch (java.lang.Exception e)
- {
- e.printStackTrace();
- }
-
- return null;
- }
-
- double argument = 0.5 * complexNumber.argument();
-
- try
- {
- return new CartesianComplexNumber (
- modulus * java.lang.Math.cos (argument),
- modulus * java.lang.Math.sin (argument)
- );
- }
- catch (java.lang.Exception e)
- {
- e.printStackTrace();
- }
-
- return null;
- }
-
- /**
- * Exponentiate the Complex Number
- *
- * @param complexNumber The Complex Number
- *
- * @return The Exponentiated Complex Number Instance
- */
-
- public static final CartesianComplexNumber Exponentiate (
- final CartesianComplexNumber complexNumber)
- {
- if (null == complexNumber)
- {
- return null;
- }
-
- double argument = complexNumber.imaginary();
-
- double modulus = java.lang.Math.exp (complexNumber.real());
-
- try
- {
- return new CartesianComplexNumber (
- modulus * java.lang.Math.cos (argument),
- modulus * java.lang.Math.sin (argument)
- );
- }
- catch (java.lang.Exception e)
- {
- e.printStackTrace();
- }
-
- return null;
- }
-
- /**
- * Compute Logarithm of the Complex Number
- *
- * @param complexNumber The Complex Number
- *
- * @return The Complex Number Logarithm Instance
- */
-
- public static final CartesianComplexNumber Logarithm (
- final CartesianComplexNumber complexNumber)
- {
- if (null == complexNumber)
- {
- return null;
- }
-
- double modulus = complexNumber.modulus();
-
- if (0. == modulus)
- {
- return null;
- }
-
- try
- {
- return new CartesianComplexNumber (
- 0.5 * java.lang.Math.log (modulus),
- complexNumber.argument()
- );
- }
- catch (java.lang.Exception e)
- {
- e.printStackTrace();
- }
-
- return null;
- }
-
- /**
- * Construct the Complex Number from its Polar Representation
- *
- * @param r r
- * @param theta theta
- *
- * @return Complex Number from its Polar Representation
- */
-
- public static final CartesianComplexNumber FromPolar (
- final double r,
- final double theta)
- {
- try
- {
- return !org.drip.numerical.common.NumberUtil.IsValid (r) ||
- !org.drip.numerical.common.NumberUtil.IsValid (theta) ? null :
- new CartesianComplexNumber (
- r * java.lang.Math.cos (theta),
- r * java.lang.Math.sin (theta)
- );
- }
- catch (java.lang.Exception e)
- {
- e.printStackTrace();
- }
-
- return null;
- }
-
- /**
- * CartesianComplexNumber constructor
- *
- * @param real Real Part
- * @param imaginary Imaginary Part
- *
- * @throws java.lang.Exception Thrown if the Inputs are invalid
- */
-
- public CartesianComplexNumber (
- final double real,
- final double imaginary)
- throws java.lang.Exception
- {
- if (!org.drip.numerical.common.NumberUtil.IsValid (_real = real) ||
- !org.drip.numerical.common.NumberUtil.IsValid (_imaginary = imaginary))
- {
- throw new java.lang.Exception ("CartesianComplexNumber Constructor => Invalid Inputs");
- }
- }
-
- /**
- * Retrieve the Real Part
- *
- * @return The Real Part
- */
-
- public double real()
- {
- return _real;
- }
-
- /**
- * Retrieve the Imaginary Part
- *
- * @return The Imaginary Part
- */
-
- public double imaginary()
- {
- return _imaginary;
- }
-
- /**
- * Retrieve the Modulus
- *
- * @return The Modulus
- */
-
- public double modulus()
- {
- return _real * _real + _imaginary * _imaginary;
- }
-
- /**
- * Retrieve the Absolute Value
- *
- * @return The Absolute Value
- */
-
- public double abs()
- {
- return java.lang.Math.sqrt (modulus());
- }
-
- /**
- * Retrieve the Argument
- *
- * @return The Argument
- */
-
- public double argument()
- {
- return 0. == _real && 0. == _imaginary ? 0. : java.lang.Math.atan (_imaginary / _real);
- }
-
- /**
- * Display the Real/Imaginary Contents
- *
- * @return The Real/Imaginary Contents
- */
-
- public java.lang.String display()
- {
- return "\t[" + _real + ", " + _imaginary + "]";
- }
-}
diff --git a/src/main/java/org/drip/function/definition/R2ToZ1.java b/src/main/java/org/drip/function/definition/R2ToZ1.java
index 4938afee0acb..3a86b897c652 100644
--- a/src/main/java/org/drip/function/definition/R2ToZ1.java
+++ b/src/main/java/org/drip/function/definition/R2ToZ1.java
@@ -126,7 +126,7 @@ public interface R2ToZ1
* @return Returns the Calculated Complex Value
*/
- public abstract org.drip.function.definition.CartesianComplexNumber evaluate (
+ public abstract org.drip.numerical.complex.CartesianC1 evaluate (
final double x,
final double y);
}
diff --git a/src/main/java/org/drip/function/matrix/Square.java b/src/main/java/org/drip/function/matrix/Square.java
index f0d4ca4058e5..1d9f685b2f7f 100644
--- a/src/main/java/org/drip/function/matrix/Square.java
+++ b/src/main/java/org/drip/function/matrix/Square.java
@@ -272,15 +272,15 @@ public org.drip.function.matrix.FrobeniusCovariance frobeniusCovariance()
if (null == frobeniusComponentMatrix)
{
- frobeniusComponentMatrix = org.drip.numerical.linearalgebra.MatrixUtil.Scale2D (
+ frobeniusComponentMatrix = org.drip.numerical.linearalgebra.R1MatrixUtil.Scale2D (
eigenShadowArray[eigenIndex],
1. / (componentEigenValue - eigenValueArray[eigenIndex])
);
}
else
{
- frobeniusComponentMatrix = org.drip.numerical.linearalgebra.MatrixUtil.Scale2D (
- org.drip.numerical.linearalgebra.MatrixUtil.Product (
+ frobeniusComponentMatrix = org.drip.numerical.linearalgebra.R1MatrixUtil.Scale2D (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
frobeniusComponentMatrix,
eigenShadowArray[eigenIndex]
),
@@ -343,7 +343,7 @@ public double[][] evaluate (
try
{
- frobeniusComponentFunctionProjection = org.drip.numerical.linearalgebra.MatrixUtil.Scale2D (
+ frobeniusComponentFunctionProjection = org.drip.numerical.linearalgebra.R1MatrixUtil.Scale2D (
componentMapEntry.getValue().grid(),
r1ToR1Function.evaluate (
componentMapEntry.getKey()
diff --git a/src/main/java/org/drip/function/rdtor1descent/ArmijoEvolutionVerifierMetrics.java b/src/main/java/org/drip/function/rdtor1descent/ArmijoEvolutionVerifierMetrics.java
index 967309d6caad..a3eacbccf162 100644
--- a/src/main/java/org/drip/function/rdtor1descent/ArmijoEvolutionVerifierMetrics.java
+++ b/src/main/java/org/drip/function/rdtor1descent/ArmijoEvolutionVerifierMetrics.java
@@ -209,7 +209,7 @@ public boolean verify()
try
{
double gradientUpdatedFunctionValue = _currentVariateFunctionValue +
- _armijoParameter * stepLength() * org.drip.numerical.linearalgebra.MatrixUtil.DotProduct (
+ _armijoParameter * stepLength() * org.drip.numerical.linearalgebra.R1MatrixUtil.DotProduct (
targetDirection().component(),
currentVariateFunctionJacobian()
);
diff --git a/src/main/java/org/drip/function/rdtor1descent/CurvatureEvolutionVerifierMetrics.java b/src/main/java/org/drip/function/rdtor1descent/CurvatureEvolutionVerifierMetrics.java
index 3578c4dc13fb..d1f0d907e40e 100644
--- a/src/main/java/org/drip/function/rdtor1descent/CurvatureEvolutionVerifierMetrics.java
+++ b/src/main/java/org/drip/function/rdtor1descent/CurvatureEvolutionVerifierMetrics.java
@@ -200,13 +200,13 @@ public boolean verify()
try
{
- double nextFunctionIncrement = org.drip.numerical.linearalgebra.MatrixUtil.DotProduct (
+ double nextFunctionIncrement = org.drip.numerical.linearalgebra.R1MatrixUtil.DotProduct (
targetDirectionVector,
_nextVariateFunctionJacobian
);
double parametrizedCurrentFunctionIncrement =
- _curvatureParameter * org.drip.numerical.linearalgebra.MatrixUtil.DotProduct (
+ _curvatureParameter * org.drip.numerical.linearalgebra.R1MatrixUtil.DotProduct (
targetDirectionVector,
currentVariateFunctionJacobian()
);
diff --git a/src/main/java/org/drip/function/rdtor1descent/WolfeEvolutionVerifierMetrics.java b/src/main/java/org/drip/function/rdtor1descent/WolfeEvolutionVerifierMetrics.java
index aaa7a09f8c8b..9ba3a77bea1e 100644
--- a/src/main/java/org/drip/function/rdtor1descent/WolfeEvolutionVerifierMetrics.java
+++ b/src/main/java/org/drip/function/rdtor1descent/WolfeEvolutionVerifierMetrics.java
@@ -270,7 +270,7 @@ public boolean verify()
try
{
double gradientUpdatedFunctionValue = _currentVariateFunctionValue +
- _armijoParameter * stepLength() * org.drip.numerical.linearalgebra.MatrixUtil.DotProduct (
+ _armijoParameter * stepLength() * org.drip.numerical.linearalgebra.R1MatrixUtil.DotProduct (
targetDirectionVector,
currentVariateFunctionJacobian
);
@@ -281,13 +281,13 @@ public boolean verify()
return false;
}
- double nextFunctionIncrement = org.drip.numerical.linearalgebra.MatrixUtil.DotProduct (
+ double nextFunctionIncrement = org.drip.numerical.linearalgebra.R1MatrixUtil.DotProduct (
targetDirectionVector,
_nextVariateFunctionJacobian
);
double parametrizedCurrentFunctionIncrement = _curvatureParameter *
- org.drip.numerical.linearalgebra.MatrixUtil.DotProduct (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.DotProduct (
targetDirectionVector,
currentVariateFunctionJacobian
);
diff --git a/src/main/java/org/drip/function/rdtor1solver/NewtonFixedPointFinder.java b/src/main/java/org/drip/function/rdtor1solver/NewtonFixedPointFinder.java
index 0b3598049ab6..e6c698785c47 100644
--- a/src/main/java/org/drip/function/rdtor1solver/NewtonFixedPointFinder.java
+++ b/src/main/java/org/drip/function/rdtor1solver/NewtonFixedPointFinder.java
@@ -133,8 +133,8 @@ public NewtonFixedPointFinder (
org.drip.function.definition.RdToR1 objectiveFunction = objectiveFunction();
- double[] variateIncrementArray = org.drip.numerical.linearalgebra.MatrixUtil.Product (
- org.drip.numerical.linearalgebra.MatrixUtil.InvertUsingGaussianElimination (
+ double[] variateIncrementArray = org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.InvertUsingGaussianElimination (
objectiveFunction.hessian (
variateArray
)
diff --git a/src/main/java/org/drip/measure/bayesian/ProjectionDistributionLoading.java b/src/main/java/org/drip/measure/bayesian/ProjectionDistributionLoading.java
index e22dfcf31a2f..0e09c5a5ce27 100644
--- a/src/main/java/org/drip/measure/bayesian/ProjectionDistributionLoading.java
+++ b/src/main/java/org/drip/measure/bayesian/ProjectionDistributionLoading.java
@@ -127,8 +127,8 @@ public static final double[][] ProjectionCovariance (
for (int j = 0; j < iNumProjection; ++j) {
try {
aadblProjectionCovariance[i][j] = i != j ? 0. : dblTau *
- org.drip.numerical.linearalgebra.MatrixUtil.DotProduct (aadblScopingLoading[i],
- org.drip.numerical.linearalgebra.MatrixUtil.Product (aadblScopingCovariance,
+ org.drip.numerical.linearalgebra.R1MatrixUtil.DotProduct (aadblScopingLoading[i],
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Product (aadblScopingCovariance,
aadblScopingLoading[j]));
} catch (java.lang.Exception e) {
e.printStackTrace();
diff --git a/src/main/java/org/drip/measure/bayesian/R1MultivariateNormalConvolutionEngine.java b/src/main/java/org/drip/measure/bayesian/R1MultivariateNormalConvolutionEngine.java
index d1ecda204382..bf9bc64d167c 100644
--- a/src/main/java/org/drip/measure/bayesian/R1MultivariateNormalConvolutionEngine.java
+++ b/src/main/java/org/drip/measure/bayesian/R1MultivariateNormalConvolutionEngine.java
@@ -133,12 +133,12 @@ public R1MultivariateNormalConvolutionEngine()
if (aadblPriorPrecision.length != iNumVariate) return null;
- double[] adblPrecisionWeightedPriorMean = org.drip.numerical.linearalgebra.MatrixUtil.Product
+ double[] adblPrecisionWeightedPriorMean = org.drip.numerical.linearalgebra.R1MatrixUtil.Product
(aadblPriorPrecision, r1mnPrior.mean());
if (null == adblPrecisionWeightedPriorMean) return null;
- double[] adblPrecisionWeightedConditionalMean = org.drip.numerical.linearalgebra.MatrixUtil.Product
+ double[] adblPrecisionWeightedConditionalMean = org.drip.numerical.linearalgebra.R1MatrixUtil.Product
(aadblConditionalPrecision, r1mnConditional.mean());
if (null == adblPrecisionWeightedConditionalMean) return null;
@@ -150,10 +150,10 @@ public R1MultivariateNormalConvolutionEngine()
aadblJointPrecision[i][j] = aadblPriorPrecision[i][j] + aadblConditionalPrecision[i][j];
}
- double[][] aadblJointCovariance = org.drip.numerical.linearalgebra.MatrixUtil.InvertUsingGaussianElimination
+ double[][] aadblJointCovariance = org.drip.numerical.linearalgebra.R1MatrixUtil.InvertUsingGaussianElimination
(aadblJointPrecision);
- double[] adblJointPosteriorMean = org.drip.numerical.linearalgebra.MatrixUtil.Product (aadblJointCovariance,
+ double[] adblJointPosteriorMean = org.drip.numerical.linearalgebra.R1MatrixUtil.Product (aadblJointCovariance,
adblJointMean);
double[][] aadblUnconditionalCovariance = r1mnUnconditional.covariance().covarianceMatrix();
diff --git a/src/main/java/org/drip/measure/bayesian/TheilMixedEstimationModel.java b/src/main/java/org/drip/measure/bayesian/TheilMixedEstimationModel.java
index d58aa5416681..ace3cef4dd43 100644
--- a/src/main/java/org/drip/measure/bayesian/TheilMixedEstimationModel.java
+++ b/src/main/java/org/drip/measure/bayesian/TheilMixedEstimationModel.java
@@ -147,26 +147,26 @@ public static final org.drip.measure.bayesian.R1MultivariateConvolutionMetrics G
double[][] aadblScopingLoading2 = pdl2.scopingLoading();
- double[][] aadblScopingWeightedPrecision1 = org.drip.numerical.linearalgebra.MatrixUtil.Product
- (org.drip.numerical.linearalgebra.MatrixUtil.Transpose (aadblScopingLoading1),
+ double[][] aadblScopingWeightedPrecision1 = org.drip.numerical.linearalgebra.R1MatrixUtil.Product
+ (org.drip.numerical.linearalgebra.R1MatrixUtil.Transpose (aadblScopingLoading1),
r1mn1.covariance().precisionMatrix());
- double[][] aadblScopingWeightedPrecision2 = org.drip.numerical.linearalgebra.MatrixUtil.Product
- (org.drip.numerical.linearalgebra.MatrixUtil.Transpose (aadblScopingLoading2),
+ double[][] aadblScopingWeightedPrecision2 = org.drip.numerical.linearalgebra.R1MatrixUtil.Product
+ (org.drip.numerical.linearalgebra.R1MatrixUtil.Transpose (aadblScopingLoading2),
r1mn2.covariance().precisionMatrix());
- double[][] aadblScopingSpacePrecision1 = org.drip.numerical.linearalgebra.MatrixUtil.Product
+ double[][] aadblScopingSpacePrecision1 = org.drip.numerical.linearalgebra.R1MatrixUtil.Product
(aadblScopingWeightedPrecision1, aadblScopingLoading1);
- double[][] aadblScopingSpacePrecision2 = org.drip.numerical.linearalgebra.MatrixUtil.Product
+ double[][] aadblScopingSpacePrecision2 = org.drip.numerical.linearalgebra.R1MatrixUtil.Product
(aadblScopingWeightedPrecision2, aadblScopingLoading2);
if (null == aadblScopingSpacePrecision1 || null == aadblScopingSpacePrecision2) return null;
- double[] adblPrecisionWeightedMean1 = org.drip.numerical.linearalgebra.MatrixUtil.Product
+ double[] adblPrecisionWeightedMean1 = org.drip.numerical.linearalgebra.R1MatrixUtil.Product
(aadblScopingWeightedPrecision1, r1mn1.mean());
- double[] adblPrecisionWeightedMean2 = org.drip.numerical.linearalgebra.MatrixUtil.Product
+ double[] adblPrecisionWeightedMean2 = org.drip.numerical.linearalgebra.R1MatrixUtil.Product
(aadblScopingWeightedPrecision2, r1mn2.mean());
if (null == adblPrecisionWeightedMean1 || null == adblPrecisionWeightedMean2) return null;
@@ -180,10 +180,10 @@ public static final org.drip.measure.bayesian.R1MultivariateConvolutionMetrics G
aadblScopingSpacePrecision2[i][j];
}
- double[][] aadblJointCovariance = org.drip.numerical.linearalgebra.MatrixUtil.InvertUsingGaussianElimination
+ double[][] aadblJointCovariance = org.drip.numerical.linearalgebra.R1MatrixUtil.InvertUsingGaussianElimination
(aadblJointPrecision);
- double[] adblJointPosteriorMean = org.drip.numerical.linearalgebra.MatrixUtil.Product (aadblJointCovariance,
+ double[] adblJointPosteriorMean = org.drip.numerical.linearalgebra.R1MatrixUtil.Product (aadblJointCovariance,
adblJointPrecisionWeightedMean);
double[][] aadblUnconditionalCovariance = r1mnUnconditional.covariance().covarianceMatrix();
@@ -276,7 +276,7 @@ public static final double[] ProjectionSpaceScopingMean (
org.drip.measure.bayesian.ProjectionDistributionLoading pdl = spvd.projectionDistributionLoading
(strProjection);
- return null == pdl ? null : org.drip.numerical.linearalgebra.MatrixUtil.Product (pdl.scopingLoading(),
+ return null == pdl ? null : org.drip.numerical.linearalgebra.R1MatrixUtil.Product (pdl.scopingLoading(),
spvd.scopingDistribution().mean());
}
@@ -300,7 +300,7 @@ public static final double[] ProjectionSpaceScopingDifferential (
if (null == pdl) return null;
- double[] adblProjectionSpaceScopingMean = org.drip.numerical.linearalgebra.MatrixUtil.Product
+ double[] adblProjectionSpaceScopingMean = org.drip.numerical.linearalgebra.R1MatrixUtil.Product
(pdl.scopingLoading(), spvd.scopingDistribution().mean());
if (null == adblProjectionSpaceScopingMean) return null;
@@ -347,10 +347,10 @@ public static final org.drip.measure.gaussian.Covariance ProjectionSpaceScopingC
double[][] aadblScopingLoading = pdl.scopingLoading();
try {
- return new org.drip.measure.gaussian.Covariance (org.drip.numerical.linearalgebra.MatrixUtil.Product
- (aadblScopingLoading, org.drip.numerical.linearalgebra.MatrixUtil.Product
+ return new org.drip.measure.gaussian.Covariance (org.drip.numerical.linearalgebra.R1MatrixUtil.Product
+ (aadblScopingLoading, org.drip.numerical.linearalgebra.R1MatrixUtil.Product
(r1mnScoping.covariance().covarianceMatrix(),
- org.drip.numerical.linearalgebra.MatrixUtil.Transpose (aadblScopingLoading))));
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Transpose (aadblScopingLoading))));
} catch (java.lang.Exception e) {
e.printStackTrace();
}
@@ -380,9 +380,9 @@ public static final double[][] ShadowScopingProjectionTranspose (
org.drip.measure.bayesian.ProjectionDistributionLoading pdl = spvd.projectionDistributionLoading
(strProjection);
- return null == pdl ? null : org.drip.numerical.linearalgebra.MatrixUtil.Product
+ return null == pdl ? null : org.drip.numerical.linearalgebra.R1MatrixUtil.Product
(((org.drip.measure.gaussian.R1MultivariateNormal) r1mScoping).covariance().covarianceMatrix(),
- org.drip.numerical.linearalgebra.MatrixUtil.Transpose (pdl.scopingLoading()));
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Transpose (pdl.scopingLoading()));
}
/**
@@ -406,7 +406,7 @@ public static final double[][] ShadowScopingProjection (
(strProjection);
return !(r1mScoping instanceof org.drip.measure.gaussian.R1MultivariateNormal) || null == pdl ? null
- : org.drip.numerical.linearalgebra.MatrixUtil.Product (pdl.scopingLoading(),
+ : org.drip.numerical.linearalgebra.R1MatrixUtil.Product (pdl.scopingLoading(),
((org.drip.measure.gaussian.R1MultivariateNormal)
r1mScoping).covariance().covarianceMatrix());
}
@@ -434,7 +434,7 @@ public static final double[] ProjectionPrecisionMeanProduct (
org.drip.measure.continuous.R1Multivariate r1mProjection = pdl.distribution();
return !(r1mProjection instanceof org.drip.measure.gaussian.R1MultivariateNormal) ? null :
- org.drip.numerical.linearalgebra.MatrixUtil.Product (((org.drip.measure.gaussian.R1MultivariateNormal)
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Product (((org.drip.measure.gaussian.R1MultivariateNormal)
r1mProjection).covariance().precisionMatrix(), r1mProjection.mean());
}
@@ -467,11 +467,11 @@ public static final double[] ProjectionInducedScopingDeviation (
double[][] aadblScopingLoading = pdl.scopingLoading();
- double[][] aadblProjectionScopingShadow = org.drip.numerical.linearalgebra.MatrixUtil.Product
- (r1mnScoping.covariance().covarianceMatrix(), org.drip.numerical.linearalgebra.MatrixUtil.Transpose
+ double[][] aadblProjectionScopingShadow = org.drip.numerical.linearalgebra.R1MatrixUtil.Product
+ (r1mnScoping.covariance().covarianceMatrix(), org.drip.numerical.linearalgebra.R1MatrixUtil.Transpose
(aadblScopingLoading));
- double[] adblProjectionSpaceScopingMean = org.drip.numerical.linearalgebra.MatrixUtil.Product
+ double[] adblProjectionSpaceScopingMean = org.drip.numerical.linearalgebra.R1MatrixUtil.Product
(aadblScopingLoading, r1mScoping.mean());
if (null == adblProjectionSpaceScopingMean) return null;
@@ -485,10 +485,10 @@ public static final double[] ProjectionInducedScopingDeviation (
adblProjectionSpaceScopingDifferential[i] = adblProjectionMean[i] -
adblProjectionSpaceScopingMean[i];
- return org.drip.numerical.linearalgebra.MatrixUtil.Product (aadblProjectionScopingShadow,
- org.drip.numerical.linearalgebra.MatrixUtil.Product
- (org.drip.numerical.linearalgebra.MatrixUtil.InvertUsingGaussianElimination
- (org.drip.numerical.linearalgebra.MatrixUtil.Product (aadblScopingLoading,
+ return org.drip.numerical.linearalgebra.R1MatrixUtil.Product (aadblProjectionScopingShadow,
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Product
+ (org.drip.numerical.linearalgebra.R1MatrixUtil.InvertUsingGaussianElimination
+ (org.drip.numerical.linearalgebra.R1MatrixUtil.Product (aadblScopingLoading,
aadblProjectionScopingShadow)), adblProjectionSpaceScopingDifferential));
}
@@ -525,11 +525,11 @@ public static final double[] ProjectionInducedScopingMean (
double[][] aadblScopingLoading = pdl.scopingLoading();
- double[][] aadblProjectionScopingShadow = org.drip.numerical.linearalgebra.MatrixUtil.Product
- (r1mnScoping.covariance().covarianceMatrix(), org.drip.numerical.linearalgebra.MatrixUtil.Transpose
+ double[][] aadblProjectionScopingShadow = org.drip.numerical.linearalgebra.R1MatrixUtil.Product
+ (r1mnScoping.covariance().covarianceMatrix(), org.drip.numerical.linearalgebra.R1MatrixUtil.Transpose
(aadblScopingLoading));
- double[] adblProjectionSpaceScopingMean = org.drip.numerical.linearalgebra.MatrixUtil.Product
+ double[] adblProjectionSpaceScopingMean = org.drip.numerical.linearalgebra.R1MatrixUtil.Product
(aadblScopingLoading, adblScopingMean);
if (null == adblProjectionSpaceScopingMean) return null;
@@ -544,10 +544,10 @@ public static final double[] ProjectionInducedScopingMean (
adblProjectionSpaceScopingDifferential[i] = adblProjectionMean[i] -
adblProjectionSpaceScopingMean[i];
- double[] adblProjectionInducedScopingDeviation = org.drip.numerical.linearalgebra.MatrixUtil.Product
- (aadblProjectionScopingShadow, org.drip.numerical.linearalgebra.MatrixUtil.Product
- (org.drip.numerical.linearalgebra.MatrixUtil.InvertUsingGaussianElimination
- (org.drip.numerical.linearalgebra.MatrixUtil.Product (aadblScopingLoading,
+ double[] adblProjectionInducedScopingDeviation = org.drip.numerical.linearalgebra.R1MatrixUtil.Product
+ (aadblProjectionScopingShadow, org.drip.numerical.linearalgebra.R1MatrixUtil.Product
+ (org.drip.numerical.linearalgebra.R1MatrixUtil.InvertUsingGaussianElimination
+ (org.drip.numerical.linearalgebra.R1MatrixUtil.Product (aadblScopingLoading,
aadblProjectionScopingShadow)), adblProjectionSpaceScopingDifferential));
if (null == adblProjectionInducedScopingDeviation) return null;
@@ -585,8 +585,8 @@ public static final double[][] AssetSpaceProjectionCovariance (
double[][] aadblScopingLoading = pdl.scopingLoading();
- return org.drip.numerical.linearalgebra.MatrixUtil.Product (org.drip.numerical.linearalgebra.MatrixUtil.Transpose
- (aadblScopingLoading), org.drip.numerical.linearalgebra.MatrixUtil.Product
+ return org.drip.numerical.linearalgebra.R1MatrixUtil.Product (org.drip.numerical.linearalgebra.R1MatrixUtil.Transpose
+ (aadblScopingLoading), org.drip.numerical.linearalgebra.R1MatrixUtil.Product
(((org.drip.measure.gaussian.R1MultivariateNormal)
r1mProjection).covariance().covarianceMatrix(), aadblScopingLoading));
}
@@ -617,9 +617,9 @@ public static final double[][] ProjectionSpaceAssetCovariance (
double[][] aadblScopingLoading = pdl.scopingLoading();
- return org.drip.numerical.linearalgebra.MatrixUtil.Product (aadblScopingLoading,
- org.drip.numerical.linearalgebra.MatrixUtil.Product (((org.drip.measure.gaussian.R1MultivariateNormal)
- r1mScoping).covariance().covarianceMatrix(), org.drip.numerical.linearalgebra.MatrixUtil.Transpose
+ return org.drip.numerical.linearalgebra.R1MatrixUtil.Product (aadblScopingLoading,
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Product (((org.drip.measure.gaussian.R1MultivariateNormal)
+ r1mScoping).covariance().covarianceMatrix(), org.drip.numerical.linearalgebra.R1MatrixUtil.Transpose
(aadblScopingLoading)));
}
@@ -658,11 +658,11 @@ public static final org.drip.measure.gaussian.R1MultivariateNormal ProjectionInd
double[][] aadblScopingLoading = pdl.scopingLoading();
- double[][] aadblProjectionScopingShadow = org.drip.numerical.linearalgebra.MatrixUtil.Product
- (r1mnScoping.covariance().covarianceMatrix(), org.drip.numerical.linearalgebra.MatrixUtil.Transpose
+ double[][] aadblProjectionScopingShadow = org.drip.numerical.linearalgebra.R1MatrixUtil.Product
+ (r1mnScoping.covariance().covarianceMatrix(), org.drip.numerical.linearalgebra.R1MatrixUtil.Transpose
(aadblScopingLoading));
- double[] adblProjectionSpaceScopingMean = org.drip.numerical.linearalgebra.MatrixUtil.Product
+ double[] adblProjectionSpaceScopingMean = org.drip.numerical.linearalgebra.R1MatrixUtil.Product
(aadblScopingLoading, adblScopingMean);
if (null == adblProjectionSpaceScopingMean) return null;
@@ -677,10 +677,10 @@ public static final org.drip.measure.gaussian.R1MultivariateNormal ProjectionInd
adblProjectionSpaceScopingDifferential[i] = adblProjectionMean[i] -
adblProjectionSpaceScopingMean[i];
- double[] adblProjectionInducedScopingDeviation = org.drip.numerical.linearalgebra.MatrixUtil.Product
- (aadblProjectionScopingShadow, org.drip.numerical.linearalgebra.MatrixUtil.Product
- (org.drip.numerical.linearalgebra.MatrixUtil.InvertUsingGaussianElimination
- (org.drip.numerical.linearalgebra.MatrixUtil.Product (aadblScopingLoading,
+ double[] adblProjectionInducedScopingDeviation = org.drip.numerical.linearalgebra.R1MatrixUtil.Product
+ (aadblProjectionScopingShadow, org.drip.numerical.linearalgebra.R1MatrixUtil.Product
+ (org.drip.numerical.linearalgebra.R1MatrixUtil.InvertUsingGaussianElimination
+ (org.drip.numerical.linearalgebra.R1MatrixUtil.Product (aadblScopingLoading,
aadblProjectionScopingShadow)), adblProjectionSpaceScopingDifferential));
if (null == adblProjectionInducedScopingDeviation) return null;
@@ -696,9 +696,9 @@ public static final org.drip.measure.gaussian.R1MultivariateNormal ProjectionInd
try {
return new org.drip.measure.gaussian.R1MultivariateNormal (r1mnUnconditional.meta(),
adblProjectionInducedScopingMean, new org.drip.measure.gaussian.Covariance
- (org.drip.numerical.linearalgebra.MatrixUtil.Product
- (org.drip.numerical.linearalgebra.MatrixUtil.Transpose (aadblScopingLoading),
- org.drip.numerical.linearalgebra.MatrixUtil.Product
+ (org.drip.numerical.linearalgebra.R1MatrixUtil.Product
+ (org.drip.numerical.linearalgebra.R1MatrixUtil.Transpose (aadblScopingLoading),
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Product
(((org.drip.measure.gaussian.R1MultivariateNormal)
r1mProjection).covariance().covarianceMatrix(), aadblScopingLoading))));
} catch (java.lang.Exception e) {
diff --git a/src/main/java/org/drip/measure/crng/RandomMatrixGenerator.java b/src/main/java/org/drip/measure/crng/RandomMatrixGenerator.java
index ae15416970e4..786765a5998f 100644
--- a/src/main/java/org/drip/measure/crng/RandomMatrixGenerator.java
+++ b/src/main/java/org/drip/measure/crng/RandomMatrixGenerator.java
@@ -1,7 +1,7 @@
package org.drip.measure.crng;
-import org.drip.numerical.linearalgebra.TriangularMatrix;
+import org.drip.numerical.matrix.R1Triangular;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -126,7 +126,7 @@ public class RandomMatrixGenerator
* @return Lower Triangular Matrix of Random Elements up to the Maximum Value
*/
- public static final TriangularMatrix LowerTriangular (
+ public static final R1Triangular LowerTriangular (
final int elementCount,
final double maximumElement,
final boolean isEntryInteger)
@@ -139,7 +139,7 @@ public static final TriangularMatrix LowerTriangular (
}
}
- return TriangularMatrix.Standard (r2Array);
+ return R1Triangular.Standard (r2Array);
}
/**
@@ -152,7 +152,7 @@ public static final TriangularMatrix LowerTriangular (
* @return Upper Triangular Matrix of Random Elements up to the Maximum Value
*/
- public static final TriangularMatrix UpperTriangular (
+ public static final R1Triangular UpperTriangular (
final int elementCount,
final double maximumElement,
final boolean isEntryInteger)
@@ -165,7 +165,7 @@ public static final TriangularMatrix UpperTriangular (
}
}
- return TriangularMatrix.Standard (r2Array);
+ return R1Triangular.Standard (r2Array);
}
/**
@@ -178,7 +178,7 @@ public static final TriangularMatrix UpperTriangular (
* @return Diagonal Matrix of Random Elements up to the Maximum Value
*/
- public static final TriangularMatrix Diagonal (
+ public static final R1Triangular Diagonal (
final int elementCount,
final double maximumElement,
final boolean isEntryInteger)
@@ -193,7 +193,7 @@ public static final TriangularMatrix Diagonal (
}
}
- return TriangularMatrix.Standard (r2Array);
+ return R1Triangular.Standard (r2Array);
}
/**
@@ -206,7 +206,7 @@ public static final TriangularMatrix Diagonal (
* @return Lower Unitriangular Matrix of Random Elements up to the Maximum Value
*/
- public static final TriangularMatrix LowerUnitriangular (
+ public static final R1Triangular LowerUnitriangular (
final int elementCount,
final double maximumElement,
final boolean isEntryInteger)
@@ -223,7 +223,7 @@ public static final TriangularMatrix LowerUnitriangular (
r2Array[i][i] = 1.;
}
- return TriangularMatrix.Standard (r2Array);
+ return R1Triangular.Standard (r2Array);
}
/**
@@ -236,7 +236,7 @@ public static final TriangularMatrix LowerUnitriangular (
* @return Upper Unitriangular Matrix of Random Elements up to the Maximum Value
*/
- public static final TriangularMatrix UpperUnitriangular (
+ public static final R1Triangular UpperUnitriangular (
final int elementCount,
final double maximumElement,
final boolean isEntryInteger)
@@ -253,7 +253,7 @@ public static final TriangularMatrix UpperUnitriangular (
r2Array[i][i] = 1.;
}
- return TriangularMatrix.Standard (r2Array);
+ return R1Triangular.Standard (r2Array);
}
/**
@@ -266,7 +266,7 @@ public static final TriangularMatrix UpperUnitriangular (
* @return Strictly Lower Triangular Matrix of Random Elements up to the Maximum Value
*/
- public static final TriangularMatrix StrictlyLowerTriangular (
+ public static final R1Triangular StrictlyLowerTriangular (
final int elementCount,
final double maximumElement,
final boolean isEntryInteger)
@@ -283,7 +283,7 @@ public static final TriangularMatrix StrictlyLowerTriangular (
r2Array[i][i] = 0.;
}
- return TriangularMatrix.Standard (r2Array);
+ return R1Triangular.Standard (r2Array);
}
/**
@@ -296,7 +296,7 @@ public static final TriangularMatrix StrictlyLowerTriangular (
* @return Strictly Upper Triangular Matrix of Random Elements up to the Maximum Value
*/
- public static final TriangularMatrix StrictlyUpperTriangular (
+ public static final R1Triangular StrictlyUpperTriangular (
final int elementCount,
final double maximumElement,
final boolean isEntryInteger)
@@ -313,7 +313,7 @@ public static final TriangularMatrix StrictlyUpperTriangular (
r2Array[i][i] = 0.;
}
- return TriangularMatrix.Standard (r2Array);
+ return R1Triangular.Standard (r2Array);
}
/**
@@ -326,7 +326,7 @@ public static final TriangularMatrix StrictlyUpperTriangular (
* @return Atomic Lower Triangular Matrix of Random Elements up to the Maximum Value
*/
- public static final TriangularMatrix AtomicLowerTriangular (
+ public static final R1Triangular AtomicLowerTriangular (
final int elementCount,
final double maximumElement,
final boolean isEntryInteger)
@@ -357,7 +357,7 @@ public static final TriangularMatrix AtomicLowerTriangular (
}
}
- return TriangularMatrix.Standard (r2Array);
+ return R1Triangular.Standard (r2Array);
}
/**
@@ -370,7 +370,7 @@ public static final TriangularMatrix AtomicLowerTriangular (
* @return Atomic Upper Triangular Matrix of Random Elements up to the Maximum Value
*/
- public static final TriangularMatrix AtomicUpperTriangular (
+ public static final R1Triangular AtomicUpperTriangular (
final int elementCount,
final double maximumElement,
final boolean isEntryInteger)
@@ -401,6 +401,6 @@ public static final TriangularMatrix AtomicUpperTriangular (
}
}
- return TriangularMatrix.Standard (r2Array);
+ return R1Triangular.Standard (r2Array);
}
}
diff --git a/src/main/java/org/drip/measure/crng/RdRandomSequence.java b/src/main/java/org/drip/measure/crng/RdRandomSequence.java
index d5049c374d2b..dd3559908d22 100644
--- a/src/main/java/org/drip/measure/crng/RdRandomSequence.java
+++ b/src/main/java/org/drip/measure/crng/RdRandomSequence.java
@@ -1,7 +1,7 @@
package org.drip.measure.crng;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -211,7 +211,7 @@ public static final double[][] PeriodicTridiagonal (
for (int i = 0; i < tridiagonalMatrix.length; ++i) {
for (int j = 0; j < tridiagonalMatrix.length; ++j) {
if (j <= i - 2 || j >= i + 2) {
- if (!MatrixUtil.TopRight (i, j, elementCount) && !MatrixUtil.BottomLeft (i, j, elementCount)) {
+ if (!R1MatrixUtil.TopRight (i, j, elementCount) && !R1MatrixUtil.BottomLeft (i, j, elementCount)) {
tridiagonalMatrix[i][j] = 0.;
}
}
diff --git a/src/main/java/org/drip/measure/discrete/CorrelatedPathVertexDimension.java b/src/main/java/org/drip/measure/discrete/CorrelatedPathVertexDimension.java
index 3c6a596b7ae3..a88ef7bb138c 100644
--- a/src/main/java/org/drip/measure/discrete/CorrelatedPathVertexDimension.java
+++ b/src/main/java/org/drip/measure/discrete/CorrelatedPathVertexDimension.java
@@ -130,7 +130,7 @@ public CorrelatedPathVertexDimension (
_qr = qr;
_bApplyAntithetic = bApplyAntithetic;
- if (null == (_aadblCholesky = org.drip.numerical.linearalgebra.MatrixUtil.CholeskyBanachiewiczFactorization
+ if (null == (_aadblCholesky = org.drip.numerical.linearalgebra.R1MatrixUtil.CholeskyBanachiewiczFactorization
(_aadblCorrelation = aadblCorrelation)))
throw new java.lang.Exception ("CorrelatedPathVertexDimension Constructor => Invalid Inputs");
}
diff --git a/src/main/java/org/drip/measure/discrete/QuadraticResampler.java b/src/main/java/org/drip/measure/discrete/QuadraticResampler.java
index e4af63f3dd57..f7cf4e9eaab5 100644
--- a/src/main/java/org/drip/measure/discrete/QuadraticResampler.java
+++ b/src/main/java/org/drip/measure/discrete/QuadraticResampler.java
@@ -188,7 +188,7 @@ public double[] transform (
public double[][] transform (
final double[][] aadblSequence)
{
- double[][] aadblFlippedSequence = org.drip.numerical.linearalgebra.MatrixUtil.Transpose (aadblSequence);
+ double[][] aadblFlippedSequence = org.drip.numerical.linearalgebra.R1MatrixUtil.Transpose (aadblSequence);
if (null == aadblFlippedSequence) return null;
@@ -198,6 +198,6 @@ public double[][] transform (
for (int i = 0; i < iDimension; ++i)
aadblFlippedTransformedSequence[i] = transform (aadblFlippedSequence[i]);
- return org.drip.numerical.linearalgebra.MatrixUtil.Transpose (aadblFlippedTransformedSequence);
+ return org.drip.numerical.linearalgebra.R1MatrixUtil.Transpose (aadblFlippedTransformedSequence);
}
}
diff --git a/src/main/java/org/drip/measure/discrete/SequenceGenerator.java b/src/main/java/org/drip/measure/discrete/SequenceGenerator.java
index c54328dddcea..96329d9c7e1d 100644
--- a/src/main/java/org/drip/measure/discrete/SequenceGenerator.java
+++ b/src/main/java/org/drip/measure/discrete/SequenceGenerator.java
@@ -216,7 +216,7 @@ public static final double[][] GaussianJoint (
{
if (0 >= iCount) return null;
- double[][] aadblCholesky = org.drip.numerical.linearalgebra.MatrixUtil.CholeskyBanachiewiczFactorization
+ double[][] aadblCholesky = org.drip.numerical.linearalgebra.R1MatrixUtil.CholeskyBanachiewiczFactorization
(aadblCorrelation);
if (null == aadblCholesky) return null;
@@ -584,9 +584,9 @@ public static final double[] RankReducedChiSquare (
{
try
{
- rankReducedChiSquare[index] = org.drip.numerical.linearalgebra.MatrixUtil.DotProduct (
+ rankReducedChiSquare[index] = org.drip.numerical.linearalgebra.R1MatrixUtil.DotProduct (
gaussianJointArray[index],
- org.drip.numerical.linearalgebra.MatrixUtil.Product (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
precisionMatrix,
gaussianJointArray[index]
)
@@ -666,9 +666,9 @@ public static final double[] PillaiSpecialChiSquare (
try
{
- pillaiSpecialChiSquare[index] = 1. / org.drip.numerical.linearalgebra.MatrixUtil.DotProduct (
+ pillaiSpecialChiSquare[index] = 1. / org.drip.numerical.linearalgebra.R1MatrixUtil.DotProduct (
pillaiVector,
- org.drip.numerical.linearalgebra.MatrixUtil.Product (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
covarianceMatrix,
pillaiVector
)
diff --git a/src/main/java/org/drip/measure/gaussian/Covariance.java b/src/main/java/org/drip/measure/gaussian/Covariance.java
index b6a04644c9fe..4fa60a333ee6 100644
--- a/src/main/java/org/drip/measure/gaussian/Covariance.java
+++ b/src/main/java/org/drip/measure/gaussian/Covariance.java
@@ -123,7 +123,7 @@ public Covariance (
throw new java.lang.Exception ("R1MultivariateNormal Constructor => Invalid Inputs!");
}
- if (null == (_aadblPrecision = org.drip.numerical.linearalgebra.MatrixUtil.InvertUsingGaussianElimination
+ if (null == (_aadblPrecision = org.drip.numerical.linearalgebra.R1MatrixUtil.InvertUsingGaussianElimination
(_aadblCovariance)))
throw new java.lang.Exception ("R1MultivariateNormal Constructor => Invalid Inputs!");
}
diff --git a/src/main/java/org/drip/numerical/complex/C1MatrixUtil.java b/src/main/java/org/drip/numerical/complex/C1MatrixUtil.java
new file mode 100644
index 000000000000..e4d870729bf3
--- /dev/null
+++ b/src/main/java/org/drip/numerical/complex/C1MatrixUtil.java
@@ -0,0 +1,452 @@
+
+package org.drip.numerical.complex;
+
+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.
+ */
+
+/**
+ * C1MatrixUtil implements a C1 Complex Number Manipulation Utilities. The References are:
+ *
+ *
+ *
+ * -
+ * Fuhr, H., and Z. Rzeszotnik (2018): A Note on Factoring Unitary Matrices Linear Algebra and
+ * its Applications 547 32-44
+ *
+ * -
+ * Horn, R. A., and C. R. Johnson (2013): Matrix Analysis Cambridge University Press
+ * Cambridge UK
+ *
+ * -
+ * Li, C. K., and E. Poon (2002): Additive Decomposition of Real Matrices Linear and Multilinear
+ * Algebra 50 (4) 321-326
+ *
+ * -
+ * Marvian, I. (2022): Restrictions on realizable Unitary Operations imposed by Symmetry and
+ * Locality Nature Science 18 (3) 283-289
+ *
+ * -
+ * Wikipedia (2024): Unitary Matrix https://en.wikipedia.org/wiki/Unitary_matrix
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * @author Lakshmi Krishnamurthy
+ */
+
+public class C1MatrixUtil
+{
+
+ /**
+ * Add the 2 Complex Numbers. Unsafe Methods do not validate the Input Arguments, so use caution
+ * in applying these Methods
+ *
+ * @param firstCartesianC1 The First Complex Number
+ * @param secondCartesianC1 The Second Complex Number
+ *
+ * @return The Complex Number instance that is a sum of the two
+ */
+
+ public static final CartesianC1 UnsafeAdd (
+ final CartesianC1 firstCartesianC1,
+ final CartesianC1 secondCartesianC1)
+ {
+ try {
+ return new CartesianC1 (
+ firstCartesianC1.real() + secondCartesianC1.real(),
+ firstCartesianC1.imaginary() + secondCartesianC1.imaginary()
+ );
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ /**
+ * Scale the Complex Number with the factor. Unsafe Methods do not validate the Input Arguments, so
+ * use caution in applying these Methods
+ *
+ * @param cartesianC1 The Complex Number
+ * @param scale The Scaling Factor
+ *
+ * @return The Scaled Complex Number
+ */
+
+ public static final CartesianC1 UnsafeScale (
+ final CartesianC1 cartesianC1,
+ final double scale)
+ {
+ try {
+ return new CartesianC1 (scale * cartesianC1.real(), scale * cartesianC1.imaginary());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ /**
+ * Subtract the Second Complex Number from the First. Unsafe Methods do not validate the Input Arguments,
+ * so use caution in applying these Methods
+ *
+ * @param firstCartesianC1 The First Complex Number
+ * @param secondCartesianC1 The Second Complex Number
+ *
+ * @return The "Difference" Complex Number
+ */
+
+ public static final CartesianC1 UnsafeSubtract (
+ final CartesianC1 firstCartesianC1,
+ final CartesianC1 secondCartesianC1)
+ {
+ try {
+ return new CartesianC1 (
+ firstCartesianC1.real() - secondCartesianC1.real(),
+ firstCartesianC1.imaginary() - secondCartesianC1.imaginary()
+ );
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ /**
+ * Multiply the 2 Complex Numbers. Unsafe Methods do not validate the Input Arguments, so use
+ * caution in applying these Methods
+ *
+ * @param firstCartesianC1 The First Complex Number
+ * @param secondCartesianC1 The Second Complex Number
+ *
+ * @return The Complex Number instance that is a product of the two
+ */
+
+ public static final CartesianC1 UnsafeMultiply (
+ final CartesianC1 firstCartesianC1,
+ final CartesianC1 secondCartesianC1)
+ {
+ double real1 = firstCartesianC1.real();
+
+ double real2 = secondCartesianC1.real();
+
+ double imaginary1 = firstCartesianC1.imaginary();
+
+ double imaginary2 = secondCartesianC1.imaginary();
+
+ try {
+ return new CartesianC1 (
+ real1 * real2 - imaginary1 * imaginary2,
+ real1 * imaginary2 + real2 * imaginary1
+ );
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ /**
+ * Divide the Numerator Complex Number by the Denominator Complex Number. Unsafe Methods do not validate
+ * the Input Arguments, so use caution in applying these Methods
+ *
+ * @param numeratorC1 The Numerator Complex Number
+ * @param denominatorC1 The Denominator Complex Number
+ *
+ * @return The "Divided" Complex Number
+ */
+
+ public static final CartesianC1 UnsafeDivide (
+ final CartesianC1 numeratorC1,
+ final CartesianC1 denominatorC1)
+ {
+ double numeratorReal = numeratorC1.real();
+
+ double denominatorReal = denominatorC1.real();
+
+ double numeratorImaginary = numeratorC1.imaginary();
+
+ double denominatorImaginary = denominatorC1.imaginary();
+
+ if (0. == denominatorReal && 0. == denominatorImaginary) {
+ return null;
+ }
+
+ double inverseDenominatorModulus = 1. / denominatorC1.modulus();
+
+ try {
+ return new CartesianC1 (
+ (numeratorReal * denominatorReal + numeratorImaginary * denominatorImaginary) *
+ inverseDenominatorModulus,
+ (denominatorReal * numeratorImaginary - numeratorReal * denominatorImaginary) *
+ inverseDenominatorModulus
+ );
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ /**
+ * Square the Complex Number. Unsafe Methods do not validate the Input Arguments, so use caution
+ * in applying these Methods
+ *
+ * @param c1 The Complex Number
+ *
+ * @return The Squared Complex Number Instance
+ */
+
+ public static final CartesianC1 UnsafeSquare (
+ final CartesianC1 c1)
+ {
+ double modulus = c1.modulus();
+
+ if (0. == modulus) {
+ try {
+ return new CartesianC1 (0., 0.);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ double argument = 2. * c1.argument();
+
+ try {
+ return new CartesianC1 (modulus * Math.cos (argument), modulus * Math.sin (argument));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ /**
+ * Compute the Square Root of the Complex Number. Unsafe Methods do not validate the Input Arguments, so
+ * use caution in applying these Methods
+ *
+ * @param complexNumber The Complex Number
+ *
+ * @return The Square Root Complex Number Instance
+ */
+
+ public static final CartesianC1 UnsafeSquareRoot (
+ final CartesianC1 complexNumber)
+ {
+ double modulus = java.lang.Math.sqrt (complexNumber.modulus());
+
+ if (0. == modulus) {
+ try {
+ return new CartesianC1 (0., 0.);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ double argument = 0.5 * complexNumber.argument();
+
+ try {
+ return new CartesianC1 (modulus * Math.cos (argument), modulus * Math.sin (argument));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ /**
+ * Add the 2 Complex Numbers
+ *
+ * @param firstCartesianC1 The First Complex Number
+ * @param secondCartesianC1 The Second Complex Number
+ *
+ * @return The Complex Number instance that is a sum of the two
+ */
+
+ public static final CartesianC1 Add (
+ final CartesianC1 firstCartesianC1,
+ final CartesianC1 secondCartesianC1)
+ {
+ return null == firstCartesianC1 || null == secondCartesianC1 ? null :
+ UnsafeAdd (firstCartesianC1, secondCartesianC1);
+ }
+
+ /**
+ * Scale the Complex Number with the factor
+ *
+ * @param cartesianC1 The Complex Number
+ * @param scale The Scaling Factor
+ *
+ * @return The Scaled Complex Number
+ */
+
+ public static final CartesianC1 Scale (
+ final CartesianC1 cartesianC1,
+ final double scale)
+ {
+ return null == cartesianC1 || !NumberUtil.IsValid (scale) ? null :
+ UnsafeScale (cartesianC1, scale);
+ }
+
+ /**
+ * Subtract the Second Complex Number from the First
+ *
+ * @param firstCartesianC1 The First Complex Number
+ * @param secondCartesianC1 The Second Complex Number
+ *
+ * @return The "Difference" Complex Number
+ */
+
+ public static final CartesianC1 Subtract (
+ final CartesianC1 firstCartesianC1,
+ final CartesianC1 secondCartesianC1)
+ {
+ return null == firstCartesianC1 || null == secondCartesianC1 ? null :
+ UnsafeSubtract (firstCartesianC1, secondCartesianC1);
+ }
+
+ /**
+ * Multiply the 2 Complex Numbers
+ *
+ * @param firstCartesianC1 The First Complex Number
+ * @param secondCartesianC1 The Second Complex Number
+ *
+ * @return The Complex Number instance that is a product of the two
+ */
+
+ public static final CartesianC1 Multiply (
+ final CartesianC1 firstCartesianC1,
+ final CartesianC1 secondCartesianC1)
+ {
+ return null == firstCartesianC1 || null == secondCartesianC1 ? null :
+ UnsafeMultiply (firstCartesianC1, secondCartesianC1);
+ }
+
+ /**
+ * Divide the Numerator Complex Number by the Denominator Complex Number
+ *
+ * @param numeratorC1 The Numerator Complex Number
+ * @param denominatorC1 The Denominator Complex Number
+ *
+ * @return The "Divided" Complex Number
+ */
+
+ public static final CartesianC1 Divide (
+ final CartesianC1 numeratorC1,
+ final CartesianC1 denominatorC1)
+ {
+ return null == numeratorC1 || null == denominatorC1 ? null :
+ UnsafeMultiply (numeratorC1, denominatorC1);
+ }
+
+ /**
+ * Square the Complex Number
+ *
+ * @param c1 The Complex Number
+ *
+ * @return The Squared Complex Number Instance
+ */
+
+ public static final CartesianC1 Square (
+ final CartesianC1 c1)
+ {
+ return null == c1 ? null : UnsafeSquare (c1);
+ }
+
+ /**
+ * Compute the Square Root of the Complex Number
+ *
+ * @param complexNumber The Complex Number
+ *
+ * @return The Square Root Complex Number Instance
+ */
+
+ public static final CartesianC1 SquareRoot (
+ final CartesianC1 complexNumber)
+ {
+ return null == complexNumber ? null : UnsafeSquareRoot (complexNumber);
+ }
+}
diff --git a/src/main/java/org/drip/numerical/complex/CartesianC1.java b/src/main/java/org/drip/numerical/complex/CartesianC1.java
new file mode 100644
index 000000000000..55e91f7233e4
--- /dev/null
+++ b/src/main/java/org/drip/numerical/complex/CartesianC1.java
@@ -0,0 +1,385 @@
+
+package org.drip.numerical.complex;
+
+import org.drip.numerical.common.NumberUtil;
+
+/*
+ * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ */
+
+/*!
+ * Copyright (C) 2022 Lakshmi Krishnamurthy
+ * Copyright (C) 2021 Lakshmi Krishnamurthy
+ * Copyright (C) 2020 Lakshmi Krishnamurthy
+ * Copyright (C) 2019 Lakshmi Krishnamurthy
+ * Copyright (C) 2018 Lakshmi Krishnamurthy
+ * Copyright (C) 2017 Lakshmi Krishnamurthy
+ * Copyright (C) 2016 Lakshmi Krishnamurthy
+ * Copyright (C) 2015 Lakshmi Krishnamurthy
+ * Copyright (C) 2014 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.
+ */
+
+/**
+ * CartesianC1 implements the functionality for dealing with the Cartesian Form of Complex Numbers.
+ *
+ *
+ *
+ *
+ *
+ * @author Lakshmi Krishnamurthy
+ */
+
+public class CartesianC1
+{
+ private double _real = Double.NaN;
+ private double _imaginary = Double.NaN;
+
+ /**
+ * Exponentiate the Complex Number
+ *
+ * @param complexNumber The Complex Number
+ *
+ * @return The Exponentiated Complex Number Instance
+ */
+
+ public static final CartesianC1 Exponentiate (
+ final CartesianC1 complexNumber)
+ {
+ if (null == complexNumber)
+ {
+ return null;
+ }
+
+ double argument = complexNumber.imaginary();
+
+ double modulus = java.lang.Math.exp (complexNumber.real());
+
+ try
+ {
+ return new CartesianC1 (
+ modulus * java.lang.Math.cos (argument),
+ modulus * java.lang.Math.sin (argument)
+ );
+ }
+ catch (java.lang.Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ /**
+ * Compute Logarithm of the Complex Number
+ *
+ * @param complexNumber The Complex Number
+ *
+ * @return The Complex Number Logarithm Instance
+ */
+
+ public static final CartesianC1 Logarithm (
+ final CartesianC1 complexNumber)
+ {
+ if (null == complexNumber)
+ {
+ return null;
+ }
+
+ double modulus = complexNumber.modulus();
+
+ if (0. == modulus)
+ {
+ return null;
+ }
+
+ try
+ {
+ return new CartesianC1 (
+ 0.5 * java.lang.Math.log (modulus),
+ complexNumber.argument()
+ );
+ }
+ catch (java.lang.Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ /**
+ * Construct the Complex Number from its Polar Representation
+ *
+ * @param r r
+ * @param theta theta
+ *
+ * @return Complex Number from its Polar Representation
+ */
+
+ public static final CartesianC1 FromPolar (
+ final double r,
+ final double theta)
+ {
+ try
+ {
+ return !org.drip.numerical.common.NumberUtil.IsValid (r) ||
+ !org.drip.numerical.common.NumberUtil.IsValid (theta) ? null :
+ new CartesianC1 (
+ r * java.lang.Math.cos (theta),
+ r * java.lang.Math.sin (theta)
+ );
+ }
+ catch (java.lang.Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ /**
+ * CartesianComplexNumber constructor
+ *
+ * @param real Real Part
+ * @param imaginary Imaginary Part
+ *
+ * @throws Exception Thrown if the Inputs are invalid
+ */
+
+ public CartesianC1 (
+ final double real,
+ final double imaginary)
+ throws Exception
+ {
+ if (!NumberUtil.IsValid (_real = real) || !NumberUtil.IsValid (_imaginary = imaginary)) {
+ throw new Exception ("CartesianC1 Constructor => Invalid Inputs");
+ }
+ }
+
+ /**
+ * Retrieve the Real Part
+ *
+ * @return The Real Part
+ */
+
+ public double real()
+ {
+ return _real;
+ }
+
+ /**
+ * Retrieve the Imaginary Part
+ *
+ * @return The Imaginary Part
+ */
+
+ public double imaginary()
+ {
+ return _imaginary;
+ }
+
+ /**
+ * Retrieve the Modulus
+ *
+ * @return The Modulus
+ */
+
+ public double modulus()
+ {
+ return _real * _real + _imaginary * _imaginary;
+ }
+
+ /**
+ * Retrieve the Absolute Value
+ *
+ * @return The Absolute Value
+ */
+
+ public double abs()
+ {
+ return Math.sqrt (modulus());
+ }
+
+ /**
+ * Retrieve the Argument
+ *
+ * @return The Argument
+ */
+
+ public double argument()
+ {
+ return 0. == _real && 0. == _imaginary ? 0. : Math.atan (_imaginary / _real);
+ }
+
+ /**
+ * Add the Input Cartesian C1 to the current Instance
+ *
+ * @param cartesianC1 Input Cartesian C1
+ *
+ * @return Output Cartesian C1
+ */
+
+ public CartesianC1 add (
+ final CartesianC1 cartesianC1)
+ {
+ return null == cartesianC1 ? this : C1MatrixUtil.UnsafeAdd (this, cartesianC1);
+ }
+
+ /**
+ * Scale the Complex Number with the factor
+ *
+ * @param scale The Scaling Factor
+ *
+ * @return Output Cartesian C1
+ */
+
+ public CartesianC1 scale (
+ final double scale)
+ {
+ return NumberUtil.IsValid (scale) ? null : C1MatrixUtil.UnsafeScale (this, scale);
+ }
+
+ /**
+ * Subtract the Input Cartesian C1 from the current Instance
+ *
+ * @param cartesianC1 Input Cartesian C1
+ *
+ * @return Output Cartesian C1
+ */
+
+ public CartesianC1 subtract (
+ final CartesianC1 cartesianC1)
+ {
+ return null == cartesianC1 ? this : C1MatrixUtil.UnsafeSubtract (this, cartesianC1);
+ }
+
+ /**
+ * Multiply the Input Cartesian C1 with the current Instance
+ *
+ * @param cartesianC1 Input Cartesian C1
+ *
+ * @return Output Cartesian C1
+ */
+
+ public CartesianC1 multiply (
+ final CartesianC1 cartesianC1)
+ {
+ return null == cartesianC1 ? this : C1MatrixUtil.UnsafeMultiply (this, cartesianC1);
+ }
+
+ /**
+ * Divide the Current Instance by the Input Cartesian C1
+ *
+ * @param cartesianC1 Input Cartesian C1
+ *
+ * @return Output Cartesian C1
+ */
+
+ public CartesianC1 divide (
+ final CartesianC1 cartesianC1)
+ {
+ return null == cartesianC1 ? this : C1MatrixUtil.UnsafeDivide (this, cartesianC1);
+ }
+
+ /**
+ * Compute the Square of the Complex Number
+ *
+ * @return The Square Complex Number Instance
+ */
+
+ public CartesianC1 square()
+ {
+ return C1MatrixUtil.UnsafeSquare (this);
+ }
+
+ /**
+ * Compute the Square Root of the Complex Number
+ *
+ * @return The Square Root Complex Number Instance
+ */
+
+ public CartesianC1 squareRoot()
+ {
+ return C1MatrixUtil.UnsafeSquareRoot (this);
+ }
+
+ /**
+ * Display the Real/Imaginary Contents
+ *
+ * @return The Real/Imaginary Contents
+ */
+
+ public String display()
+ {
+ return "\t[" + _real + ", " + _imaginary + "]";
+ }
+}
diff --git a/src/main/java/org/drip/numerical/complex/package-info.java b/src/main/java/org/drip/numerical/complex/package-info.java
new file mode 100644
index 000000000000..0ac5f24e2a69
--- /dev/null
+++ b/src/main/java/org/drip/numerical/complex/package-info.java
@@ -0,0 +1,8 @@
+
+/**
+ * Implementation of Complex Number Suite
+ *
+ * @author Lakshmi Krishnamurthy
+ */
+
+package org.drip.numerical.complex;
diff --git a/src/main/java/org/drip/numerical/eigen/PowerIterationComponentExtractor.java b/src/main/java/org/drip/numerical/eigen/PowerIterationComponentExtractor.java
index 556f5388e1b9..f20fa3c6fb87 100644
--- a/src/main/java/org/drip/numerical/eigen/PowerIterationComponentExtractor.java
+++ b/src/main/java/org/drip/numerical/eigen/PowerIterationComponentExtractor.java
@@ -192,7 +192,7 @@ public boolean isToleranceAbsolute()
eigenVector[componentIndex] = 1.;
}
- eigenVector = org.drip.numerical.linearalgebra.MatrixUtil.Normalize (
+ eigenVector = org.drip.numerical.linearalgebra.R1MatrixUtil.Normalize (
eigenVector
);
@@ -217,12 +217,12 @@ public boolean isToleranceAbsolute()
}
}
- eigenVectorArray = org.drip.numerical.linearalgebra.MatrixUtil.Normalize (
+ eigenVectorArray = org.drip.numerical.linearalgebra.R1MatrixUtil.Normalize (
eigenVectorArray
);
try {
- eigenValue = org.drip.numerical.linearalgebra.MatrixUtil.RayleighQuotient (
+ eigenValue = org.drip.numerical.linearalgebra.R1MatrixUtil.RayleighQuotient (
a,
eigenVectorArray
);
diff --git a/src/main/java/org/drip/numerical/eigen/QREigenComponentExtractor.java b/src/main/java/org/drip/numerical/eigen/QREigenComponentExtractor.java
index 527a09627c57..a141aef49f52 100644
--- a/src/main/java/org/drip/numerical/eigen/QREigenComponentExtractor.java
+++ b/src/main/java/org/drip/numerical/eigen/QREigenComponentExtractor.java
@@ -156,7 +156,7 @@ public int maxIterations()
@Override public org.drip.numerical.eigen.EigenOutput eigenize (
final double[][] a)
{
- org.drip.numerical.linearalgebra.QR qr = org.drip.numerical.linearalgebra.MatrixUtil.QRDecomposition (
+ org.drip.numerical.linearalgebra.QR qr = org.drip.numerical.linearalgebra.R1MatrixUtil.QRDecomposition (
a
);
@@ -167,7 +167,7 @@ public int maxIterations()
double[][] q = qr.q();
- double[][] qTranspose = org.drip.numerical.linearalgebra.MatrixUtil.Transpose (
+ double[][] qTranspose = org.drip.numerical.linearalgebra.R1MatrixUtil.Transpose (
q
);
@@ -201,16 +201,16 @@ public int maxIterations()
}
while (iterationIndex++ < _maxIterations &&
- org.drip.numerical.linearalgebra.TriangularMatrix.NON_TRIANGULAR ==
- org.drip.numerical.linearalgebra.TriangularMatrix.Type (
+ org.drip.numerical.matrix.R1Triangular.NON_TRIANGULAR ==
+ org.drip.numerical.matrix.R1Triangular.Type (
v
)
)
{
- if (null == (qr = org.drip.numerical.linearalgebra.MatrixUtil.QRDecomposition (
- v = org.drip.numerical.linearalgebra.MatrixUtil.Product (
+ if (null == (qr = org.drip.numerical.linearalgebra.R1MatrixUtil.QRDecomposition (
+ v = org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
qTranspose,
- org.drip.numerical.linearalgebra.MatrixUtil.Product (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
v,
q
)
@@ -220,11 +220,11 @@ public int maxIterations()
return null;
}
- qTranspose = org.drip.numerical.linearalgebra.MatrixUtil.Transpose (
+ qTranspose = org.drip.numerical.linearalgebra.R1MatrixUtil.Transpose (
q = qr.q()
);
- b = org.drip.numerical.linearalgebra.MatrixUtil.Product (
+ b = org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
b,
q
);
@@ -245,7 +245,7 @@ public int maxIterations()
try
{
return new org.drip.numerical.eigen.EigenOutput (
- org.drip.numerical.linearalgebra.MatrixUtil.Transpose (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Transpose (
b
),
eigenvalueArray
diff --git a/src/main/java/org/drip/numerical/fourier/PhaseAdjuster.java b/src/main/java/org/drip/numerical/fourier/PhaseAdjuster.java
index eee1c27eb039..5b58cdd14d58 100644
--- a/src/main/java/org/drip/numerical/fourier/PhaseAdjuster.java
+++ b/src/main/java/org/drip/numerical/fourier/PhaseAdjuster.java
@@ -128,9 +128,9 @@ public class PhaseAdjuster {
* @return The Branch Switching Log Adjustment
*/
- public static final org.drip.function.definition.CartesianComplexNumber PowerLogPhaseTracker (
- final org.drip.function.definition.CartesianComplexNumber cnGNumerator,
- final org.drip.function.definition.CartesianComplexNumber cnGDenominator,
+ public static final org.drip.numerical.complex.CartesianC1 PowerLogPhaseTracker (
+ final org.drip.numerical.complex.CartesianC1 cnGNumerator,
+ final org.drip.numerical.complex.CartesianC1 cnGDenominator,
final int iN,
final int iM)
{
@@ -141,7 +141,7 @@ public static final org.drip.function.definition.CartesianComplexNumber PowerLog
if (0. == dblAbsDenominator) return null;
try {
- return new org.drip.function.definition.CartesianComplexNumber (java.lang.Math.log (cnGNumerator.abs() /
+ return new org.drip.numerical.complex.CartesianC1 (java.lang.Math.log (cnGNumerator.abs() /
dblAbsDenominator), cnGNumerator.argument() - cnGDenominator.argument() + 2. *
java.lang.Math.PI * (iN - iM));
} catch (java.lang.Exception e) {
diff --git a/src/main/java/org/drip/numerical/iterativesolver/SuccessiveOverRelaxation.java b/src/main/java/org/drip/numerical/iterativesolver/SuccessiveOverRelaxation.java
index c994e4b86fc3..326ba28fa1fe 100644
--- a/src/main/java/org/drip/numerical/iterativesolver/SuccessiveOverRelaxation.java
+++ b/src/main/java/org/drip/numerical/iterativesolver/SuccessiveOverRelaxation.java
@@ -2,7 +2,7 @@
package org.drip.numerical.iterativesolver;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -198,7 +198,7 @@ public SuccessiveOverRelaxation (
throws Exception
{
if (null == (_iteratorSetting = iteratorSetting) ||
- !MatrixUtil.IsSquare (_squareMatrix = squareMatrix) ||
+ !R1MatrixUtil.IsSquare (_squareMatrix = squareMatrix) ||
null == (_rhsArray = rhsArray))
{
throw new Exception ("SuccessiveOverRelaxation Construction => Invalid Inputs");
@@ -228,7 +228,7 @@ public double[][] squareMatrix()
public double[][] diagonalMatrix()
{
- return MatrixUtil.Diagonal (_squareMatrix);
+ return R1MatrixUtil.Diagonal (_squareMatrix);
}
/**
@@ -239,7 +239,7 @@ public double[][] diagonalMatrix()
public double[][] strictlyLowerTriangularMatrix()
{
- return MatrixUtil.StrictlyLowerTriangular (_squareMatrix);
+ return R1MatrixUtil.StrictlyLowerTriangular (_squareMatrix);
}
/**
@@ -250,7 +250,7 @@ public double[][] strictlyLowerTriangularMatrix()
public double[][] strictlyUpperTriangularMatrix()
{
- return MatrixUtil.StrictlyUpperTriangular (_squareMatrix);
+ return R1MatrixUtil.StrictlyUpperTriangular (_squareMatrix);
}
/**
diff --git a/src/main/java/org/drip/numerical/iterativesolver/SuccessiveOverRelaxationConvergenceAnalyzer.java b/src/main/java/org/drip/numerical/iterativesolver/SuccessiveOverRelaxationConvergenceAnalyzer.java
index eb0750580ba6..7ea8da3d0c28 100644
--- a/src/main/java/org/drip/numerical/iterativesolver/SuccessiveOverRelaxationConvergenceAnalyzer.java
+++ b/src/main/java/org/drip/numerical/iterativesolver/SuccessiveOverRelaxationConvergenceAnalyzer.java
@@ -2,7 +2,7 @@
package org.drip.numerical.iterativesolver;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -170,7 +170,7 @@ public SuccessiveOverRelaxationConvergenceAnalyzer (
final double jacobiIterationMatrixSpectralRadius)
throws Exception
{
- if (!MatrixUtil.IsSquare (_squareMatrix = squareMatrix) ||
+ if (!R1MatrixUtil.IsSquare (_squareMatrix = squareMatrix) ||
!NumberUtil.IsValid (_relaxationParameter = relaxationParameter) ||
!NumberUtil.IsValid (_jacobiIterationMatrixSpectralRadius = jacobiIterationMatrixSpectralRadius))
{
@@ -221,7 +221,7 @@ public double jacobiIterationMatrixSpectralRadius()
public double[][] jacobiIterationMatrix()
{
- return MatrixUtil.JacobiIteration (_squareMatrix);
+ return R1MatrixUtil.JacobiIteration (_squareMatrix);
}
/**
diff --git a/src/main/java/org/drip/numerical/iterativesolver/SymmetricSuccessiveOverRelaxation.java b/src/main/java/org/drip/numerical/iterativesolver/SymmetricSuccessiveOverRelaxation.java
index beb1433e9b6e..df8db0ddd0ad 100644
--- a/src/main/java/org/drip/numerical/iterativesolver/SymmetricSuccessiveOverRelaxation.java
+++ b/src/main/java/org/drip/numerical/iterativesolver/SymmetricSuccessiveOverRelaxation.java
@@ -2,7 +2,7 @@
package org.drip.numerical.iterativesolver;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -142,7 +142,7 @@ public SymmetricSuccessiveOverRelaxation (
{
super (iteratorSetting, squareMatrix, rhsArray);
- if (!MatrixUtil.IsSquareSymmetric (squareMatrix)) {
+ if (!R1MatrixUtil.IsSquareSymmetric (squareMatrix)) {
throw new Exception ("SymmetricSuccessiveOverRelaxation Construction => Invalid Inputs");
}
}
@@ -173,9 +173,9 @@ public double[][] preConditioner()
}
}
- double[][] preConditionerMatrix = MatrixUtil.Product (
+ double[][] preConditionerMatrix = R1MatrixUtil.Product (
dOverOmegaPlusL,
- MatrixUtil.Transpose (dOverOmegaPlusL)
+ R1MatrixUtil.Transpose (dOverOmegaPlusL)
);
double relaxationParameterScaler = relaxationParameter/ (2. - relaxationParameter);
@@ -203,7 +203,7 @@ public double[] preConditioningIteration (
return null;
}
- double[][] preConditionerMatrixInverse = MatrixUtil.Invert (preConditioner(), "GaussianElimination");
+ double[][] preConditionerMatrixInverse = R1MatrixUtil.Invert (preConditioner(), "GaussianElimination");
if (null == preConditionerMatrixInverse) {
return null;
@@ -227,7 +227,7 @@ public double[] preConditioningIteration (
previousUnknownArray[i] = updatedUnknownArray[i];
}
- if (null == (updatedUnknownArray = MatrixUtil.Product (squareMatrix, updatedUnknownArray))) {
+ if (null == (updatedUnknownArray = R1MatrixUtil.Product (squareMatrix, updatedUnknownArray))) {
return null;
}
@@ -236,7 +236,7 @@ public double[] preConditioningIteration (
}
if (null == (
- updatedUnknownArray = MatrixUtil.Product (preConditionerMatrixInverse, updatedUnknownArray)
+ updatedUnknownArray = R1MatrixUtil.Product (preConditionerMatrixInverse, updatedUnknownArray)
))
{
return null;
diff --git a/src/main/java/org/drip/numerical/linearalgebra/GershgorinAnalyzer.java b/src/main/java/org/drip/numerical/linearalgebra/GershgorinAnalyzer.java
index 0c481c2aa4d8..1aaab65da459 100644
--- a/src/main/java/org/drip/numerical/linearalgebra/GershgorinAnalyzer.java
+++ b/src/main/java/org/drip/numerical/linearalgebra/GershgorinAnalyzer.java
@@ -3,6 +3,7 @@
import org.drip.numerical.common.NumberUtil;
import org.drip.numerical.common.R1ClosenessVerifier;
+import org.drip.numerical.matrix.R1Square;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -118,7 +119,7 @@
public class GershgorinAnalyzer
{
- private SquareMatrix _squareMatrix = null;
+ private R1Square _squareMatrix = null;
private GershgorinDisc[] _gershgorinDiscArray = null;
/**
@@ -131,7 +132,7 @@ public class GershgorinAnalyzer
*/
public static final GershgorinAnalyzer FromSquareMatrix (
- final SquareMatrix squareMatrix,
+ final R1Square squareMatrix,
final boolean useRow)
{
try {
@@ -156,7 +157,7 @@ public static final GershgorinAnalyzer FromSquareMatrix (
*/
public GershgorinAnalyzer (
- final SquareMatrix squareMatrix,
+ final R1Square squareMatrix,
final R1ClosenessVerifier r1ClosenessVerifier)
throws Exception
{
@@ -186,7 +187,7 @@ public GershgorinAnalyzer (
* @return Square Matrix
*/
- public SquareMatrix squareMatrix()
+ public R1Square squareMatrix()
{
return _squareMatrix;
}
@@ -227,7 +228,7 @@ public boolean isDiagonallyDominant()
* @return "Gershgorin Strengthened" Square Matrix
*/
- public SquareMatrix Strengthen (
+ public R1Square Strengthen (
final double t)
{
if (!NumberUtil.IsValid (t) || 0. > t || 1. < t) {
@@ -246,7 +247,7 @@ public SquareMatrix Strengthen (
}
}
- return SquareMatrix.Standard (r2ArrayStrengthened);
+ return R1Square.Standard (r2ArrayStrengthened);
}
public static void main (
@@ -261,7 +262,7 @@ public static void main (
};
GershgorinAnalyzer gershgorinRowAnalyzer = GershgorinAnalyzer.FromSquareMatrix (
- SquareMatrix.Standard (r2Array),
+ R1Square.Standard (r2Array),
true
);
@@ -276,7 +277,7 @@ public static void main (
GershgorinAnalyzer gershgorinColumnAnalyzer = GershgorinAnalyzer.FromSquareMatrix (
- SquareMatrix.Standard (r2Array),
+ R1Square.Standard (r2Array),
true
);
diff --git a/src/main/java/org/drip/numerical/linearalgebra/MatrixUtil.java b/src/main/java/org/drip/numerical/linearalgebra/R1MatrixUtil.java
similarity index 96%
rename from src/main/java/org/drip/numerical/linearalgebra/MatrixUtil.java
rename to src/main/java/org/drip/numerical/linearalgebra/R1MatrixUtil.java
index 33a2d31e096f..de34dca45dda 100644
--- a/src/main/java/org/drip/numerical/linearalgebra/MatrixUtil.java
+++ b/src/main/java/org/drip/numerical/linearalgebra/R1MatrixUtil.java
@@ -85,7 +85,8 @@
*/
/**
- * MatrixUtil implements Matrix manipulation routines. It exports the following functionality:
+ * R1MatrixUtil implements R1 Matrix manipulation routines. It exports the following
+ * functionality:
*
* -
* Matrix Inversion using Closed form solutions (for low-dimension matrices), or using Gaussian
@@ -114,7 +115,7 @@
* @author Lakshmi Krishnamurthy
*/
-public class MatrixUtil
+public class R1MatrixUtil
{
/**
@@ -581,14 +582,6 @@ public static final boolean RegularizeUsingRowSwap (
}
}
- /* for (int iDiagonal = 0; iDiagonal < iSize; ++iDiagonal) {
- if (0. == aadblSource[iDiagonal][iDiagonal]) {
- org.drip.quant.common.NumberUtil.Print2DArray ("ZERO DIAG!", aadblSource, false);
-
- return false;
- }
- } */
-
return true;
}
@@ -680,7 +673,7 @@ public static final double[][] InvertUsingGaussianElimination (
final double[][] aadblSource)
{
org.drip.numerical.linearalgebra.MatrixComplementTransform mctRegularized =
- org.drip.numerical.linearalgebra.MatrixUtil.PivotDiagonal (aadblSource);
+ org.drip.numerical.linearalgebra.R1MatrixUtil.PivotDiagonal (aadblSource);
if (null == mctRegularized) return null;
@@ -789,11 +782,11 @@ public static final int Rank (
for (int iScanRow = 0; iScanRow < iNumRow; ++iScanRow) {
if (!org.drip.numerical.common.NumberUtil.IsValid (aadblSource[iScanRow]))
- throw new java.lang.Exception ("MatrixUtil::Rank => Invalid Inputs");
+ throw new java.lang.Exception ("R1MatrixUtil::Rank => Invalid Inputs");
}
double[][] aadblRegularizedSource = iNumRow < iNumCol ?
- org.drip.numerical.linearalgebra.MatrixUtil.Transpose (aadblSource) : aadblSource;
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Transpose (aadblSource) : aadblSource;
int iNumDependentRow = 0;
int iProcessedRow = aadblRegularizedSource.length;
@@ -815,7 +808,7 @@ public static final int Rank (
}
for (int iScanRow = 0; iScanRow < iProcessedCol; ++iScanRow) {
- if (0. == org.drip.numerical.linearalgebra.MatrixUtil.Modulus (aadblRegularizedSource[iScanRow]))
+ if (0. == org.drip.numerical.linearalgebra.R1MatrixUtil.Modulus (aadblRegularizedSource[iScanRow]))
++iNumDependentRow;
}
@@ -897,7 +890,7 @@ public static final double DotProduct (
0 == adblA.length ||
adblA.length != adblE.length)
{
- throw new Exception ("MatrixUtil::DotProduct => Invalid Inputs!");
+ throw new Exception ("R1MatrixUtil::DotProduct => Invalid Inputs!");
}
return UnsafeDotProduct (adblA, adblE);
@@ -991,12 +984,12 @@ public static final double Sum (
throws java.lang.Exception
{
if (null == adbl || !org.drip.numerical.common.NumberUtil.IsValid (adbl))
- throw new java.lang.Exception ("MatrixUtil::Sum => Invalid Inputs");
+ throw new java.lang.Exception ("R1MatrixUtil::Sum => Invalid Inputs");
double dblSum = 0.;
int iSize = adbl.length;
- if (0 == iSize) throw new java.lang.Exception ("MatrixUtil::Sum => Invalid Inputs");
+ if (0 == iSize) throw new java.lang.Exception ("R1MatrixUtil::Sum => Invalid Inputs");
for (int i = 0; i < iSize; ++i)
dblSum += adbl[i];
@@ -1019,7 +1012,7 @@ public static final double Modulus (
throws Exception
{
if (null == v || 0 == v.length || !NumberUtil.IsValid (v)) {
- throw new Exception ("MatrixUtil::Modulus => Invalid Inputs");
+ throw new Exception ("R1MatrixUtil::Modulus => Invalid Inputs");
}
return UnsafeModulus (v);
@@ -1040,11 +1033,11 @@ public static final boolean PositiveOrZero (
throws java.lang.Exception
{
if (null == adbl || !org.drip.numerical.common.NumberUtil.IsValid (adbl))
- throw new java.lang.Exception ("MatrixUtil::PositiveOrZero => Invalid Inputs");
+ throw new java.lang.Exception ("R1MatrixUtil::PositiveOrZero => Invalid Inputs");
int iSize = adbl.length;
- if (0 == iSize) throw new java.lang.Exception ("MatrixUtil::PositiveOrZero => Invalid Inputs");
+ if (0 == iSize) throw new java.lang.Exception ("R1MatrixUtil::PositiveOrZero => Invalid Inputs");
for (int i = 0; i < iSize; ++i) {
if (0. > adbl[i]) return false;
@@ -1068,11 +1061,11 @@ public static final boolean NegativeOrZero (
throws java.lang.Exception
{
if (null == adbl || !org.drip.numerical.common.NumberUtil.IsValid (adbl))
- throw new java.lang.Exception ("MatrixUtil::NegativeOrZero => Invalid Inputs");
+ throw new java.lang.Exception ("R1MatrixUtil::NegativeOrZero => Invalid Inputs");
int iSize = adbl.length;
- if (0 == iSize) throw new java.lang.Exception ("MatrixUtil::NegativeOrZero => Invalid Inputs");
+ if (0 == iSize) throw new java.lang.Exception ("R1MatrixUtil::NegativeOrZero => Invalid Inputs");
for (int i = 0; i < iSize; ++i) {
if (0. < adbl[i]) return false;
@@ -1275,9 +1268,9 @@ public static final double RayleighQuotient (
final double[] eigenvector)
throws java.lang.Exception
{
- return org.drip.numerical.linearalgebra.MatrixUtil.DotProduct (
+ return org.drip.numerical.linearalgebra.R1MatrixUtil.DotProduct (
eigenvector,
- org.drip.numerical.linearalgebra.MatrixUtil.Product (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
matrix,
eigenvector
)
diff --git a/src/main/java/org/drip/numerical/linearalgebra/SylvesterEquation.java b/src/main/java/org/drip/numerical/linearalgebra/SylvesterEquation.java
index f35d52271b76..f61746c309de 100644
--- a/src/main/java/org/drip/numerical/linearalgebra/SylvesterEquation.java
+++ b/src/main/java/org/drip/numerical/linearalgebra/SylvesterEquation.java
@@ -1,6 +1,8 @@
package org.drip.numerical.linearalgebra;
+import org.drip.numerical.matrix.R1Square;
+
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*/
@@ -118,8 +120,8 @@
public class SylvesterEquation
{
- private SquareMatrix _squareMatrixA = null;
- private SquareMatrix _squareMatrixB = null;
+ private R1Square _squareMatrixA = null;
+ private R1Square _squareMatrixB = null;
/**
* SylvesterEquation Constructor
@@ -131,8 +133,8 @@ public class SylvesterEquation
*/
public SylvesterEquation (
- final SquareMatrix squareMatrixA,
- final SquareMatrix squareMatrixB)
+ final R1Square squareMatrixA,
+ final R1Square squareMatrixB)
throws Exception
{
if (null == (_squareMatrixA = squareMatrixA) ||
@@ -148,7 +150,7 @@ public SylvesterEquation (
* @return "A" Square Matrix
*/
- public SquareMatrix squareMatrixA()
+ public R1Square squareMatrixA()
{
return _squareMatrixA;
}
@@ -159,7 +161,7 @@ public SquareMatrix squareMatrixA()
* @return "B" Square Matrix
*/
- public SquareMatrix squareMatrixB()
+ public R1Square squareMatrixB()
{
return _squareMatrixB;
}
diff --git a/src/main/java/org/drip/numerical/linearalgebra/UD.java b/src/main/java/org/drip/numerical/linearalgebra/UD.java
index df7bf7becac4..3a75ddd21843 100644
--- a/src/main/java/org/drip/numerical/linearalgebra/UD.java
+++ b/src/main/java/org/drip/numerical/linearalgebra/UD.java
@@ -123,7 +123,7 @@ public UD (
if (0 == size || null == _U[0] || size != _U[0].length ||
size != _D.length || null == _D[0] || size != _D[0].length ||
- !org.drip.numerical.linearalgebra.MatrixUtil.IsDiagonal (
+ !org.drip.numerical.linearalgebra.R1MatrixUtil.IsDiagonal (
_D
)
)
@@ -164,14 +164,14 @@ public double[][] d()
public double[][] uduTranspose()
{
- double[][] ud = org.drip.numerical.linearalgebra.MatrixUtil.Product (
+ double[][] ud = org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
_U,
_D
);
- return null == ud ? null : org.drip.numerical.linearalgebra.MatrixUtil.Product (
+ return null == ud ? null : org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
ud,
- org.drip.numerical.linearalgebra.MatrixUtil.Transpose (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Transpose (
_U
)
);
diff --git a/src/main/java/org/drip/numerical/linearsolver/BartelsStewartScheme.java b/src/main/java/org/drip/numerical/linearsolver/BartelsStewartScheme.java
index 99052ba5e9c4..57cc4ace762c 100644
--- a/src/main/java/org/drip/numerical/linearsolver/BartelsStewartScheme.java
+++ b/src/main/java/org/drip/numerical/linearsolver/BartelsStewartScheme.java
@@ -3,10 +3,10 @@
import org.drip.measure.crng.RdRandomSequence;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.numerical.linearalgebra.QR;
-import org.drip.numerical.linearalgebra.SquareMatrix;
import org.drip.numerical.linearalgebra.SylvesterEquation;
+import org.drip.numerical.matrix.R1Square;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -189,7 +189,7 @@ public double[][] rhsMatrix()
public void solve()
{
- QR qrA = MatrixUtil.QRDecomposition (_sylvesterEquation.squareMatrixA().r2Array());
+ QR qrA = R1MatrixUtil.QRDecomposition (_sylvesterEquation.squareMatrixA().r2Array());
System.out.println();
@@ -213,7 +213,7 @@ public void solve()
System.out.println();
- QR qrBTranspose = MatrixUtil.QRDecomposition (
+ QR qrBTranspose = R1MatrixUtil.QRDecomposition (
_sylvesterEquation.squareMatrixB().transpose().r2Array()
);
@@ -235,9 +235,9 @@ public void solve()
);
}
- double[][] f = MatrixUtil.Product (MatrixUtil.Transpose (u), _rhsMatrix);
+ double[][] f = R1MatrixUtil.Product (R1MatrixUtil.Transpose (u), _rhsMatrix);
- f = MatrixUtil.Product (f, v);
+ f = R1MatrixUtil.Product (f, v);
System.out.println();
@@ -308,12 +308,12 @@ public static final void main (
true
);
- double[][] matrixC = MatrixUtil.Sum (matrixA, matrixB);
+ double[][] matrixC = R1MatrixUtil.Sum (matrixA, matrixB);
BartelsStewartScheme bartelsStewartScheme = new BartelsStewartScheme (
new SylvesterEquation (
- SquareMatrix.Standard (matrixA),
- SquareMatrix.Standard (matrixB)
+ R1Square.Standard (matrixA),
+ R1Square.Standard (matrixB)
),
matrixC,
true
diff --git a/src/main/java/org/drip/numerical/linearsolver/LinearSystem.java b/src/main/java/org/drip/numerical/linearsolver/LinearSystem.java
index b012ea8e9d99..f5346cbe3126 100644
--- a/src/main/java/org/drip/numerical/linearsolver/LinearSystem.java
+++ b/src/main/java/org/drip/numerical/linearsolver/LinearSystem.java
@@ -245,11 +245,11 @@ public static final org.drip.numerical.linearalgebra.LinearizationOutput SolveUs
if (adblB.length != iSize) return null;
- double[][] aadblInv = org.drip.numerical.linearalgebra.MatrixUtil.InvertUsingGaussianElimination (aadblAIn);
+ double[][] aadblInv = org.drip.numerical.linearalgebra.R1MatrixUtil.InvertUsingGaussianElimination (aadblAIn);
if (null == aadblInv) return null;
- double[] adblProduct = org.drip.numerical.linearalgebra.MatrixUtil.Product (aadblInv, adblB);
+ double[] adblProduct = org.drip.numerical.linearalgebra.R1MatrixUtil.Product (aadblInv, adblB);
if (null == adblProduct || iSize != adblProduct.length) return null;
diff --git a/src/main/java/org/drip/numerical/linearsolver/NonPeriodicTridiagonalScheme.java b/src/main/java/org/drip/numerical/linearsolver/NonPeriodicTridiagonalScheme.java
index 99e6ac688d5b..7e9e46fb2815 100644
--- a/src/main/java/org/drip/numerical/linearsolver/NonPeriodicTridiagonalScheme.java
+++ b/src/main/java/org/drip/numerical/linearsolver/NonPeriodicTridiagonalScheme.java
@@ -2,8 +2,8 @@
package org.drip.numerical.linearsolver;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.MatrixUtil;
-import org.drip.numerical.linearalgebra.NonPeriodicTridiagonalMatrix;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
+import org.drip.numerical.matrix.R1NonPeriodicTridiagonal;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -134,8 +134,8 @@ public static NonPeriodicTridiagonalScheme Standard (
final double[] rhsArray)
{
try {
- return MatrixUtil.IsTridiagonal (r2Array) ? new NonPeriodicTridiagonalScheme (
- NonPeriodicTridiagonalMatrix.Standard (r2Array),
+ return R1MatrixUtil.IsTridiagonal (r2Array) ? new NonPeriodicTridiagonalScheme (
+ R1NonPeriodicTridiagonal.Standard (r2Array),
rhsArray
): null;
} catch (Exception e) {
@@ -146,7 +146,7 @@ public static NonPeriodicTridiagonalScheme Standard (
}
protected NonPeriodicTridiagonalScheme (
- final NonPeriodicTridiagonalMatrix nonPeriodicTridiagonalMatrix,
+ final R1NonPeriodicTridiagonal nonPeriodicTridiagonalMatrix,
final double[] rhsArray)
throws Exception
{
diff --git a/src/main/java/org/drip/numerical/linearsolver/PeriodicTridiagonalScheme.java b/src/main/java/org/drip/numerical/linearsolver/PeriodicTridiagonalScheme.java
index ce1f155ec9ac..c2769d7c98ee 100644
--- a/src/main/java/org/drip/numerical/linearsolver/PeriodicTridiagonalScheme.java
+++ b/src/main/java/org/drip/numerical/linearsolver/PeriodicTridiagonalScheme.java
@@ -1,7 +1,7 @@
package org.drip.numerical.linearsolver;
-import org.drip.numerical.linearalgebra.PeriodicTridiagonalMatrix;
+import org.drip.numerical.matrix.R1PeriodicTridiagonal;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -119,7 +119,7 @@ public abstract class PeriodicTridiagonalScheme extends TridiagonalScheme
{
protected PeriodicTridiagonalScheme (
- final PeriodicTridiagonalMatrix periodicTridiagonalMatrix,
+ final R1PeriodicTridiagonal periodicTridiagonalMatrix,
final double[] rhsArray)
throws Exception
{
diff --git a/src/main/java/org/drip/numerical/linearsolver/RyabenkiiTsynkovScheme.java b/src/main/java/org/drip/numerical/linearsolver/RyabenkiiTsynkovScheme.java
index aaf4169aa276..a743159a40eb 100644
--- a/src/main/java/org/drip/numerical/linearsolver/RyabenkiiTsynkovScheme.java
+++ b/src/main/java/org/drip/numerical/linearsolver/RyabenkiiTsynkovScheme.java
@@ -2,8 +2,8 @@
package org.drip.numerical.linearsolver;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.MatrixUtil;
-import org.drip.numerical.linearalgebra.PeriodicTridiagonalMatrix;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
+import org.drip.numerical.matrix.R1PeriodicTridiagonal;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -135,8 +135,8 @@ public static RyabenkiiTsynkovScheme Standard (
final double[] rhsArray)
{
try {
- return MatrixUtil.IsPeriodicTridiagonal (r2Array) ? new RyabenkiiTsynkovScheme (
- PeriodicTridiagonalMatrix.Standard (r2Array),
+ return R1MatrixUtil.IsPeriodicTridiagonal (r2Array) ? new RyabenkiiTsynkovScheme (
+ R1PeriodicTridiagonal.Standard (r2Array),
rhsArray
) : null;
} catch (Exception e) {
@@ -147,7 +147,7 @@ public static RyabenkiiTsynkovScheme Standard (
}
protected RyabenkiiTsynkovScheme (
- final PeriodicTridiagonalMatrix periodicTridiagonalMatrix,
+ final R1PeriodicTridiagonal periodicTridiagonalMatrix,
final double[] rhsArray)
throws Exception
{
diff --git a/src/main/java/org/drip/numerical/linearsolver/ShermanMorrisonScheme.java b/src/main/java/org/drip/numerical/linearsolver/ShermanMorrisonScheme.java
index 9df4fa878dd8..3818cda063d6 100644
--- a/src/main/java/org/drip/numerical/linearsolver/ShermanMorrisonScheme.java
+++ b/src/main/java/org/drip/numerical/linearsolver/ShermanMorrisonScheme.java
@@ -2,8 +2,8 @@
package org.drip.numerical.linearsolver;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.MatrixUtil;
-import org.drip.numerical.linearalgebra.PeriodicTridiagonalMatrix;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
+import org.drip.numerical.matrix.R1PeriodicTridiagonal;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -143,8 +143,8 @@ public static final ShermanMorrisonScheme Standard (
final double[] rhsArray)
{
try {
- return MatrixUtil.IsPeriodicTridiagonal (r2Array) ? new ShermanMorrisonScheme (
- PeriodicTridiagonalMatrix.Standard (r2Array),
+ return R1MatrixUtil.IsPeriodicTridiagonal (r2Array) ? new ShermanMorrisonScheme (
+ R1PeriodicTridiagonal.Standard (r2Array),
rhsArray,
BATISTA_KARAWIA_DEFAULT_GAMMA
) : null;
@@ -185,8 +185,8 @@ public static final ShermanMorrisonScheme StandardBatistaKarawia (
}
try {
- return MatrixUtil.IsPeriodicTridiagonal (r2Array) ? new ShermanMorrisonScheme (
- PeriodicTridiagonalMatrix.Standard (r2Array),
+ return R1MatrixUtil.IsPeriodicTridiagonal (r2Array) ? new ShermanMorrisonScheme (
+ R1PeriodicTridiagonal.Standard (r2Array),
rhsArray,
gamma
) : null;
@@ -198,7 +198,7 @@ public static final ShermanMorrisonScheme StandardBatistaKarawia (
}
protected ShermanMorrisonScheme (
- final PeriodicTridiagonalMatrix periodicTridiagonalMatrix,
+ final R1PeriodicTridiagonal periodicTridiagonalMatrix,
final double[] rhsArray,
final double gamma)
throws Exception
@@ -371,8 +371,8 @@ public double[] qySolver()
double[] ySolutionArray = rhsNonPeriodicTridiagonalScheme.forwardSweepBackSubstitution();
- double[] solutionArray = MatrixUtil.Product (
- MatrixUtil.CrossProduct (qSolutionArray, vArray),
+ double[] solutionArray = R1MatrixUtil.Product (
+ R1MatrixUtil.CrossProduct (qSolutionArray, vArray),
ySolutionArray
);
@@ -383,7 +383,7 @@ public double[] qySolver()
double vqDotProductScaler = Double.NaN;
try {
- vqDotProductScaler = 1. / (1. + MatrixUtil.DotProduct (vArray, qSolutionArray));
+ vqDotProductScaler = 1. / (1. + R1MatrixUtil.DotProduct (vArray, qSolutionArray));
} catch (Exception e) {
e.printStackTrace();
diff --git a/src/main/java/org/drip/numerical/linearsolver/TriangularScheme.java b/src/main/java/org/drip/numerical/linearsolver/TriangularScheme.java
index e4ed0459c27b..cb1a8519ef48 100644
--- a/src/main/java/org/drip/numerical/linearsolver/TriangularScheme.java
+++ b/src/main/java/org/drip/numerical/linearsolver/TriangularScheme.java
@@ -2,7 +2,7 @@
package org.drip.numerical.linearsolver;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.TriangularMatrix;
+import org.drip.numerical.matrix.R1Triangular;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -117,7 +117,7 @@
public class TriangularScheme
{
private double[] _rhsArray = null;
- private TriangularMatrix _triangularMatrix = null;
+ private R1Triangular _triangularMatrix = null;
private double[] forwardSubstitution()
{
@@ -169,7 +169,7 @@ private double[] backSubstitution()
*/
public TriangularScheme (
- final TriangularMatrix triangularMatrix,
+ final R1Triangular triangularMatrix,
final double[] rhsArray)
throws Exception
{
@@ -187,7 +187,7 @@ public TriangularScheme (
* @return Triangular Matrix
*/
- public TriangularMatrix matrix()
+ public R1Triangular matrix()
{
return _triangularMatrix;
}
@@ -236,7 +236,7 @@ public static final void main (
double[] lowerRHSArray = {1., 8., 32., 90.};
TriangularScheme lowerTriangularScheme = new TriangularScheme (
- TriangularMatrix.Standard (lowerTriangularMatrix),
+ R1Triangular.Standard (lowerTriangularMatrix),
lowerRHSArray
);
@@ -252,7 +252,7 @@ public static final void main (
double[] upperRHSArray = {90., 32., 8., 1.};
TriangularScheme upperTriangularScheme = new TriangularScheme (
- TriangularMatrix.Standard (upperTriangularMatrix),
+ R1Triangular.Standard (upperTriangularMatrix),
upperRHSArray
);
diff --git a/src/main/java/org/drip/numerical/linearsolver/TridiagonalScheme.java b/src/main/java/org/drip/numerical/linearsolver/TridiagonalScheme.java
index 0bd7b96a07a4..76993e0e0bd8 100644
--- a/src/main/java/org/drip/numerical/linearsolver/TridiagonalScheme.java
+++ b/src/main/java/org/drip/numerical/linearsolver/TridiagonalScheme.java
@@ -1,7 +1,7 @@
package org.drip.numerical.linearsolver;
-import org.drip.numerical.linearalgebra.TridiagonalMatrix;
+import org.drip.numerical.matrix.R1Tridiagonal;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -118,10 +118,10 @@
public abstract class TridiagonalScheme
{
private double[] _rhsArray = null;
- private TridiagonalMatrix _tridiagonalMatrix = null;
+ private R1Tridiagonal _tridiagonalMatrix = null;
protected TridiagonalScheme (
- final TridiagonalMatrix tridiagonalMatrix,
+ final R1Tridiagonal tridiagonalMatrix,
final double[] rhsArray)
throws Exception
{
@@ -139,7 +139,7 @@ protected TridiagonalScheme (
* @return Tridiagonal Matrix
*/
- public TridiagonalMatrix matrix()
+ public R1Tridiagonal matrix()
{
return _tridiagonalMatrix;
}
diff --git a/src/main/java/org/drip/numerical/linearalgebra/NonPeriodicTridiagonalMatrix.java b/src/main/java/org/drip/numerical/matrix/R1NonPeriodicTridiagonal.java
similarity index 89%
rename from src/main/java/org/drip/numerical/linearalgebra/NonPeriodicTridiagonalMatrix.java
rename to src/main/java/org/drip/numerical/matrix/R1NonPeriodicTridiagonal.java
index f60233b12b0a..912aa374d7b9 100644
--- a/src/main/java/org/drip/numerical/linearalgebra/NonPeriodicTridiagonalMatrix.java
+++ b/src/main/java/org/drip/numerical/matrix/R1NonPeriodicTridiagonal.java
@@ -1,5 +1,7 @@
-package org.drip.numerical.linearalgebra;
+package org.drip.numerical.matrix;
+
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -74,8 +76,8 @@
*/
/**
- * NonPeriodicTridiagonalMatrix implements a banded Non-periodic Tridiagonal Matrix. The References
- * are:
+ * R1NonPeriodicTridiagonal implements a banded R1 Non-periodic Tridiagonal Matrix. The
+ * References are:
*
*
*
*
*
* @author Lakshmi Krishnamurthy
*/
-public class NonPeriodicTridiagonalMatrix extends TridiagonalMatrix
+public class R1NonPeriodicTridiagonal extends R1Tridiagonal
{
/**
@@ -124,13 +126,13 @@ public class NonPeriodicTridiagonalMatrix extends TridiagonalMatrix
* @return Instance of Non-periodic Tridiagonal Matrix
*/
- public static NonPeriodicTridiagonalMatrix Standard (
+ public static R1NonPeriodicTridiagonal Standard (
final double[][] r2Array)
{
- return MatrixUtil.IsTridiagonal (r2Array) ? new NonPeriodicTridiagonalMatrix (r2Array) : null;
+ return R1MatrixUtil.IsTridiagonal (r2Array) ? new R1NonPeriodicTridiagonal (r2Array) : null;
}
- protected NonPeriodicTridiagonalMatrix (
+ protected R1NonPeriodicTridiagonal (
final double[][] r2Array)
{
super (r2Array);
diff --git a/src/main/java/org/drip/numerical/linearalgebra/PeriodicTridiagonalMatrix.java b/src/main/java/org/drip/numerical/matrix/R1PeriodicTridiagonal.java
similarity index 89%
rename from src/main/java/org/drip/numerical/linearalgebra/PeriodicTridiagonalMatrix.java
rename to src/main/java/org/drip/numerical/matrix/R1PeriodicTridiagonal.java
index 93e6953184e2..ec1f1a347cec 100644
--- a/src/main/java/org/drip/numerical/linearalgebra/PeriodicTridiagonalMatrix.java
+++ b/src/main/java/org/drip/numerical/matrix/R1PeriodicTridiagonal.java
@@ -1,5 +1,7 @@
-package org.drip.numerical.linearalgebra;
+package org.drip.numerical.matrix;
+
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -74,7 +76,8 @@
*/
/**
- * PeriodicTridiagonalMatrix implements a banded Periodic Tridiagonal Matrix. The References are:
+ * R1PeriodicTridiagonal implements a banded R1 Periodic Tridiagonal Matrix. The References
+ * are:
*
*
*
*
*
* @author Lakshmi Krishnamurthy
*/
-public class PeriodicTridiagonalMatrix extends TridiagonalMatrix
+public class R1PeriodicTridiagonal extends R1Tridiagonal
{
/**
@@ -123,13 +126,13 @@ public class PeriodicTridiagonalMatrix extends TridiagonalMatrix
* @return Instance of Non-periodic Tridiagonal Matrix
*/
- public static final PeriodicTridiagonalMatrix Standard (
+ public static final R1PeriodicTridiagonal Standard (
final double[][] r2Array)
{
- return MatrixUtil.IsPeriodicTridiagonal (r2Array) ? new PeriodicTridiagonalMatrix (r2Array) : null;
+ return R1MatrixUtil.IsPeriodicTridiagonal (r2Array) ? new R1PeriodicTridiagonal (r2Array) : null;
}
- protected PeriodicTridiagonalMatrix (
+ protected R1PeriodicTridiagonal (
final double[][] r2Array)
{
super (r2Array);
diff --git a/src/main/java/org/drip/numerical/linearalgebra/SquareMatrix.java b/src/main/java/org/drip/numerical/matrix/R1Square.java
similarity index 89%
rename from src/main/java/org/drip/numerical/linearalgebra/SquareMatrix.java
rename to src/main/java/org/drip/numerical/matrix/R1Square.java
index 3b5eebf26708..334b036b3041 100644
--- a/src/main/java/org/drip/numerical/linearalgebra/SquareMatrix.java
+++ b/src/main/java/org/drip/numerical/matrix/R1Square.java
@@ -1,5 +1,5 @@
-package org.drip.numerical.linearalgebra;
+package org.drip.numerical.matrix;
import java.util.Map;
@@ -7,6 +7,8 @@
import org.drip.numerical.common.NumberUtil;
import org.drip.numerical.eigen.EigenOutput;
import org.drip.numerical.eigen.QREigenComponentExtractor;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
+import org.drip.numerical.linearalgebra.QR;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -81,8 +83,8 @@
*/
/**
- * SquareMatrix implements the type and Functionality associated with a Square Matrix. The References
- * are:
+ * R1Square implements the type and Functionality associated with a R1Square Matrix. The
+ * References are:
*
*
*
*
*
* @author Lakshmi Krishnamurthy
*/
-public class SquareMatrix
+public class R1Square
{
private double[][] _r2Array = null;
/**
- * Construct a Standard Instance of SquareMatrix
+ * Construct a Standard Instance of R1Square
*
* @param r2Array R2 Array
*
- * @return Standard Instance of SquareMatrix
+ * @return Standard Instance of R1Square
*/
- public static SquareMatrix Standard (
+ public static R1Square Standard (
final double[][] r2Array)
{
- if (!MatrixUtil.IsSquare (r2Array)) {
+ if (!R1MatrixUtil.IsSquare (r2Array)) {
return null;
}
@@ -143,10 +145,10 @@ public static SquareMatrix Standard (
}
}
- return new SquareMatrix (r2Array);
+ return new R1Square (r2Array);
}
- protected SquareMatrix (
+ protected R1Square (
final double[][] r2Array)
{
_r2Array = r2Array;
@@ -180,9 +182,9 @@ public int size()
* @return The Transposed Square Matrix
*/
- public SquareMatrix transpose()
+ public R1Square transpose()
{
- return new SquareMatrix (MatrixUtil.UnsafeTranspose (_r2Array));
+ return new R1Square (R1MatrixUtil.UnsafeTranspose (_r2Array));
}
/**
@@ -193,8 +195,8 @@ public SquareMatrix transpose()
* @return Resulting Product
*/
- public SquareMatrix product (
- final SquareMatrix squareMatrixOther)
+ public R1Square product (
+ final R1Square squareMatrixOther)
{
if (null == squareMatrixOther || _r2Array.length != squareMatrixOther.size()) {
return null;
@@ -215,7 +217,7 @@ public SquareMatrix product (
}
}
- return new SquareMatrix (r2ArrayProduct);
+ return new R1Square (r2ArrayProduct);
}
/**
@@ -226,7 +228,7 @@ public SquareMatrix product (
public boolean isNormal()
{
- SquareMatrix squareMatrixTranspose = transpose();
+ R1Square squareMatrixTranspose = transpose();
double[][] r2ArrayTransposeTimesR2Array = product (squareMatrixTranspose).r2Array();
@@ -266,7 +268,7 @@ public boolean isTriangularizable()
public QR qrDecomposition()
{
- return MatrixUtil.QRDecomposition (_r2Array);
+ return R1MatrixUtil.QRDecomposition (_r2Array);
}
/**
@@ -277,7 +279,7 @@ public QR qrDecomposition()
public QR rqDecomposition()
{
- return MatrixUtil.RQDecomposition (_r2Array);
+ return R1MatrixUtil.RQDecomposition (_r2Array);
}
/**
@@ -346,7 +348,7 @@ public double determinant()
EigenOutput eigenOutput = QREigenComponentExtractor.Standard().eigenize (_r2Array);
if (null == eigenOutput) {
- throw new Exception ("SquareMatrix::determinant => Cannot eigenize");
+ throw new Exception ("R1Square::determinant => Cannot eigenize");
}
return eigenOutput.determinant();
@@ -366,7 +368,7 @@ public double conditionNumberL2()
EigenOutput eigenOutput = svd();
if (null == eigenOutput) {
- throw new Exception ("SquareMatrix::conditionNumberL2 => Cannot compute SVD");
+ throw new Exception ("R1Square::conditionNumberL2 => Cannot compute SVD");
}
return eigenOutput.conditionNumber();
diff --git a/src/main/java/org/drip/numerical/linearalgebra/TriangularMatrix.java b/src/main/java/org/drip/numerical/matrix/R1Triangular.java
similarity index 95%
rename from src/main/java/org/drip/numerical/linearalgebra/TriangularMatrix.java
rename to src/main/java/org/drip/numerical/matrix/R1Triangular.java
index e20d298c1ed5..6bb15052baa7 100644
--- a/src/main/java/org/drip/numerical/linearalgebra/TriangularMatrix.java
+++ b/src/main/java/org/drip/numerical/matrix/R1Triangular.java
@@ -1,5 +1,5 @@
-package org.drip.numerical.linearalgebra;
+package org.drip.numerical.matrix;
import java.util.HashMap;
import java.util.Map;
@@ -80,8 +80,8 @@
*/
/**
- * TriangularMatrix implements the type and Functionality associated with a Triangular Matrix. The
- * References are:
+ * R1Triangular implements the type and Functionality associated with an R1 Triangular
+ * Matrix. The References are:
*
*
*
*
*
* @author Lakshmi Krishnamurthy
*/
-public class TriangularMatrix extends SquareMatrix
+public class R1Triangular extends R1Square
{
/**
@@ -219,24 +219,22 @@ private boolean zeroDiagonalEntries()
}
/**
- * TriangularMatrix Constructor
+ * R1Triangular Constructor
*
* @param r2Array R2 Array
*
* @throws Exception Thrown if the Inputs are Invalid
*/
- public static TriangularMatrix Standard (
+ public static R1Triangular Standard (
final double[][] r2Array)
{
int type = Type (r2Array);
- if (NON_TRIANGULAR == type) System.out.println ("Type is " + type);
-
- return NON_TRIANGULAR == type ? null : new TriangularMatrix (r2Array, type);
+ return NON_TRIANGULAR == type ? null : new R1Triangular (r2Array, type);
}
- protected TriangularMatrix (
+ protected R1Triangular (
final double[][] r2Array,
final int type)
{
diff --git a/src/main/java/org/drip/numerical/linearalgebra/TridiagonalMatrix.java b/src/main/java/org/drip/numerical/matrix/R1Tridiagonal.java
similarity index 92%
rename from src/main/java/org/drip/numerical/linearalgebra/TridiagonalMatrix.java
rename to src/main/java/org/drip/numerical/matrix/R1Tridiagonal.java
index 3ce41cf034b1..e34af20ce8fc 100644
--- a/src/main/java/org/drip/numerical/linearalgebra/TridiagonalMatrix.java
+++ b/src/main/java/org/drip/numerical/matrix/R1Tridiagonal.java
@@ -1,5 +1,5 @@
-package org.drip.numerical.linearalgebra;
+package org.drip.numerical.matrix;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -74,8 +74,8 @@
*/
/**
- * TridiagonalMatrix abstracts the Tridiagonal Matrix based on Periodic/non-Periodic setup. The
- * References are:
+ * R1Tridiagonal abstracts the R1 Tridiagonal Matrix based on Periodic/non-Periodic setup.
+ * The References are:
*
*
*
*
*
* @author Lakshmi Krishnamurthy
*/
-public abstract class TridiagonalMatrix extends SquareMatrix
+public abstract class R1Tridiagonal extends R1Square
{
- protected TridiagonalMatrix (
+ protected R1Tridiagonal (
final double[][] r2Array)
{
super (r2Array);
diff --git a/src/main/java/org/drip/numerical/matrix/package-info.java b/src/main/java/org/drip/numerical/matrix/package-info.java
new file mode 100644
index 000000000000..d9234a8f10d9
--- /dev/null
+++ b/src/main/java/org/drip/numerical/matrix/package-info.java
@@ -0,0 +1,8 @@
+
+/**
+ * Implementation of R1 C1 Matrices
+ *
+ * @author Lakshmi Krishnamurthy
+ */
+
+package org.drip.numerical.matrix;
diff --git a/src/main/java/org/drip/optimization/constrained/OptimizationFramework.java b/src/main/java/org/drip/optimization/constrained/OptimizationFramework.java
index 1e72d5bb528d..a5848071029a 100644
--- a/src/main/java/org/drip/optimization/constrained/OptimizationFramework.java
+++ b/src/main/java/org/drip/optimization/constrained/OptimizationFramework.java
@@ -457,8 +457,8 @@ public boolean isSOSC (
}
}
- double dblSOSC = org.drip.numerical.linearalgebra.MatrixUtil.DotProduct (adblVariate,
- org.drip.numerical.linearalgebra.MatrixUtil.Product (aadblSOSCHessian, adblVariate));
+ double dblSOSC = org.drip.numerical.linearalgebra.R1MatrixUtil.DotProduct (adblVariate,
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Product (aadblSOSCHessian, adblVariate));
return (bCheckForMinima && dblSOSC > 0.) || (!bCheckForMinima && dblSOSC < 0.);
}
@@ -585,7 +585,7 @@ public int activeConstraintRank (
for (int i = 0; i < iNumJacobian; ++i)
aadblJacobian[i] = lsJacobian.get (i);
- return org.drip.numerical.linearalgebra.MatrixUtil.Rank (aadblJacobian);
+ return org.drip.numerical.linearalgebra.R1MatrixUtil.Rank (aadblJacobian);
}
/**
@@ -649,7 +649,7 @@ public boolean activeConstraintLinearDependence (
for (int i = 0; i < iNumConstraint; ++i) {
if (null != aadblJacobian[i]) {
for (int j = i + 1; j < iNumConstraint; ++j) {
- if (null != aadblJacobian[j] && 0. != org.drip.numerical.linearalgebra.MatrixUtil.DotProduct
+ if (null != aadblJacobian[j] && 0. != org.drip.numerical.linearalgebra.R1MatrixUtil.DotProduct
(aadblJacobian[i], aadblJacobian[j]))
return false;
}
@@ -659,7 +659,7 @@ public boolean activeConstraintLinearDependence (
if (bPositiveLinearDependenceCheck) {
for (int i = 0; i < iNumConstraint; ++i) {
if (null != aadblJacobian[i] &&
- !org.drip.numerical.linearalgebra.MatrixUtil.PositiveLinearlyIndependent (aadblJacobian[i]))
+ !org.drip.numerical.linearalgebra.R1MatrixUtil.PositiveLinearlyIndependent (aadblJacobian[i]))
return false;
}
}
@@ -678,8 +678,8 @@ public boolean activeConstraintLinearDependence (
public double[][] alongAwayVariate (
final double[] adblVariate)
{
- double[] adblVariateIncrement = org.drip.numerical.linearalgebra.MatrixUtil.Product
- (org.drip.numerical.linearalgebra.MatrixUtil.InvertUsingGaussianElimination (_rdToR1Objective.hessian
+ double[] adblVariateIncrement = org.drip.numerical.linearalgebra.R1MatrixUtil.Product
+ (org.drip.numerical.linearalgebra.R1MatrixUtil.InvertUsingGaussianElimination (_rdToR1Objective.hessian
(adblVariate)), _rdToR1Objective.jacobian (adblVariate));
if (null == adblVariateIncrement) return null;
diff --git a/src/main/java/org/drip/portfolioconstruction/allocator/ForwardReverseHoldingsAllocation.java b/src/main/java/org/drip/portfolioconstruction/allocator/ForwardReverseHoldingsAllocation.java
index a8df4cb12633..8e2b3e7f6036 100644
--- a/src/main/java/org/drip/portfolioconstruction/allocator/ForwardReverseHoldingsAllocation.java
+++ b/src/main/java/org/drip/portfolioconstruction/allocator/ForwardReverseHoldingsAllocation.java
@@ -125,7 +125,7 @@ public static final ForwardReverseHoldingsAllocation Reverse (
int assetCount = assetWeightArray.length;
- double[] expectedAssetExcessReturnsArray = org.drip.numerical.linearalgebra.MatrixUtil.Product (
+ double[] expectedAssetExcessReturnsArray = org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
assetExcessReturnsCovarianceMatrix,
assetWeightArray
);
@@ -173,8 +173,8 @@ public static final ForwardReverseHoldingsAllocation Forward (
int assetCount = assetIDArray.length;
- double[] assetWeightArray = org.drip.numerical.linearalgebra.MatrixUtil.Product (
- org.drip.numerical.linearalgebra.MatrixUtil.InvertUsingGaussianElimination (
+ double[] assetWeightArray = org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.InvertUsingGaussianElimination (
assetExcessReturnsCovarianceMatrix
),
expectedAssetExcessReturnsArray
@@ -234,7 +234,7 @@ public static final ForwardReverseHoldingsAllocation Standard (
return null;
}
- double[] impliedBetaArray = org.drip.numerical.linearalgebra.MatrixUtil.Product (
+ double[] impliedBetaArray = org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
assetExcessReturnsCovarianceMatrix,
assetWeightArray
);
@@ -374,7 +374,7 @@ public org.drip.portfolioconstruction.asset.PortfolioBenchmarkMetrics benchmarkM
try
{
- double beta = org.drip.numerical.linearalgebra.MatrixUtil.DotProduct (
+ double beta = org.drip.numerical.linearalgebra.R1MatrixUtil.DotProduct (
optimalPortfolio().weightArray(),
benchmarkPortfolioMetrics.impliedBeta()
);
diff --git a/src/main/java/org/drip/portfolioconstruction/allocator/HoldingsAllocation.java b/src/main/java/org/drip/portfolioconstruction/allocator/HoldingsAllocation.java
index e256729e60a7..dd5b5a44500f 100644
--- a/src/main/java/org/drip/portfolioconstruction/allocator/HoldingsAllocation.java
+++ b/src/main/java/org/drip/portfolioconstruction/allocator/HoldingsAllocation.java
@@ -137,7 +137,7 @@ public static final HoldingsAllocation Create (
double portfolioExcessReturnsSigma = java.lang.Math.sqrt (portfolioExcessReturnsVariance);
- double[] impliedBetaArray = org.drip.numerical.linearalgebra.MatrixUtil.Product (
+ double[] impliedBetaArray = org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
assetUniverseStatisticalProperties.covariance (optimalPortfolio.assetIDArray()),
optimalPortfolio.weightArray()
);
diff --git a/src/main/java/org/drip/portfolioconstruction/bayesian/BlackLittermanCombinationEngine.java b/src/main/java/org/drip/portfolioconstruction/bayesian/BlackLittermanCombinationEngine.java
index d4f0ae4f88dc..e1f03817a1cd 100644
--- a/src/main/java/org/drip/portfolioconstruction/bayesian/BlackLittermanCombinationEngine.java
+++ b/src/main/java/org/drip/portfolioconstruction/bayesian/BlackLittermanCombinationEngine.java
@@ -606,12 +606,12 @@ public org.drip.portfolioconstruction.bayesian.ProjectionExposure projectionExpo
intraViewComponentArray[viewIndex] = intraViewComponentArray[viewIndex] * tau / riskAversion;
}
- double[][] projectionSpaceAssetLoadingsMatrix = org.drip.numerical.linearalgebra.MatrixUtil.Product (
- org.drip.numerical.linearalgebra.MatrixUtil.Product (
+ double[][] projectionSpaceAssetLoadingsMatrix = org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
assetSpaceLoadingMatrix,
assetExcessReturnsCovarianceMatrix
),
- org.drip.numerical.linearalgebra.MatrixUtil.Transpose (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Transpose (
assetSpaceLoadingMatrix
)
);
@@ -634,9 +634,9 @@ public org.drip.portfolioconstruction.bayesian.ProjectionExposure projectionExpo
}
}
- double[][] compositePrecisionProjectionScoping = org.drip.numerical.linearalgebra.MatrixUtil.Product (
- org.drip.numerical.linearalgebra.MatrixUtil.Product (
- org.drip.numerical.linearalgebra.MatrixUtil.InvertUsingGaussianElimination (
+ double[][] compositePrecisionProjectionScoping = org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.InvertUsingGaussianElimination (
compositeConfidenceCovarianceMatrix
),
assetSpaceLoadingMatrix
@@ -662,14 +662,14 @@ public org.drip.portfolioconstruction.bayesian.ProjectionExposure projectionExpo
{
return new org.drip.portfolioconstruction.bayesian.ProjectionExposure (
intraViewComponentArray,
- org.drip.numerical.linearalgebra.MatrixUtil.Product (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
compositePrecisionProjectionScoping,
_forwardReverseOptimizationOutputUnadjusted.optimalPortfolio().weightArray()
),
- org.drip.numerical.linearalgebra.MatrixUtil.Product (
- org.drip.numerical.linearalgebra.MatrixUtil.Product (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Product (
compositePrecisionProjectionScoping,
- org.drip.numerical.linearalgebra.MatrixUtil.Transpose (
+ org.drip.numerical.linearalgebra.R1MatrixUtil.Transpose (
assetSpaceLoadingMatrix
)
),
diff --git a/src/main/java/org/drip/pricer/option/HestonStochasticVolatilityAlgorithm.java b/src/main/java/org/drip/pricer/option/HestonStochasticVolatilityAlgorithm.java
index 1777468b5656..17b8a3696083 100644
--- a/src/main/java/org/drip/pricer/option/HestonStochasticVolatilityAlgorithm.java
+++ b/src/main/java/org/drip/pricer/option/HestonStochasticVolatilityAlgorithm.java
@@ -1,6 +1,10 @@
package org.drip.pricer.option;
+import org.drip.numerical.complex.C1MatrixUtil;
+import org.drip.numerical.complex.CartesianC1;
+import org.drip.numerical.fourier.PhaseAdjuster;
+
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*/
@@ -119,11 +123,11 @@ public class HestonStochasticVolatilityAlgorithm extends org.drip.pricer.option.
class PhaseCorrectedF {
double _dblCorrectedPhase = java.lang.Double.NaN;
- org.drip.function.definition.CartesianComplexNumber _cnF = null;
+ org.drip.numerical.complex.CartesianC1 _cnF = null;
PhaseCorrectedF (
final double dblCorrectedPhase,
- final org.drip.function.definition.CartesianComplexNumber cnF)
+ final org.drip.numerical.complex.CartesianC1 cnF)
{
_cnF = cnF;
_dblCorrectedPhase = dblCorrectedPhase;
@@ -143,131 +147,126 @@ private PhaseCorrectedF fourierTransformHeston93 (
final org.drip.numerical.fourier.RotationCountPhaseTracker rcpt)
{
try {
- org.drip.function.definition.CartesianComplexNumber cnSmallDLHS = new org.drip.function.definition.CartesianComplexNumber (dblB,
+ org.drip.numerical.complex.CartesianC1 cnSmallDLHS = new org.drip.numerical.complex.CartesianC1 (dblB,
-1. * _fphp.rho() * _fphp.sigma() * dblFreq);
- org.drip.function.definition.CartesianComplexNumber cnSmallD = org.drip.function.definition.CartesianComplexNumber.Square
- (cnSmallDLHS);
+ CartesianC1 d = org.drip.numerical.complex.C1MatrixUtil.Square (cnSmallDLHS);
- if (null == cnSmallD) return null;
+ if (null == d) return null;
double dblSigmaScaler = _fphp.sigma() * _fphp.sigma();
- if (null == (cnSmallD = org.drip.function.definition.CartesianComplexNumber.Add (cnSmallD, new
- org.drip.function.definition.CartesianComplexNumber (dblSigmaScaler * dblFreq * dblFreq, -2. * dblSigmaScaler
+ if (null == (d = org.drip.numerical.complex.C1MatrixUtil.Add (d, new
+ org.drip.numerical.complex.CartesianC1 (dblSigmaScaler * dblFreq * dblFreq, -2. * dblSigmaScaler
* dblFreq * dblU))))
return null;
- if (null == (cnSmallD = org.drip.function.definition.CartesianComplexNumber.SquareRoot (cnSmallD))) return null;
+ if (null == (d = org.drip.numerical.complex.C1MatrixUtil.SquareRoot (d))) return null;
- org.drip.function.definition.CartesianComplexNumber cnGNumerator = org.drip.function.definition.CartesianComplexNumber.Subtract
- (cnSmallDLHS, cnSmallD);
+ org.drip.numerical.complex.CartesianC1 cnGNumerator = org.drip.numerical.complex.C1MatrixUtil.Subtract
+ (cnSmallDLHS, d);
if (null == cnGNumerator) return null;
- org.drip.function.definition.CartesianComplexNumber cnG = org.drip.function.definition.CartesianComplexNumber.Add (cnSmallDLHS,
- cnSmallD);
+ CartesianC1 g = C1MatrixUtil.Add (cnSmallDLHS, d);
- if (null == cnG) return null;
+ if (null == g) return null;
- if (null == (cnG = org.drip.function.definition.CartesianComplexNumber.Divide (cnGNumerator, cnG))) return null;
+ if (null == (g = org.drip.numerical.complex.C1MatrixUtil.Divide (cnGNumerator, g))) return null;
int iM = 0;
int iN = 0;
if (org.drip.numerical.fourier.PhaseAdjuster.MULTI_VALUE_BRANCH_POWER_PHASE_TRACKER_KAHL_JACKEL ==
_fphp.phaseTrackerType()) {
- iM = (int) ((cnG.argument() + java.lang.Math.PI) / (2. * java.lang.Math.PI));
+ iM = (int) ((g.argument() + java.lang.Math.PI) / (2. * java.lang.Math.PI));
- iN = (int) ((cnG.argument() + (dbTimeToExpiry * cnSmallD.argument()) + java.lang.Math.PI) /
+ iN = (int) ((g.argument() + (dbTimeToExpiry * d.argument()) + java.lang.Math.PI) /
(2. * java.lang.Math.PI));
}
- org.drip.function.definition.CartesianComplexNumber cnExpTTEScaledSmallD =
- org.drip.function.definition.CartesianComplexNumber.Scale (cnSmallD, -1. * dbTimeToExpiry);
+ org.drip.numerical.complex.CartesianC1 cnExpTTEScaledSmallD =
+ org.drip.numerical.complex.C1MatrixUtil.Scale (d, -1. * dbTimeToExpiry);
if (null == cnExpTTEScaledSmallD) return null;
- if (null == (cnExpTTEScaledSmallD = org.drip.function.definition.CartesianComplexNumber.Exponentiate
+ if (null == (cnExpTTEScaledSmallD = org.drip.numerical.complex.CartesianC1.Exponentiate
(cnExpTTEScaledSmallD)))
return null;
- org.drip.function.definition.CartesianComplexNumber cnD = new org.drip.function.definition.CartesianComplexNumber (1. -
+ org.drip.numerical.complex.CartesianC1 cnD = new org.drip.numerical.complex.CartesianC1 (1. -
cnExpTTEScaledSmallD.real(), -1. * cnExpTTEScaledSmallD.imaginary());
- org.drip.function.definition.CartesianComplexNumber cnInvGExpTTEScaledSmallD =
- org.drip.function.definition.CartesianComplexNumber.Multiply (cnExpTTEScaledSmallD, cnG);
+ CartesianC1 cnInvGExpTTEScaledSmallD = C1MatrixUtil.Multiply (cnExpTTEScaledSmallD, g);
if (null == cnInvGExpTTEScaledSmallD) return null;
- cnInvGExpTTEScaledSmallD = new org.drip.function.definition.CartesianComplexNumber (1. -
+ cnInvGExpTTEScaledSmallD = new org.drip.numerical.complex.CartesianC1 (1. -
cnInvGExpTTEScaledSmallD.real(), -1. * cnInvGExpTTEScaledSmallD.imaginary());
- if (null == (cnD = org.drip.function.definition.CartesianComplexNumber.Divide (cnD, cnInvGExpTTEScaledSmallD)))
+ if (null == (cnD = org.drip.numerical.complex.C1MatrixUtil.Divide (cnD, cnInvGExpTTEScaledSmallD)))
return null;
- if (null == (cnD = org.drip.function.definition.CartesianComplexNumber.Multiply (cnGNumerator, cnD)))
+ if (null == (cnD = org.drip.numerical.complex.C1MatrixUtil.Multiply (cnGNumerator, cnD)))
return null;
dblSigmaScaler = 1. / dblSigmaScaler;
- if (null == (cnD = org.drip.function.definition.CartesianComplexNumber.Scale (cnD, dblSigmaScaler))) return null;
+ if (null == (cnD = org.drip.numerical.complex.C1MatrixUtil.Scale (cnD, dblSigmaScaler))) return null;
- org.drip.function.definition.CartesianComplexNumber cnC = new org.drip.function.definition.CartesianComplexNumber (1. -
- cnG.real(), -1. * cnG.imaginary());
+ CartesianC1 c = new CartesianC1 (1. - g.real(), -1. * g.imaginary());
if (org.drip.numerical.fourier.PhaseAdjuster.MULTI_VALUE_BRANCH_POWER_PHASE_TRACKER_KAHL_JACKEL ==
_fphp.phaseTrackerType()) {
- if (null == (cnC = org.drip.numerical.fourier.PhaseAdjuster.PowerLogPhaseTracker
- (cnInvGExpTTEScaledSmallD, cnC, iN, iM)))
+ if (null == (c = org.drip.numerical.fourier.PhaseAdjuster.PowerLogPhaseTracker
+ (cnInvGExpTTEScaledSmallD, c, iN, iM)))
return null;
} else if (org.drip.numerical.fourier.PhaseAdjuster.MULTI_VALUE_BRANCH_PHASE_TRACKER_ROTATION_COUNT
== _fphp.phaseTrackerType()) {
- if (null == (cnC = org.drip.function.definition.CartesianComplexNumber.Logarithm (cnC))) return null;
+ if (null == (c = org.drip.numerical.complex.CartesianC1.Logarithm (c))) return null;
- cnC = new org.drip.function.definition.CartesianComplexNumber (cnC.real(), rcpt.updateAndApply
- (cnC.argument(), true));
+ c = new org.drip.numerical.complex.CartesianC1 (c.real(), rcpt.updateAndApply
+ (c.argument(), true));
}
- double dblCorrectedPhase = cnC.argument();
+ double dblCorrectedPhase = c.argument();
- if (null == (cnC = org.drip.function.definition.CartesianComplexNumber.Scale (cnC, -2.))) return null;
+ if (null == (c = org.drip.numerical.complex.C1MatrixUtil.Scale (c, -2.))) return null;
- org.drip.function.definition.CartesianComplexNumber cnTTEScaledGNumerator =
- org.drip.function.definition.CartesianComplexNumber.Scale (cnGNumerator, dbTimeToExpiry);
+ org.drip.numerical.complex.CartesianC1 cnTTEScaledGNumerator =
+ org.drip.numerical.complex.C1MatrixUtil.Scale (cnGNumerator, dbTimeToExpiry);
if (null == cnTTEScaledGNumerator) return null;
- if (null == (cnC = org.drip.function.definition.CartesianComplexNumber.Add (cnTTEScaledGNumerator, cnC)))
+ if (null == (c = org.drip.numerical.complex.C1MatrixUtil.Add (cnTTEScaledGNumerator, c)))
return null;
- if (null == (cnC = org.drip.function.definition.CartesianComplexNumber.Scale (cnC, dblA * dblSigmaScaler)))
+ if (null == (c = org.drip.numerical.complex.C1MatrixUtil.Scale (c, dblA * dblSigmaScaler)))
return null;
- if (null == (cnC = org.drip.function.definition.CartesianComplexNumber.Add (new
- org.drip.function.definition.CartesianComplexNumber (0., dblRiskFreeRate * dbTimeToExpiry * dblFreq),
- cnC)))
+ if (null == (c = org.drip.numerical.complex.C1MatrixUtil.Add (new
+ org.drip.numerical.complex.CartesianC1 (0., dblRiskFreeRate * dbTimeToExpiry * dblFreq), c)))
return null;
- org.drip.function.definition.CartesianComplexNumber cnF = org.drip.function.definition.CartesianComplexNumber.Scale (cnD,
+ org.drip.numerical.complex.CartesianC1 cnF = org.drip.numerical.complex.C1MatrixUtil.Scale (cnD,
dblInitialVolatility);
if (null == cnF) return null;
- if (null == (cnF = org.drip.function.definition.CartesianComplexNumber.Add (cnF, new
- org.drip.function.definition.CartesianComplexNumber (0., java.lang.Math.log (dblSpot) * dblFreq))))
+ if (null == (cnF = org.drip.numerical.complex.C1MatrixUtil.Add (cnF, new
+ org.drip.numerical.complex.CartesianC1 (0., java.lang.Math.log (dblSpot) * dblFreq))))
return null;
- if (null == (cnF = org.drip.function.definition.CartesianComplexNumber.Add (cnF, cnC))) return null;
+ if (null == (cnF = org.drip.numerical.complex.C1MatrixUtil.Add (cnF, c))) return null;
- if (null == (cnF = org.drip.function.definition.CartesianComplexNumber.Add (cnF, new
- org.drip.function.definition.CartesianComplexNumber (0., -1. * java.lang.Math.log (dblStrike) * dblFreq))))
+ if (null == (cnF = org.drip.numerical.complex.C1MatrixUtil.Add (cnF, new
+ org.drip.numerical.complex.CartesianC1 (0., -1. * java.lang.Math.log (dblStrike) * dblFreq))))
return null;
- if (null == (cnF = org.drip.function.definition.CartesianComplexNumber.Exponentiate (cnF))) return null;
+ if (null == (cnF = org.drip.numerical.complex.CartesianC1.Exponentiate (cnF))) return null;
- if (null == (cnF = org.drip.function.definition.CartesianComplexNumber.Divide (cnF, new
- org.drip.function.definition.CartesianComplexNumber (0., dblFreq))))
+ if (null == (cnF = org.drip.numerical.complex.C1MatrixUtil.Divide (cnF, new
+ org.drip.numerical.complex.CartesianC1 (0., dblFreq))))
return null;
return new PhaseCorrectedF (dblCorrectedPhase, cnF);
@@ -291,134 +290,124 @@ private PhaseCorrectedF fourierTransformAMST07 (
final org.drip.numerical.fourier.RotationCountPhaseTracker rcpt)
{
try {
- org.drip.function.definition.CartesianComplexNumber cnSmallDLHS = new org.drip.function.definition.CartesianComplexNumber (dblB,
- -1. * _fphp.rho() * _fphp.sigma() * dblFreq);
+ CartesianC1 cnSmallDLHS = new CartesianC1 (dblB, -1. * _fphp.rho() * _fphp.sigma() * dblFreq);
- org.drip.function.definition.CartesianComplexNumber cnSmallD = org.drip.function.definition.CartesianComplexNumber.Square
- (cnSmallDLHS);
+ CartesianC1 d1 = org.drip.numerical.complex.C1MatrixUtil.Square (cnSmallDLHS);
- if (null == cnSmallD) return null;
+ if (null == d1) return null;
double dblSigmaScaler = _fphp.sigma() * _fphp.sigma();
- if (null == (cnSmallD = org.drip.function.definition.CartesianComplexNumber.Add (cnSmallD, new
- org.drip.function.definition.CartesianComplexNumber (dblSigmaScaler * dblFreq * dblFreq, -2. * dblSigmaScaler
+ if (null == (d1 = C1MatrixUtil.Add (d1, new
+ CartesianC1 (dblSigmaScaler * dblFreq * dblFreq, -2. * dblSigmaScaler
* dblFreq * dblU))))
return null;
- if (null == (cnSmallD = org.drip.function.definition.CartesianComplexNumber.SquareRoot (cnSmallD))) return null;
+ if (null == (d1 = C1MatrixUtil.SquareRoot (d1))) return null;
- org.drip.function.definition.CartesianComplexNumber cnGNumerator = org.drip.function.definition.CartesianComplexNumber.Add
- (cnSmallDLHS, cnSmallD);
+ CartesianC1 gNumerator = C1MatrixUtil.Add (cnSmallDLHS, d1);
- if (null == cnGNumerator) return null;
+ if (null == gNumerator) return null;
- org.drip.function.definition.CartesianComplexNumber cnG = org.drip.function.definition.CartesianComplexNumber.Subtract
- (cnSmallDLHS, cnSmallD);
+ CartesianC1 g = C1MatrixUtil.Subtract (cnSmallDLHS, d1);
- if (null == cnG) return null;
+ if (null == g) return null;
- if (null == (cnG = org.drip.function.definition.CartesianComplexNumber.Divide (cnGNumerator, cnG))) return null;
+ if (null == (g = C1MatrixUtil.Divide (gNumerator, g))) return null;
int iM = 0;
int iN = 0;
if (org.drip.numerical.fourier.PhaseAdjuster.MULTI_VALUE_BRANCH_POWER_PHASE_TRACKER_KAHL_JACKEL ==
_fphp.phaseTrackerType()) {
- iM = (int) ((cnG.argument() + java.lang.Math.PI) / (2. * java.lang.Math.PI));
+ iM = (int) ((g.argument() + java.lang.Math.PI) / (2. * java.lang.Math.PI));
- iN = (int) ((cnG.argument() + (dbTimeToExpiry * cnSmallD.argument()) + java.lang.Math.PI) /
+ iN = (int) ((g.argument() + (dbTimeToExpiry * d1.argument()) + java.lang.Math.PI) /
(2. * java.lang.Math.PI));
}
- org.drip.function.definition.CartesianComplexNumber cnExpTTEScaledSmallD =
- org.drip.function.definition.CartesianComplexNumber.Scale (cnSmallD, dbTimeToExpiry);
+ CartesianC1 cnExpTTEScaledSmallD = C1MatrixUtil.Scale (d1, dbTimeToExpiry);
if (null == cnExpTTEScaledSmallD) return null;
- if (null == (cnExpTTEScaledSmallD = org.drip.function.definition.CartesianComplexNumber.Exponentiate
- (cnExpTTEScaledSmallD)))
+ if (null == (cnExpTTEScaledSmallD = CartesianC1.Exponentiate (cnExpTTEScaledSmallD)))
return null;
- org.drip.function.definition.CartesianComplexNumber cnD = new org.drip.function.definition.CartesianComplexNumber (1. -
- cnExpTTEScaledSmallD.real(), -1. * cnExpTTEScaledSmallD.imaginary());
+ CartesianC1 d = new CartesianC1 (
+ 1. - cnExpTTEScaledSmallD.real(),
+ -1. * cnExpTTEScaledSmallD.imaginary()
+ );
- org.drip.function.definition.CartesianComplexNumber cnInvGExpTTEScaledSmallD =
- org.drip.function.definition.CartesianComplexNumber.Multiply (cnG, cnExpTTEScaledSmallD);
+ org.drip.numerical.complex.CartesianC1 cnInvGExpTTEScaledSmallD =
+ org.drip.numerical.complex.C1MatrixUtil.Multiply (g, cnExpTTEScaledSmallD);
if (null == cnInvGExpTTEScaledSmallD) return null;
- cnInvGExpTTEScaledSmallD = new org.drip.function.definition.CartesianComplexNumber (1. -
+ cnInvGExpTTEScaledSmallD = new org.drip.numerical.complex.CartesianC1 (1. -
cnInvGExpTTEScaledSmallD.real(), -1. * cnInvGExpTTEScaledSmallD.imaginary());
- if (null == (cnD = org.drip.function.definition.CartesianComplexNumber.Divide (cnD, cnInvGExpTTEScaledSmallD)))
+ if (null == (d = C1MatrixUtil.Divide (d, cnInvGExpTTEScaledSmallD)))
return null;
- if (null == (cnD = org.drip.function.definition.CartesianComplexNumber.Multiply (cnGNumerator, cnD)))
+ if (null == (d = C1MatrixUtil.Multiply (gNumerator, d)))
return null;
dblSigmaScaler = 1. / dblSigmaScaler;
- if (null == (cnD = org.drip.function.definition.CartesianComplexNumber.Scale (cnD, dblSigmaScaler))) return null;
+ if (null == (d = C1MatrixUtil.Scale (d, dblSigmaScaler))) return null;
- org.drip.function.definition.CartesianComplexNumber cnC = new org.drip.function.definition.CartesianComplexNumber (1. -
- cnG.real(), -1. * cnG.imaginary());
+ CartesianC1 c = new CartesianC1 (1. - g.real(), -1. * g.imaginary());
- if (org.drip.numerical.fourier.PhaseAdjuster.MULTI_VALUE_BRANCH_POWER_PHASE_TRACKER_KAHL_JACKEL ==
- _fphp.phaseTrackerType()) {
- if (null == (cnC = org.drip.numerical.fourier.PhaseAdjuster.PowerLogPhaseTracker
- (cnInvGExpTTEScaledSmallD, cnC, iN, iM)))
+ if (PhaseAdjuster.MULTI_VALUE_BRANCH_POWER_PHASE_TRACKER_KAHL_JACKEL == _fphp.phaseTrackerType())
+ {
+ if (null == (c = PhaseAdjuster.PowerLogPhaseTracker (cnInvGExpTTEScaledSmallD, c, iN, iM)))
return null;
- } else if (org.drip.numerical.fourier.PhaseAdjuster.MULTI_VALUE_BRANCH_PHASE_TRACKER_ROTATION_COUNT
+ } else if (PhaseAdjuster.MULTI_VALUE_BRANCH_PHASE_TRACKER_ROTATION_COUNT
== _fphp.phaseTrackerType()) {
- if (null == (cnC = org.drip.function.definition.CartesianComplexNumber.Logarithm (cnC))) return null;
+ if (null == (c = CartesianC1.Logarithm (c))) return null;
- cnC = new org.drip.function.definition.CartesianComplexNumber (cnC.real(), rcpt.updateAndApply
- (cnC.argument(), true));
+ c = new CartesianC1 (c.real(), rcpt.updateAndApply (c.argument(), true));
}
- double dblCorrectedPhase = cnC.argument();
+ double dblCorrectedPhase = c.argument();
- if (null == (cnC = org.drip.function.definition.CartesianComplexNumber.Scale (cnC, -2.))) return null;
+ if (null == (c = C1MatrixUtil.Scale (c, -2.))) return null;
- org.drip.function.definition.CartesianComplexNumber cnTTEScaledGNumerator =
- org.drip.function.definition.CartesianComplexNumber.Scale (cnGNumerator, dbTimeToExpiry);
+ CartesianC1 tteScaledGNumerator = C1MatrixUtil.Scale (gNumerator, dbTimeToExpiry);
- if (null == cnTTEScaledGNumerator) return null;
+ if (null == tteScaledGNumerator) return null;
- if (null == (cnC = org.drip.function.definition.CartesianComplexNumber.Add (cnTTEScaledGNumerator, cnC)))
+ if (null == (c = C1MatrixUtil.Add (tteScaledGNumerator, c)))
return null;
- if (null == (cnC = org.drip.function.definition.CartesianComplexNumber.Scale (cnC, dblA * dblSigmaScaler)))
+ if (null == (c = C1MatrixUtil.Scale (c, dblA * dblSigmaScaler)))
return null;
- if (null == (cnC = org.drip.function.definition.CartesianComplexNumber.Add (new
- org.drip.function.definition.CartesianComplexNumber (0., dblRiskFreeRate * dbTimeToExpiry * dblFreq),
- cnC)))
+ if (null == (c = C1MatrixUtil.Add (new
+ CartesianC1 (0., dblRiskFreeRate * dbTimeToExpiry * dblFreq), c)))
return null;
- org.drip.function.definition.CartesianComplexNumber cnF = org.drip.function.definition.CartesianComplexNumber.Scale (cnD,
- dblInitialVolatility);
+ CartesianC1 f = C1MatrixUtil.Scale (d, dblInitialVolatility);
- if (null == cnF) return null;
+ if (null == f) return null;
- if (null == (cnF = org.drip.function.definition.CartesianComplexNumber.Add (cnF, new
- org.drip.function.definition.CartesianComplexNumber (0., java.lang.Math.log (dblSpot) * dblFreq))))
+ if (null == (f = org.drip.numerical.complex.C1MatrixUtil.Add (f, new
+ org.drip.numerical.complex.CartesianC1 (0., java.lang.Math.log (dblSpot) * dblFreq))))
return null;
- if (null == (cnF = org.drip.function.definition.CartesianComplexNumber.Add (cnF, cnC))) return null;
+ if (null == (f = org.drip.numerical.complex.C1MatrixUtil.Add (f, c))) return null;
- if (null == (cnF = org.drip.function.definition.CartesianComplexNumber.Add (cnF, new
- org.drip.function.definition.CartesianComplexNumber (0., -1. * java.lang.Math.log (dblStrike) * dblFreq))))
+ if (null == (f = org.drip.numerical.complex.C1MatrixUtil.Add (f, new
+ org.drip.numerical.complex.CartesianC1 (0., -1. * java.lang.Math.log (dblStrike) * dblFreq))))
return null;
- if (null == (cnF = org.drip.function.definition.CartesianComplexNumber.Exponentiate (cnF))) return null;
+ if (null == (f = org.drip.numerical.complex.CartesianC1.Exponentiate (f))) return null;
- if (null == (cnF = org.drip.function.definition.CartesianComplexNumber.Divide (cnF, new
- org.drip.function.definition.CartesianComplexNumber (0., dblFreq))))
+ if (null == (f = org.drip.numerical.complex.C1MatrixUtil.Divide (f, new
+ org.drip.numerical.complex.CartesianC1 (0., dblFreq))))
return null;
- return new PhaseCorrectedF (dblCorrectedPhase, cnF);
+ return new PhaseCorrectedF (dblCorrectedPhase, f);
} catch (java.lang.Exception e) {
e.printStackTrace();
}
diff --git a/src/main/java/org/drip/sample/andersen2017vm/EnsembleTradeFlowAdjustment.java b/src/main/java/org/drip/sample/andersen2017vm/EnsembleTradeFlowAdjustment.java
index 67795cf3340d..40a183c908e6 100644
--- a/src/main/java/org/drip/sample/andersen2017vm/EnsembleTradeFlowAdjustment.java
+++ b/src/main/java/org/drip/sample/andersen2017vm/EnsembleTradeFlowAdjustment.java
@@ -29,7 +29,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -710,7 +710,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/andersen2017vm/EnsembleVariationMarginEstimate.java b/src/main/java/org/drip/sample/andersen2017vm/EnsembleVariationMarginEstimate.java
index 5182031a74f8..9d53c6d467f0 100644
--- a/src/main/java/org/drip/sample/andersen2017vm/EnsembleVariationMarginEstimate.java
+++ b/src/main/java/org/drip/sample/andersen2017vm/EnsembleVariationMarginEstimate.java
@@ -30,7 +30,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -718,7 +718,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
@@ -740,7 +740,7 @@ public static final void main (
wanderEnsemble
);
- double[][] denseVariationMarginTranspose = MatrixUtil.Transpose (denseVariationMargin);
+ double[][] denseVariationMarginTranspose = R1MatrixUtil.Transpose (denseVariationMargin);
System.out.println ("\t||--------------------------------------------------||");
diff --git a/src/main/java/org/drip/sample/andersen2017vm/FixFloatAggressiveLong.java b/src/main/java/org/drip/sample/andersen2017vm/FixFloatAggressiveLong.java
index 036038fb15b4..7ddc3b66aac7 100644
--- a/src/main/java/org/drip/sample/andersen2017vm/FixFloatAggressiveLong.java
+++ b/src/main/java/org/drip/sample/andersen2017vm/FixFloatAggressiveLong.java
@@ -35,7 +35,7 @@
import org.drip.measure.gaussian.NormalQuadrature;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -724,7 +724,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/andersen2017vm/FixFloatAggressiveShort.java b/src/main/java/org/drip/sample/andersen2017vm/FixFloatAggressiveShort.java
index fe3427bf1453..8178d09f4ddc 100644
--- a/src/main/java/org/drip/sample/andersen2017vm/FixFloatAggressiveShort.java
+++ b/src/main/java/org/drip/sample/andersen2017vm/FixFloatAggressiveShort.java
@@ -35,7 +35,7 @@
import org.drip.measure.gaussian.NormalQuadrature;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -724,7 +724,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/andersen2017vm/FixFloatClassicalMinusLong.java b/src/main/java/org/drip/sample/andersen2017vm/FixFloatClassicalMinusLong.java
index c0d83f9aaf7a..a6a3bfae94e0 100644
--- a/src/main/java/org/drip/sample/andersen2017vm/FixFloatClassicalMinusLong.java
+++ b/src/main/java/org/drip/sample/andersen2017vm/FixFloatClassicalMinusLong.java
@@ -35,7 +35,7 @@
import org.drip.measure.gaussian.NormalQuadrature;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -724,7 +724,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/andersen2017vm/FixFloatClassicalMinusShort.java b/src/main/java/org/drip/sample/andersen2017vm/FixFloatClassicalMinusShort.java
index 4622935ceaf5..f59f23a19176 100644
--- a/src/main/java/org/drip/sample/andersen2017vm/FixFloatClassicalMinusShort.java
+++ b/src/main/java/org/drip/sample/andersen2017vm/FixFloatClassicalMinusShort.java
@@ -35,7 +35,7 @@
import org.drip.measure.gaussian.NormalQuadrature;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -724,7 +724,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/andersen2017vm/FixFloatClassicalPlusLong.java b/src/main/java/org/drip/sample/andersen2017vm/FixFloatClassicalPlusLong.java
index f3520595130d..9e59435a607e 100644
--- a/src/main/java/org/drip/sample/andersen2017vm/FixFloatClassicalPlusLong.java
+++ b/src/main/java/org/drip/sample/andersen2017vm/FixFloatClassicalPlusLong.java
@@ -35,7 +35,7 @@
import org.drip.measure.gaussian.NormalQuadrature;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -724,7 +724,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/andersen2017vm/FixFloatClassicalPlusShort.java b/src/main/java/org/drip/sample/andersen2017vm/FixFloatClassicalPlusShort.java
index b8386d58916b..65ca675707b7 100644
--- a/src/main/java/org/drip/sample/andersen2017vm/FixFloatClassicalPlusShort.java
+++ b/src/main/java/org/drip/sample/andersen2017vm/FixFloatClassicalPlusShort.java
@@ -35,7 +35,7 @@
import org.drip.measure.gaussian.NormalQuadrature;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -724,7 +724,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/andersen2017vm/FixFloatConservativeLong.java b/src/main/java/org/drip/sample/andersen2017vm/FixFloatConservativeLong.java
index d22bcc458971..697af1d85360 100644
--- a/src/main/java/org/drip/sample/andersen2017vm/FixFloatConservativeLong.java
+++ b/src/main/java/org/drip/sample/andersen2017vm/FixFloatConservativeLong.java
@@ -35,7 +35,7 @@
import org.drip.measure.gaussian.NormalQuadrature;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -724,7 +724,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/andersen2017vm/FixFloatConservativeShort.java b/src/main/java/org/drip/sample/andersen2017vm/FixFloatConservativeShort.java
index e49dbeb5008a..33768c84dcfa 100644
--- a/src/main/java/org/drip/sample/andersen2017vm/FixFloatConservativeShort.java
+++ b/src/main/java/org/drip/sample/andersen2017vm/FixFloatConservativeShort.java
@@ -35,7 +35,7 @@
import org.drip.measure.gaussian.NormalQuadrature;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -724,7 +724,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/andersen2017vm/PathTradeFlowAdjustment.java b/src/main/java/org/drip/sample/andersen2017vm/PathTradeFlowAdjustment.java
index 7c7f1e47801d..e107b5479939 100644
--- a/src/main/java/org/drip/sample/andersen2017vm/PathTradeFlowAdjustment.java
+++ b/src/main/java/org/drip/sample/andersen2017vm/PathTradeFlowAdjustment.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -705,7 +705,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/blacklitterman/DaJagannathan2005d.java b/src/main/java/org/drip/sample/blacklitterman/DaJagannathan2005d.java
index f29264e0ba6f..bc709d29db18 100644
--- a/src/main/java/org/drip/sample/blacklitterman/DaJagannathan2005d.java
+++ b/src/main/java/org/drip/sample/blacklitterman/DaJagannathan2005d.java
@@ -2,7 +2,7 @@
package org.drip.sample.blacklitterman;
import org.drip.measure.statistics.MultivariateMoments;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.portfolioconstruction.allocator.*;
import org.drip.portfolioconstruction.asset.AssetComponent;
import org.drip.portfolioconstruction.params.AssetUniverseStatisticalProperties;
@@ -221,7 +221,7 @@ public static final void main (
AssetComponent[] aAC = op.optimalPortfolio().assetComponentArray();
- double[] adblMarketImpliedReturn = MatrixUtil.Product (
+ double[] adblMarketImpliedReturn = R1MatrixUtil.Product (
aadblHistoricalCovariance,
adblMarketWeight
);
diff --git a/src/main/java/org/drip/sample/blacklitterman/IdzorekAndrogue2003.java b/src/main/java/org/drip/sample/blacklitterman/IdzorekAndrogue2003.java
index 4fd071c08e7f..0562c2f7f932 100644
--- a/src/main/java/org/drip/sample/blacklitterman/IdzorekAndrogue2003.java
+++ b/src/main/java/org/drip/sample/blacklitterman/IdzorekAndrogue2003.java
@@ -1,7 +1,7 @@
package org.drip.sample.blacklitterman;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -196,7 +196,7 @@ public static final void main (
for (int i = 0; i < adblMarketCapitalizationEstimate.length; ++i)
adblMarketCapitalizationWeight[i] = adblMarketCapitalizationEstimate[i] / dblTotalMarketCapitalization;
- double[] adblImpliedReturns = MatrixUtil.Product (
+ double[] adblImpliedReturns = R1MatrixUtil.Product (
aadblAssetExcessReturnsCorrelation,
adblMarketCapitalizationWeight
);
diff --git a/src/main/java/org/drip/sample/blacklitterman/OToole2013.java b/src/main/java/org/drip/sample/blacklitterman/OToole2013.java
index 804857bdf7d0..8226ac156667 100644
--- a/src/main/java/org/drip/sample/blacklitterman/OToole2013.java
+++ b/src/main/java/org/drip/sample/blacklitterman/OToole2013.java
@@ -1,7 +1,7 @@
package org.drip.sample.blacklitterman;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -187,7 +187,7 @@ public static final void main (
aadblG7Covariance[i][j] = aadblG7ExcessReturnsCorrelation[i][j] * adblG7ExcessReturnsVolatility[i] * adblG7ExcessReturnsVolatility[j];
}
- double[] adblG7ImpliedReturns = MatrixUtil.Product (
+ double[] adblG7ImpliedReturns = R1MatrixUtil.Product (
aadblG7Covariance,
adblG7BenchmarkWeight
);
diff --git a/src/main/java/org/drip/sample/blacklitterman/Soontornkit2010.java b/src/main/java/org/drip/sample/blacklitterman/Soontornkit2010.java
index 1b144d113d38..b082180cfc26 100644
--- a/src/main/java/org/drip/sample/blacklitterman/Soontornkit2010.java
+++ b/src/main/java/org/drip/sample/blacklitterman/Soontornkit2010.java
@@ -4,7 +4,7 @@
import org.drip.measure.bayesian.R1MultivariateConvolutionMetrics;
import org.drip.measure.continuous.MultivariateMeta;
import org.drip.measure.gaussian.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.portfolioconstruction.allocator.*;
import org.drip.portfolioconstruction.asset.Portfolio;
import org.drip.portfolioconstruction.bayesian.*;
@@ -284,7 +284,7 @@ public static final void main (
adblMarketCapitalizationWeight2[i + 1] = 0.5 * adblMarketCapitalizationWeight1[i];
}
- double[] adblExpectedExcessReturn = MatrixUtil.Product (
+ double[] adblExpectedExcessReturn = R1MatrixUtil.Product (
aadblAssetExcessReturnsCovariance,
adblMarketCapitalizationWeight2
);
diff --git a/src/main/java/org/drip/sample/burgard2011/CorrelatedNumeraireXVAAttribution.java b/src/main/java/org/drip/sample/burgard2011/CorrelatedNumeraireXVAAttribution.java
index 0a3d761a28a6..70edc52cd182 100644
--- a/src/main/java/org/drip/sample/burgard2011/CorrelatedNumeraireXVAAttribution.java
+++ b/src/main/java/org/drip/sample/burgard2011/CorrelatedNumeraireXVAAttribution.java
@@ -14,7 +14,7 @@
import org.drip.measure.dynamics.*;
import org.drip.measure.process.*;
import org.drip.measure.realization.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.*;
@@ -805,7 +805,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/burgard2011/CorrelatedNumeraireXVAExplain.java b/src/main/java/org/drip/sample/burgard2011/CorrelatedNumeraireXVAExplain.java
index 70d946b32776..c0e7f1737531 100644
--- a/src/main/java/org/drip/sample/burgard2011/CorrelatedNumeraireXVAExplain.java
+++ b/src/main/java/org/drip/sample/burgard2011/CorrelatedNumeraireXVAExplain.java
@@ -14,7 +14,7 @@
import org.drip.measure.dynamics.*;
import org.drip.measure.process.*;
import org.drip.measure.realization.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.*;
@@ -814,7 +814,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/burgard2011/CorrelatedNumeraireXVAGreeks.java b/src/main/java/org/drip/sample/burgard2011/CorrelatedNumeraireXVAGreeks.java
index ba80834ca4bc..e66dc10993d9 100644
--- a/src/main/java/org/drip/sample/burgard2011/CorrelatedNumeraireXVAGreeks.java
+++ b/src/main/java/org/drip/sample/burgard2011/CorrelatedNumeraireXVAGreeks.java
@@ -14,7 +14,7 @@
import org.drip.measure.dynamics.*;
import org.drip.measure.process.*;
import org.drip.measure.realization.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.*;
@@ -811,7 +811,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/burgard2011/CorrelatedNumeraireXVAReplicationPortfolio.java b/src/main/java/org/drip/sample/burgard2011/CorrelatedNumeraireXVAReplicationPortfolio.java
index dacb1ecbcd8a..248787fd524a 100644
--- a/src/main/java/org/drip/sample/burgard2011/CorrelatedNumeraireXVAReplicationPortfolio.java
+++ b/src/main/java/org/drip/sample/burgard2011/CorrelatedNumeraireXVAReplicationPortfolio.java
@@ -14,7 +14,7 @@
import org.drip.measure.dynamics.*;
import org.drip.measure.process.*;
import org.drip.measure.realization.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.*;
@@ -810,7 +810,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/burgard2011/XVAExplain.java b/src/main/java/org/drip/sample/burgard2011/XVAExplain.java
index ea27f01d48b9..f6519445333c 100644
--- a/src/main/java/org/drip/sample/burgard2011/XVAExplain.java
+++ b/src/main/java/org/drip/sample/burgard2011/XVAExplain.java
@@ -14,7 +14,7 @@
import org.drip.measure.dynamics.*;
import org.drip.measure.process.*;
import org.drip.measure.realization.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.*;
@@ -813,7 +813,7 @@ public static void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/burgard2011/XVAGreeks.java b/src/main/java/org/drip/sample/burgard2011/XVAGreeks.java
index abb43995aef6..abad536a3813 100644
--- a/src/main/java/org/drip/sample/burgard2011/XVAGreeks.java
+++ b/src/main/java/org/drip/sample/burgard2011/XVAGreeks.java
@@ -14,7 +14,7 @@
import org.drip.measure.dynamics.*;
import org.drip.measure.process.*;
import org.drip.measure.realization.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.*;
@@ -801,7 +801,7 @@ public static void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/burgard2011/XVAMarketGeneration.java b/src/main/java/org/drip/sample/burgard2011/XVAMarketGeneration.java
index 657fa37247d0..9c536f3c14cb 100644
--- a/src/main/java/org/drip/sample/burgard2011/XVAMarketGeneration.java
+++ b/src/main/java/org/drip/sample/burgard2011/XVAMarketGeneration.java
@@ -13,7 +13,7 @@
import org.drip.measure.discrete.CorrelatedPathVertexDimension;
import org.drip.measure.dynamics.*;
import org.drip.measure.process.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.*;
@@ -980,7 +980,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/burgard2011/XVAReplicationPortfolio.java b/src/main/java/org/drip/sample/burgard2011/XVAReplicationPortfolio.java
index cf6c0929c4f4..a1c02247e0d6 100644
--- a/src/main/java/org/drip/sample/burgard2011/XVAReplicationPortfolio.java
+++ b/src/main/java/org/drip/sample/burgard2011/XVAReplicationPortfolio.java
@@ -14,7 +14,7 @@
import org.drip.measure.dynamics.*;
import org.drip.measure.process.*;
import org.drip.measure.realization.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.*;
@@ -1167,7 +1167,7 @@ public static void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/burgard2012/EulerTrajectoryEvolutionScheme.java b/src/main/java/org/drip/sample/burgard2012/EulerTrajectoryEvolutionScheme.java
index fffbdd0efc11..4d44b89c4817 100644
--- a/src/main/java/org/drip/sample/burgard2012/EulerTrajectoryEvolutionScheme.java
+++ b/src/main/java/org/drip/sample/burgard2012/EulerTrajectoryEvolutionScheme.java
@@ -13,7 +13,7 @@
import org.drip.measure.discrete.CorrelatedPathVertexDimension;
import org.drip.measure.dynamics.*;
import org.drip.measure.process.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.*;
@@ -686,7 +686,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/burgard2013/BilateralCSACollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/BilateralCSACollateralizedFundingStochastic.java
index f83c9a4735d8..c139a2b2e1c4 100644
--- a/src/main/java/org/drip/sample/burgard2013/BilateralCSACollateralizedFundingStochastic.java
+++ b/src/main/java/org/drip/sample/burgard2013/BilateralCSACollateralizedFundingStochastic.java
@@ -10,7 +10,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -468,7 +468,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/burgard2013/BilateralCSAUncollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/BilateralCSAUncollateralizedFundingStochastic.java
index 5d83b4ef4613..0c5dc9b712bb 100644
--- a/src/main/java/org/drip/sample/burgard2013/BilateralCSAUncollateralizedFundingStochastic.java
+++ b/src/main/java/org/drip/sample/burgard2013/BilateralCSAUncollateralizedFundingStochastic.java
@@ -10,7 +10,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -471,7 +471,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/burgard2013/BilateralCSAZeroThresholdFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/BilateralCSAZeroThresholdFundingStochastic.java
index 5977d7ddefbd..eedf164c7178 100644
--- a/src/main/java/org/drip/sample/burgard2013/BilateralCSAZeroThresholdFundingStochastic.java
+++ b/src/main/java/org/drip/sample/burgard2013/BilateralCSAZeroThresholdFundingStochastic.java
@@ -10,7 +10,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -468,7 +468,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/burgard2013/PerfectReplicationCollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/PerfectReplicationCollateralizedFundingStochastic.java
index 215bef52e4f3..d916ca817bf6 100644
--- a/src/main/java/org/drip/sample/burgard2013/PerfectReplicationCollateralizedFundingStochastic.java
+++ b/src/main/java/org/drip/sample/burgard2013/PerfectReplicationCollateralizedFundingStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -484,7 +484,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/burgard2013/PerfectReplicationUncollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/PerfectReplicationUncollateralizedFundingStochastic.java
index f397d5bc8d81..3bdfee2de023 100644
--- a/src/main/java/org/drip/sample/burgard2013/PerfectReplicationUncollateralizedFundingStochastic.java
+++ b/src/main/java/org/drip/sample/burgard2013/PerfectReplicationUncollateralizedFundingStochastic.java
@@ -10,7 +10,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -471,7 +471,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/burgard2013/PerfectReplicationZeroThresholdFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/PerfectReplicationZeroThresholdFundingStochastic.java
index aacc63faa71e..b39be8d510a7 100644
--- a/src/main/java/org/drip/sample/burgard2013/PerfectReplicationZeroThresholdFundingStochastic.java
+++ b/src/main/java/org/drip/sample/burgard2013/PerfectReplicationZeroThresholdFundingStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -484,7 +484,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/burgard2013/SemiReplicationCollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/SemiReplicationCollateralizedFundingStochastic.java
index 2df0b0799ad1..bffce30eb442 100644
--- a/src/main/java/org/drip/sample/burgard2013/SemiReplicationCollateralizedFundingStochastic.java
+++ b/src/main/java/org/drip/sample/burgard2013/SemiReplicationCollateralizedFundingStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -484,7 +484,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/burgard2013/SemiReplicationUncollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/SemiReplicationUncollateralizedFundingStochastic.java
index cf82f5e2e621..70cabe2a3474 100644
--- a/src/main/java/org/drip/sample/burgard2013/SemiReplicationUncollateralizedFundingStochastic.java
+++ b/src/main/java/org/drip/sample/burgard2013/SemiReplicationUncollateralizedFundingStochastic.java
@@ -10,7 +10,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -471,7 +471,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/burgard2013/SemiReplicationZeroThresholdFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/SemiReplicationZeroThresholdFundingStochastic.java
index a0be8e88a10d..693d7d3680ca 100644
--- a/src/main/java/org/drip/sample/burgard2013/SemiReplicationZeroThresholdFundingStochastic.java
+++ b/src/main/java/org/drip/sample/burgard2013/SemiReplicationZeroThresholdFundingStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -484,7 +484,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/burgard2013/SetOffCollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/SetOffCollateralizedFundingStochastic.java
index 8523b9d5cc1c..18e13dcb604e 100644
--- a/src/main/java/org/drip/sample/burgard2013/SetOffCollateralizedFundingStochastic.java
+++ b/src/main/java/org/drip/sample/burgard2013/SetOffCollateralizedFundingStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -484,7 +484,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/burgard2013/SetOffUncollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/SetOffUncollateralizedFundingStochastic.java
index 14ca52faa91a..8622b55d457a 100644
--- a/src/main/java/org/drip/sample/burgard2013/SetOffUncollateralizedFundingStochastic.java
+++ b/src/main/java/org/drip/sample/burgard2013/SetOffUncollateralizedFundingStochastic.java
@@ -10,7 +10,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -471,7 +471,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/burgard2013/SetOffZeroThresholdFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/SetOffZeroThresholdFundingStochastic.java
index 204a5d3d2b56..eaa2cef8bfb1 100644
--- a/src/main/java/org/drip/sample/burgard2013/SetOffZeroThresholdFundingStochastic.java
+++ b/src/main/java/org/drip/sample/burgard2013/SetOffZeroThresholdFundingStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -484,7 +484,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/burgard2013/UnilateralCSACollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/UnilateralCSACollateralizedFundingStochastic.java
index 2bce7ccd0dc2..fc74145f4094 100644
--- a/src/main/java/org/drip/sample/burgard2013/UnilateralCSACollateralizedFundingStochastic.java
+++ b/src/main/java/org/drip/sample/burgard2013/UnilateralCSACollateralizedFundingStochastic.java
@@ -10,7 +10,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -468,7 +468,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/burgard2013/UnilateralCSAUncollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/UnilateralCSAUncollateralizedFundingStochastic.java
index bd1d4c253158..95fa8ec11546 100644
--- a/src/main/java/org/drip/sample/burgard2013/UnilateralCSAUncollateralizedFundingStochastic.java
+++ b/src/main/java/org/drip/sample/burgard2013/UnilateralCSAUncollateralizedFundingStochastic.java
@@ -10,7 +10,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -471,7 +471,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/burgard2013/UnilateralCSAZeroThresholdFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/UnilateralCSAZeroThresholdFundingStochastic.java
index 97e4d8b18662..ff1153eef7e1 100644
--- a/src/main/java/org/drip/sample/burgard2013/UnilateralCSAZeroThresholdFundingStochastic.java
+++ b/src/main/java/org/drip/sample/burgard2013/UnilateralCSAZeroThresholdFundingStochastic.java
@@ -10,7 +10,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -468,7 +468,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/conditionnumber/TriangleMatrix.java b/src/main/java/org/drip/sample/conditionnumber/TriangleMatrix.java
index cf4b755e5918..8188dc53aec4 100644
--- a/src/main/java/org/drip/sample/conditionnumber/TriangleMatrix.java
+++ b/src/main/java/org/drip/sample/conditionnumber/TriangleMatrix.java
@@ -5,7 +5,7 @@
import org.drip.measure.crng.RandomMatrixGenerator;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.TriangularMatrix;
+import org.drip.numerical.matrix.R1Triangular;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -127,7 +127,7 @@ private static final void Trial (
final double maximumElement)
throws Exception
{
- TriangularMatrix upperTriangular = RandomMatrixGenerator.UpperTriangular (
+ R1Triangular upperTriangular = RandomMatrixGenerator.UpperTriangular (
elementCount,
maximumElement,
true
diff --git a/src/main/java/org/drip/sample/digamma/UnitImaginaryEstimate.java b/src/main/java/org/drip/sample/digamma/UnitImaginaryEstimate.java
index adbc5ae32b1d..663925cc5a2e 100644
--- a/src/main/java/org/drip/sample/digamma/UnitImaginaryEstimate.java
+++ b/src/main/java/org/drip/sample/digamma/UnitImaginaryEstimate.java
@@ -1,7 +1,7 @@
package org.drip.sample.digamma;
-import org.drip.function.definition.CartesianComplexNumber;
+import org.drip.numerical.complex.CartesianC1;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.specialfunction.digamma.SpecialValues;
@@ -182,7 +182,7 @@ public static final void main (
for (int termCount : termCountArray)
{
- CartesianComplexNumber complexNumber = SpecialValues.UnitImaginary (termCount);
+ CartesianC1 complexNumber = SpecialValues.UnitImaginary (termCount);
System.out.println (
"\t|" + FormatUtil.FormatDouble (termCount, 4, 0, 1.) + " => " +
diff --git a/src/main/java/org/drip/sample/helitterman/Table4DetailedBlowout.java b/src/main/java/org/drip/sample/helitterman/Table4DetailedBlowout.java
index e21d000685ad..52ee8b665b67 100644
--- a/src/main/java/org/drip/sample/helitterman/Table4DetailedBlowout.java
+++ b/src/main/java/org/drip/sample/helitterman/Table4DetailedBlowout.java
@@ -1,7 +1,7 @@
package org.drip.sample.helitterman;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -192,7 +192,7 @@ public static void main (
}
}
- double[] piArray = MatrixUtil.Product (
+ double[] piArray = R1MatrixUtil.Product (
sigmaMatrix,
inputWArray
);
@@ -214,7 +214,7 @@ public static void main (
System.out.println();
- double[] pDotPIArray = MatrixUtil.Product (
+ double[] pDotPIArray = R1MatrixUtil.Product (
inputPMatrix,
piArray
);
@@ -248,11 +248,11 @@ public static void main (
System.out.println();
- double[][] pTransposeMatrix = MatrixUtil.Transpose (
+ double[][] pTransposeMatrix = R1MatrixUtil.Transpose (
inputPMatrix
);
- double[][] sigmaDot_PTranspose_Matrix = MatrixUtil.Product (
+ double[][] sigmaDot_PTranspose_Matrix = R1MatrixUtil.Product (
sigmaMatrix,
pTransposeMatrix
);
@@ -274,7 +274,7 @@ public static void main (
System.out.println();
- double[][] pDotSIGMAdot_PTranspose_Matrix = MatrixUtil.Product (
+ double[][] pDotSIGMAdot_PTranspose_Matrix = R1MatrixUtil.Product (
inputPMatrix,
sigmaDot_PTranspose_Matrix
);
@@ -324,7 +324,7 @@ public static void main (
System.out.println();
- double[][] $PDotSIGMAdot_PTranspose_PlusOMEGA$InverseMatrix = MatrixUtil.InvertUsingGaussianElimination (
+ double[][] $PDotSIGMAdot_PTranspose_PlusOMEGA$InverseMatrix = R1MatrixUtil.InvertUsingGaussianElimination (
pDotSIGMAdot_PTranspose_PlusOMEGAMatrix
);
@@ -347,7 +347,7 @@ public static void main (
System.out.println();
- double[] __$PDotSIGMADot_PTranspose_plusOMEGA$Inverse__Dot_QMinus__PDotPI__Array = MatrixUtil.Product (
+ double[] __$PDotSIGMADot_PTranspose_plusOMEGA$Inverse__Dot_QMinus__PDotPI__Array = R1MatrixUtil.Product (
$PDotSIGMAdot_PTranspose_PlusOMEGA$InverseMatrix,
qMinus_PdotPI_Array
);
@@ -366,7 +366,7 @@ public static void main (
System.out.println();
double[] sigmaDot$PTranspose$__$PDotSIGMADot_PTranspose_PlusOmega$Inverse__Dot_QMinus__PDotPI__Array
- = MatrixUtil.Product (
+ = R1MatrixUtil.Product (
sigmaDot_PTranspose_Matrix,
__$PDotSIGMADot_PTranspose_plusOMEGA$Inverse__Dot_QMinus__PDotPI__Array
);
@@ -399,7 +399,7 @@ public static void main (
System.out.println();
- double[][] pDotSigmaMatrix = MatrixUtil.Product (
+ double[][] pDotSigmaMatrix = R1MatrixUtil.Product (
inputPMatrix,
sigmaMatrix
);
@@ -421,7 +421,7 @@ public static void main (
System.out.println();
- double[][] __$PDotSigmaDot_PTranspose_PlusOmega$Inverse__DotPDotSigmaMatrix = MatrixUtil.Product (
+ double[][] __$PDotSigmaDot_PTranspose_PlusOmega$Inverse__DotPDotSigmaMatrix = R1MatrixUtil.Product (
$PDotSIGMAdot_PTranspose_PlusOMEGA$InverseMatrix,
pDotSigmaMatrix
);
@@ -446,7 +446,7 @@ public static void main (
System.out.println();
double[][] sigmaDot_PTranspose_Dot__$PDotSigmaDot_PTranspose_PlusOmegaPDotSigmaMatrix =
- MatrixUtil.Product (
+ R1MatrixUtil.Product (
sigmaDot_PTranspose_Matrix,
__$PDotSigmaDot_PTranspose_PlusOmega$Inverse__DotPDotSigmaMatrix
);
@@ -551,7 +551,7 @@ public static void main (
System.out.println();
- double[][] sigmaPInverseMatrix = MatrixUtil.InvertUsingGaussianElimination (
+ double[][] sigmaPInverseMatrix = R1MatrixUtil.InvertUsingGaussianElimination (
sigmaPlusTauDot$$SigmaMinusSigmaDot_PTranspose_Dot__$PDotSigmaDot_PTranspose_PlusOmega$Inverse__DotPDotSigma$$Matrix
);
@@ -572,7 +572,7 @@ public static void main (
System.out.println();
- double[] sigmaPInverseDotPiHatArray = MatrixUtil.Product (
+ double[] sigmaPInverseDotPiHatArray = R1MatrixUtil.Product (
sigmaPInverseMatrix,
piHatArray
);
diff --git a/src/main/java/org/drip/sample/matrix/CholeskyFactorization.java b/src/main/java/org/drip/sample/matrix/CholeskyFactorization.java
index aba6c617cecb..1d96567a4692 100644
--- a/src/main/java/org/drip/sample/matrix/CholeskyFactorization.java
+++ b/src/main/java/org/drip/sample/matrix/CholeskyFactorization.java
@@ -2,7 +2,7 @@
package org.drip.sample.matrix;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.env.EnvManager;
/*
@@ -123,9 +123,9 @@ public static final void main (
{0.0, 0.1, 1.0}
};
- double[][] aadblACholesky = MatrixUtil.CholeskyBanachiewiczFactorization (aadblA);
+ double[][] aadblACholesky = R1MatrixUtil.CholeskyBanachiewiczFactorization (aadblA);
- double[][] aadblACholeskyTranspose = MatrixUtil.Transpose (aadblACholesky);
+ double[][] aadblACholeskyTranspose = R1MatrixUtil.Transpose (aadblACholesky);
System.out.println ("\n\t------------------------------------------------------------------------------------------------------");
@@ -135,7 +135,7 @@ public static final void main (
"ORIGINAL",
aadblA,
aadblACholesky,
- MatrixUtil.Product (
+ R1MatrixUtil.Product (
aadblACholesky,
aadblACholeskyTranspose
),
diff --git a/src/main/java/org/drip/sample/matrix/GershgorinAnalysis.java b/src/main/java/org/drip/sample/matrix/GershgorinAnalysis.java
index e6cc4b6c8c7d..13081cee23ac 100644
--- a/src/main/java/org/drip/sample/matrix/GershgorinAnalysis.java
+++ b/src/main/java/org/drip/sample/matrix/GershgorinAnalysis.java
@@ -3,7 +3,7 @@
import org.drip.numerical.linearalgebra.GershgorinAnalyzer;
import org.drip.numerical.linearalgebra.GershgorinDisc;
-import org.drip.numerical.linearalgebra.SquareMatrix;
+import org.drip.numerical.matrix.R1Square;
import org.drip.service.common.FormatUtil;
import org.drip.service.common.StringUtil;
import org.drip.service.env.EnvManager;
@@ -145,7 +145,7 @@ public static final void main (
};
GershgorinDisc[] gershgorinDiscRowArray = GershgorinAnalyzer.FromSquareMatrix (
- SquareMatrix.Standard (r2Array),
+ R1Square.Standard (r2Array),
true
).gershgorinDiscArray();
@@ -191,7 +191,7 @@ public static final void main (
System.out.println();
GershgorinDisc[] gershgorinDiscColumnArray = GershgorinAnalyzer.FromSquareMatrix (
- SquareMatrix.Standard (r2Array),
+ R1Square.Standard (r2Array),
false
).gershgorinDiscArray();
diff --git a/src/main/java/org/drip/sample/matrix/GrahamSchmidtProcess.java b/src/main/java/org/drip/sample/matrix/GrahamSchmidtProcess.java
index a1b4b2770344..a65600c070c7 100644
--- a/src/main/java/org/drip/sample/matrix/GrahamSchmidtProcess.java
+++ b/src/main/java/org/drip/sample/matrix/GrahamSchmidtProcess.java
@@ -2,7 +2,7 @@
package org.drip.sample.matrix;
import org.drip.numerical.common.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -122,37 +122,37 @@ public static final void main (
{-4, 24, -41}
};
- double[][] u = MatrixUtil.QRGrahamSchmidtOrthogonalization (a);
+ double[][] u = R1MatrixUtil.QRGrahamSchmidtOrthogonalization (a);
NumberUtil.PrintMatrix ("ORTHOGONAL", u);
- double[][] uTranspose = MatrixUtil.Transpose (u);
+ double[][] uTranspose = R1MatrixUtil.Transpose (u);
System.out.println (
"ORTHOGONAL TEST: " +
- FormatUtil.FormatDouble ( MatrixUtil.DotProduct (uTranspose[0], uTranspose[1]), 1, 1, 1.)
+ FormatUtil.FormatDouble ( R1MatrixUtil.DotProduct (uTranspose[0], uTranspose[1]), 1, 1, 1.)
);
- double[][] q = MatrixUtil.QRGrahamSchmidtOrthonormalization (a);
+ double[][] q = R1MatrixUtil.QRGrahamSchmidtOrthonormalization (a);
NumberUtil.PrintMatrix ("ORTHONORMAL", q);
- double[][] qTranspose = MatrixUtil.Transpose (q);
+ double[][] qTranspose = R1MatrixUtil.Transpose (q);
System.out.println (
"ORTHONORMAL TEST: " +
- FormatUtil.FormatDouble (MatrixUtil.DotProduct (qTranspose[0], qTranspose[1]), 1, 1, 1.)
+ FormatUtil.FormatDouble (R1MatrixUtil.DotProduct (qTranspose[0], qTranspose[1]), 1, 1, 1.)
);
System.out.println();
- double[][] uvTranspose = MatrixUtil.Product (MatrixUtil.Transpose (q), a);
+ double[][] uvTranspose = R1MatrixUtil.Product (R1MatrixUtil.Transpose (q), a);
NumberUtil.PrintMatrix ("R CHECK #1.1", uvTranspose);
System.out.println();
- NumberUtil.PrintMatrix ("R CHECK #1.2", MatrixUtil.Product (q, uvTranspose));
+ NumberUtil.PrintMatrix ("R CHECK #1.2", R1MatrixUtil.Product (q, uvTranspose));
System.out.println();
diff --git a/src/main/java/org/drip/sample/matrix/LinearAlgebra.java b/src/main/java/org/drip/sample/matrix/LinearAlgebra.java
index 5cb5ed20eb4d..ad9701e4caca 100644
--- a/src/main/java/org/drip/sample/matrix/LinearAlgebra.java
+++ b/src/main/java/org/drip/sample/matrix/LinearAlgebra.java
@@ -127,7 +127,7 @@ private static final void InverseVerifyDump (
final String strLabel,
final double[][] aadblA)
{
- double[][] aadblAInv = MatrixUtil.InvertUsingGaussianElimination (aadblA);
+ double[][] aadblAInv = R1MatrixUtil.InvertUsingGaussianElimination (aadblA);
System.out.println ("--- TESTS FOR " + strLabel + "---");
@@ -139,7 +139,7 @@ private static final void InverseVerifyDump (
"PRODUCT" + strLabel,
aadblA,
aadblAInv,
- MatrixUtil.Product (
+ R1MatrixUtil.Product (
aadblA,
aadblAInv
),
diff --git a/src/main/java/org/drip/sample/matrix/QRDecomposition.java b/src/main/java/org/drip/sample/matrix/QRDecomposition.java
index 5061266c0e60..e3c7c1434228 100644
--- a/src/main/java/org/drip/sample/matrix/QRDecomposition.java
+++ b/src/main/java/org/drip/sample/matrix/QRDecomposition.java
@@ -128,7 +128,7 @@ public static final void main (
{ 0.0, 0.4, 1.0}
};
- QR qr = MatrixUtil.QRDecomposition (aadblA);
+ QR qr = R1MatrixUtil.QRDecomposition (aadblA);
double[][] aadblR = qr.r();
@@ -142,11 +142,11 @@ public static final void main (
System.out.println();
- NumberUtil.PrintMatrix ("Inverse Q: ", MatrixUtil.InvertUsingGaussianElimination (aadblQ));
+ NumberUtil.PrintMatrix ("Inverse Q: ", R1MatrixUtil.InvertUsingGaussianElimination (aadblQ));
System.out.println();
- double[][] aadblQT = MatrixUtil.Transpose (aadblQ);
+ double[][] aadblQT = R1MatrixUtil.Transpose (aadblQ);
NumberUtil.PrintMatrix ("Transpose Q: ", aadblQT);
diff --git a/src/main/java/org/drip/sample/matrix/RayleighQuotient.java b/src/main/java/org/drip/sample/matrix/RayleighQuotient.java
index c99a89658f77..0a47364c9488 100644
--- a/src/main/java/org/drip/sample/matrix/RayleighQuotient.java
+++ b/src/main/java/org/drip/sample/matrix/RayleighQuotient.java
@@ -2,7 +2,7 @@
package org.drip.sample.matrix;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -184,16 +184,16 @@ public static final void main (
}
}
- eigenvector = MatrixUtil.Normalize (
- MatrixUtil.Product (
- MatrixUtil.InvertUsingGaussianElimination (deDiagonalized),
+ eigenvector = R1MatrixUtil.Normalize (
+ R1MatrixUtil.Product (
+ R1MatrixUtil.InvertUsingGaussianElimination (deDiagonalized),
eigenvector
)
);
- eigenvalue = MatrixUtil.DotProduct (
+ eigenvalue = R1MatrixUtil.DotProduct (
eigenvector,
- MatrixUtil.Product (
+ R1MatrixUtil.Product (
a,
eigenvector
)
diff --git a/src/main/java/org/drip/sample/matrix/SylvesterInterpolantReconciler.java b/src/main/java/org/drip/sample/matrix/SylvesterInterpolantReconciler.java
index 66312ca792f5..c4a3bff4794d 100644
--- a/src/main/java/org/drip/sample/matrix/SylvesterInterpolantReconciler.java
+++ b/src/main/java/org/drip/sample/matrix/SylvesterInterpolantReconciler.java
@@ -9,7 +9,7 @@
import org.drip.numerical.common.NumberUtil;
import org.drip.numerical.eigen.EigenOutput;
import org.drip.numerical.eigen.QREigenComponentExtractor;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.env.EnvManager;
/*
@@ -216,12 +216,12 @@ public static final void main (
System.out.println ("\t|-----------------------------------------|");
- double[][] recoveredA = MatrixUtil.Scale2D (
+ double[][] recoveredA = R1MatrixUtil.Scale2D (
frobeniusCovariant0,
eigenValueArray[0]
);
- double[][] recoveredA1 = MatrixUtil.Scale2D (
+ double[][] recoveredA1 = R1MatrixUtil.Scale2D (
frobeniusCovariant1,
eigenValueArray[1]
);
@@ -240,12 +240,12 @@ public static final void main (
System.out.println ("\t|------------------------------------------|");
- double[][] inverseA = MatrixUtil.Scale2D (
+ double[][] inverseA = R1MatrixUtil.Scale2D (
frobeniusCovariant0,
1. / eigenValueArray[0]
);
- double[][] inverseA1 = MatrixUtil.Scale2D (
+ double[][] inverseA1 = R1MatrixUtil.Scale2D (
frobeniusCovariant1,
1. / eigenValueArray[1]
);
@@ -266,7 +266,7 @@ public static final void main (
NumberUtil.PrintMatrix (
"\t| INVERSE MATRIX",
- MatrixUtil.Invert (
+ R1MatrixUtil.Invert (
a,
""
)
diff --git a/src/main/java/org/drip/sample/mporfixfloat/OTCPayerAggressiveTimeline.java b/src/main/java/org/drip/sample/mporfixfloat/OTCPayerAggressiveTimeline.java
index e6651d1e147c..c1c02c0dd9bb 100644
--- a/src/main/java/org/drip/sample/mporfixfloat/OTCPayerAggressiveTimeline.java
+++ b/src/main/java/org/drip/sample/mporfixfloat/OTCPayerAggressiveTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -734,7 +734,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporfixfloat/OTCPayerClassicalMinusTimeline.java b/src/main/java/org/drip/sample/mporfixfloat/OTCPayerClassicalMinusTimeline.java
index ef5ff85dc2ec..021e0dfc5c14 100644
--- a/src/main/java/org/drip/sample/mporfixfloat/OTCPayerClassicalMinusTimeline.java
+++ b/src/main/java/org/drip/sample/mporfixfloat/OTCPayerClassicalMinusTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -734,7 +734,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporfixfloat/OTCPayerClassicalPlusTimeline.java b/src/main/java/org/drip/sample/mporfixfloat/OTCPayerClassicalPlusTimeline.java
index b73ca714d301..fe8f0b824765 100644
--- a/src/main/java/org/drip/sample/mporfixfloat/OTCPayerClassicalPlusTimeline.java
+++ b/src/main/java/org/drip/sample/mporfixfloat/OTCPayerClassicalPlusTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -734,7 +734,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporfixfloat/OTCPayerConservativeTimeline.java b/src/main/java/org/drip/sample/mporfixfloat/OTCPayerConservativeTimeline.java
index 39eb8dd58f61..163bcc659ead 100644
--- a/src/main/java/org/drip/sample/mporfixfloat/OTCPayerConservativeTimeline.java
+++ b/src/main/java/org/drip/sample/mporfixfloat/OTCPayerConservativeTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -731,7 +731,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporfixfloat/OTCReceiverAggressiveTimeline.java b/src/main/java/org/drip/sample/mporfixfloat/OTCReceiverAggressiveTimeline.java
index e483062d7021..102707ea22ac 100644
--- a/src/main/java/org/drip/sample/mporfixfloat/OTCReceiverAggressiveTimeline.java
+++ b/src/main/java/org/drip/sample/mporfixfloat/OTCReceiverAggressiveTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -734,7 +734,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporfixfloat/OTCReceiverClassicalMinusTimeline.java b/src/main/java/org/drip/sample/mporfixfloat/OTCReceiverClassicalMinusTimeline.java
index cdf1edca8cf5..fcf79fa08cf9 100644
--- a/src/main/java/org/drip/sample/mporfixfloat/OTCReceiverClassicalMinusTimeline.java
+++ b/src/main/java/org/drip/sample/mporfixfloat/OTCReceiverClassicalMinusTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -734,7 +734,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporfixfloat/OTCReceiverClassicalPlusTimeline.java b/src/main/java/org/drip/sample/mporfixfloat/OTCReceiverClassicalPlusTimeline.java
index 298853986f6c..b302254261f9 100644
--- a/src/main/java/org/drip/sample/mporfixfloat/OTCReceiverClassicalPlusTimeline.java
+++ b/src/main/java/org/drip/sample/mporfixfloat/OTCReceiverClassicalPlusTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -734,7 +734,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporfixfloat/OTCReceiverConservativeTimeline.java b/src/main/java/org/drip/sample/mporfixfloat/OTCReceiverConservativeTimeline.java
index c7a543b1247c..134159a814d4 100644
--- a/src/main/java/org/drip/sample/mporfixfloat/OTCReceiverConservativeTimeline.java
+++ b/src/main/java/org/drip/sample/mporfixfloat/OTCReceiverConservativeTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -734,7 +734,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporfixfloatxva/OTCPayerCSAAggressive.java b/src/main/java/org/drip/sample/mporfixfloatxva/OTCPayerCSAAggressive.java
index 48fba2801794..c2cfd959c292 100644
--- a/src/main/java/org/drip/sample/mporfixfloatxva/OTCPayerCSAAggressive.java
+++ b/src/main/java/org/drip/sample/mporfixfloatxva/OTCPayerCSAAggressive.java
@@ -31,7 +31,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -767,7 +767,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporfixfloatxva/OTCPayerCSAClassicalMinus.java b/src/main/java/org/drip/sample/mporfixfloatxva/OTCPayerCSAClassicalMinus.java
index 9029efbace4a..6d1eeabbeef0 100644
--- a/src/main/java/org/drip/sample/mporfixfloatxva/OTCPayerCSAClassicalMinus.java
+++ b/src/main/java/org/drip/sample/mporfixfloatxva/OTCPayerCSAClassicalMinus.java
@@ -31,7 +31,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -767,7 +767,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporfixfloatxva/OTCPayerCSAClassicalPlus.java b/src/main/java/org/drip/sample/mporfixfloatxva/OTCPayerCSAClassicalPlus.java
index 57e501d24b33..16d8b3dc2859 100644
--- a/src/main/java/org/drip/sample/mporfixfloatxva/OTCPayerCSAClassicalPlus.java
+++ b/src/main/java/org/drip/sample/mporfixfloatxva/OTCPayerCSAClassicalPlus.java
@@ -31,7 +31,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -768,7 +768,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporfixfloatxva/OTCPayerCSAConservative.java b/src/main/java/org/drip/sample/mporfixfloatxva/OTCPayerCSAConservative.java
index 88f86e5c88ba..1ac83a0de077 100644
--- a/src/main/java/org/drip/sample/mporfixfloatxva/OTCPayerCSAConservative.java
+++ b/src/main/java/org/drip/sample/mporfixfloatxva/OTCPayerCSAConservative.java
@@ -31,7 +31,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -767,7 +767,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporfixfloatxva/OTCReceiverCSAAggressive.java b/src/main/java/org/drip/sample/mporfixfloatxva/OTCReceiverCSAAggressive.java
index 6eb866363ded..1fe0fac2c9f5 100644
--- a/src/main/java/org/drip/sample/mporfixfloatxva/OTCReceiverCSAAggressive.java
+++ b/src/main/java/org/drip/sample/mporfixfloatxva/OTCReceiverCSAAggressive.java
@@ -31,7 +31,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -767,7 +767,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporfixfloatxva/OTCReceiverCSAClassicalMinus.java b/src/main/java/org/drip/sample/mporfixfloatxva/OTCReceiverCSAClassicalMinus.java
index 7890f86ca47d..b1300828b4dc 100644
--- a/src/main/java/org/drip/sample/mporfixfloatxva/OTCReceiverCSAClassicalMinus.java
+++ b/src/main/java/org/drip/sample/mporfixfloatxva/OTCReceiverCSAClassicalMinus.java
@@ -31,7 +31,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -767,7 +767,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporfixfloatxva/OTCReceiverCSAClassicalPlus.java b/src/main/java/org/drip/sample/mporfixfloatxva/OTCReceiverCSAClassicalPlus.java
index 85d2be683ef9..2ce7ca598866 100644
--- a/src/main/java/org/drip/sample/mporfixfloatxva/OTCReceiverCSAClassicalPlus.java
+++ b/src/main/java/org/drip/sample/mporfixfloatxva/OTCReceiverCSAClassicalPlus.java
@@ -31,7 +31,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -767,7 +767,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporfixfloatxva/OTCReceiverCSAConservative.java b/src/main/java/org/drip/sample/mporfixfloatxva/OTCReceiverCSAConservative.java
index c78a9d6dc9f4..eb061433b613 100644
--- a/src/main/java/org/drip/sample/mporfixfloatxva/OTCReceiverCSAConservative.java
+++ b/src/main/java/org/drip/sample/mporfixfloatxva/OTCReceiverCSAConservative.java
@@ -31,7 +31,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -767,7 +767,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporstream/LongFixedAggressiveTimeline.java b/src/main/java/org/drip/sample/mporstream/LongFixedAggressiveTimeline.java
index 04846a1d3715..61d8f768740c 100644
--- a/src/main/java/org/drip/sample/mporstream/LongFixedAggressiveTimeline.java
+++ b/src/main/java/org/drip/sample/mporstream/LongFixedAggressiveTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -725,7 +725,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporstream/LongFixedClassicalMinusTimeline.java b/src/main/java/org/drip/sample/mporstream/LongFixedClassicalMinusTimeline.java
index 7c6694e6293f..b35d1877cd13 100644
--- a/src/main/java/org/drip/sample/mporstream/LongFixedClassicalMinusTimeline.java
+++ b/src/main/java/org/drip/sample/mporstream/LongFixedClassicalMinusTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -725,7 +725,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporstream/LongFixedClassicalPlusTimeline.java b/src/main/java/org/drip/sample/mporstream/LongFixedClassicalPlusTimeline.java
index 2ecaa4061522..ac4a062a7686 100644
--- a/src/main/java/org/drip/sample/mporstream/LongFixedClassicalPlusTimeline.java
+++ b/src/main/java/org/drip/sample/mporstream/LongFixedClassicalPlusTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -725,7 +725,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporstream/LongFixedConservativeTimeline.java b/src/main/java/org/drip/sample/mporstream/LongFixedConservativeTimeline.java
index 80ededb8bd1c..4d0f80bb50f2 100644
--- a/src/main/java/org/drip/sample/mporstream/LongFixedConservativeTimeline.java
+++ b/src/main/java/org/drip/sample/mporstream/LongFixedConservativeTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -725,7 +725,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporstream/LongFloatAggressiveTimeline.java b/src/main/java/org/drip/sample/mporstream/LongFloatAggressiveTimeline.java
index 47a86a75ff89..938d17c113f5 100644
--- a/src/main/java/org/drip/sample/mporstream/LongFloatAggressiveTimeline.java
+++ b/src/main/java/org/drip/sample/mporstream/LongFloatAggressiveTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -729,7 +729,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporstream/LongFloatClassicalMinusTimeline.java b/src/main/java/org/drip/sample/mporstream/LongFloatClassicalMinusTimeline.java
index a9a4c759543c..eaa90d9b3de2 100644
--- a/src/main/java/org/drip/sample/mporstream/LongFloatClassicalMinusTimeline.java
+++ b/src/main/java/org/drip/sample/mporstream/LongFloatClassicalMinusTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -729,7 +729,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporstream/LongFloatClassicalPlusTimeline.java b/src/main/java/org/drip/sample/mporstream/LongFloatClassicalPlusTimeline.java
index b3f5f81ffd5c..1a4979fd4bac 100644
--- a/src/main/java/org/drip/sample/mporstream/LongFloatClassicalPlusTimeline.java
+++ b/src/main/java/org/drip/sample/mporstream/LongFloatClassicalPlusTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -729,7 +729,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporstream/LongFloatConservativeTimeline.java b/src/main/java/org/drip/sample/mporstream/LongFloatConservativeTimeline.java
index 7862b1e01285..0a61646a3cce 100644
--- a/src/main/java/org/drip/sample/mporstream/LongFloatConservativeTimeline.java
+++ b/src/main/java/org/drip/sample/mporstream/LongFloatConservativeTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -729,7 +729,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporstream/ShortFixedAggressiveTimeline.java b/src/main/java/org/drip/sample/mporstream/ShortFixedAggressiveTimeline.java
index 0088449ad207..2ad3693a6a06 100644
--- a/src/main/java/org/drip/sample/mporstream/ShortFixedAggressiveTimeline.java
+++ b/src/main/java/org/drip/sample/mporstream/ShortFixedAggressiveTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -725,7 +725,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporstream/ShortFixedClassicalMinusTimeline.java b/src/main/java/org/drip/sample/mporstream/ShortFixedClassicalMinusTimeline.java
index 54a06c50ab04..4049389a24eb 100644
--- a/src/main/java/org/drip/sample/mporstream/ShortFixedClassicalMinusTimeline.java
+++ b/src/main/java/org/drip/sample/mporstream/ShortFixedClassicalMinusTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -725,7 +725,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporstream/ShortFixedClassicalPlusTimeline.java b/src/main/java/org/drip/sample/mporstream/ShortFixedClassicalPlusTimeline.java
index bc98f264c42e..c5457495085a 100644
--- a/src/main/java/org/drip/sample/mporstream/ShortFixedClassicalPlusTimeline.java
+++ b/src/main/java/org/drip/sample/mporstream/ShortFixedClassicalPlusTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -725,7 +725,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporstream/ShortFixedConservativeTimeline.java b/src/main/java/org/drip/sample/mporstream/ShortFixedConservativeTimeline.java
index 381e28d5e5a2..e334bcfdcd61 100644
--- a/src/main/java/org/drip/sample/mporstream/ShortFixedConservativeTimeline.java
+++ b/src/main/java/org/drip/sample/mporstream/ShortFixedConservativeTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -725,7 +725,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporstream/ShortFloatAggressiveTimeline.java b/src/main/java/org/drip/sample/mporstream/ShortFloatAggressiveTimeline.java
index 99ea35bddefa..0b9265b2e1dd 100644
--- a/src/main/java/org/drip/sample/mporstream/ShortFloatAggressiveTimeline.java
+++ b/src/main/java/org/drip/sample/mporstream/ShortFloatAggressiveTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -729,7 +729,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporstream/ShortFloatClassicalMinusTimeline.java b/src/main/java/org/drip/sample/mporstream/ShortFloatClassicalMinusTimeline.java
index 98c07119ffca..0d581b8c4f5d 100644
--- a/src/main/java/org/drip/sample/mporstream/ShortFloatClassicalMinusTimeline.java
+++ b/src/main/java/org/drip/sample/mporstream/ShortFloatClassicalMinusTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -729,7 +729,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporstream/ShortFloatClassicalPlusTimeline.java b/src/main/java/org/drip/sample/mporstream/ShortFloatClassicalPlusTimeline.java
index 4b809c540e9f..fce93004503a 100644
--- a/src/main/java/org/drip/sample/mporstream/ShortFloatClassicalPlusTimeline.java
+++ b/src/main/java/org/drip/sample/mporstream/ShortFloatClassicalPlusTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -729,7 +729,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/mporstream/ShortFloatConservativeTimeline.java b/src/main/java/org/drip/sample/mporstream/ShortFloatConservativeTimeline.java
index ba87c6ed4d39..778e83dd19fc 100644
--- a/src/main/java/org/drip/sample/mporstream/ShortFloatConservativeTimeline.java
+++ b/src/main/java/org/drip/sample/mporstream/ShortFloatConservativeTimeline.java
@@ -31,7 +31,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -729,7 +729,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/netting/PortfolioPathAggregationCorrelated.java b/src/main/java/org/drip/sample/netting/PortfolioPathAggregationCorrelated.java
index 018bbf6a400a..5170fcfb12e9 100644
--- a/src/main/java/org/drip/sample/netting/PortfolioPathAggregationCorrelated.java
+++ b/src/main/java/org/drip/sample/netting/PortfolioPathAggregationCorrelated.java
@@ -8,7 +8,7 @@
import org.drip.measure.dynamics.*;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -339,7 +339,7 @@ public static final void main (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
SequenceGenerator.GaussianJoint (
iNumStep,
aadblCorrelation
diff --git a/src/main/java/org/drip/sample/numeraire/R1JointDiffusion.java b/src/main/java/org/drip/sample/numeraire/R1JointDiffusion.java
index 071f3c2afd32..1a9d557c55b4 100644
--- a/src/main/java/org/drip/sample/numeraire/R1JointDiffusion.java
+++ b/src/main/java/org/drip/sample/numeraire/R1JointDiffusion.java
@@ -5,7 +5,7 @@
import org.drip.measure.dynamics.DiffusionEvaluatorLogarithmic;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -162,7 +162,7 @@ private static final double[][] NumeraireSequence (
System.out.println();
- return MatrixUtil.Transpose (aadblGaussianJoint);
+ return R1MatrixUtil.Transpose (aadblGaussianJoint);
}
/**
diff --git a/src/main/java/org/drip/sample/numeraire/R1JointJumpDiffusion.java b/src/main/java/org/drip/sample/numeraire/R1JointJumpDiffusion.java
index 79cd2cb43038..6d154c0e6cc1 100644
--- a/src/main/java/org/drip/sample/numeraire/R1JointJumpDiffusion.java
+++ b/src/main/java/org/drip/sample/numeraire/R1JointJumpDiffusion.java
@@ -5,7 +5,7 @@
import org.drip.measure.dynamics.*;
import org.drip.measure.process.*;
import org.drip.measure.realization.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -162,7 +162,7 @@ private static final double[][] NumeraireSequence (
System.out.println();
- return MatrixUtil.Transpose (aadblGaussianJoint);
+ return R1MatrixUtil.Transpose (aadblGaussianJoint);
}
/**
diff --git a/src/main/java/org/drip/sample/pykhtin2009/ExposurePathBrownianBridge.java b/src/main/java/org/drip/sample/pykhtin2009/ExposurePathBrownianBridge.java
index 0764d446549b..0acc877b7d4a 100644
--- a/src/main/java/org/drip/sample/pykhtin2009/ExposurePathBrownianBridge.java
+++ b/src/main/java/org/drip/sample/pykhtin2009/ExposurePathBrownianBridge.java
@@ -34,7 +34,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.CSALabel;
@@ -701,7 +701,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/pykhtin2009/ExposurePathFixFloat.java b/src/main/java/org/drip/sample/pykhtin2009/ExposurePathFixFloat.java
index 1cd2b8c309cf..be95c29af659 100644
--- a/src/main/java/org/drip/sample/pykhtin2009/ExposurePathFixFloat.java
+++ b/src/main/java/org/drip/sample/pykhtin2009/ExposurePathFixFloat.java
@@ -36,7 +36,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.rates.FixFloatComponent;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -736,7 +736,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/pykhtin2009/ExposurePathLocalVolatility.java b/src/main/java/org/drip/sample/pykhtin2009/ExposurePathLocalVolatility.java
index 868f9a20055d..686f414c622d 100644
--- a/src/main/java/org/drip/sample/pykhtin2009/ExposurePathLocalVolatility.java
+++ b/src/main/java/org/drip/sample/pykhtin2009/ExposurePathLocalVolatility.java
@@ -30,7 +30,7 @@
import org.drip.measure.dynamics.HazardJumpEvaluator;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.process.JumpDiffusionEvolver;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.CSALabel;
@@ -677,7 +677,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
)
);
diff --git a/src/main/java/org/drip/sample/securitysuite/Bhilwara.java b/src/main/java/org/drip/sample/securitysuite/Bhilwara.java
index 62eb5fa5a8b4..5230f395df3d 100644
--- a/src/main/java/org/drip/sample/securitysuite/Bhilwara.java
+++ b/src/main/java/org/drip/sample/securitysuite/Bhilwara.java
@@ -3,7 +3,7 @@
import org.drip.analytics.cashflow.CompositePeriod;
import org.drip.analytics.date.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.creator.BondBuilder;
import org.drip.product.credit.BondComponent;
import org.drip.service.common.FormatUtil;
@@ -928,7 +928,7 @@ public static final void main (
17.11,
};
- double dblIssueAmount = MatrixUtil.Sum (adblPrincipalPayDown);
+ double dblIssueAmount = R1MatrixUtil.Sum (adblPrincipalPayDown);
JulianDate dtEffective = DateUtil.CreateFromYMD (
2017,
diff --git a/src/main/java/org/drip/sample/securitysuite/Dhule.java b/src/main/java/org/drip/sample/securitysuite/Dhule.java
index 320c0ab5fcb3..908e2244f084 100644
--- a/src/main/java/org/drip/sample/securitysuite/Dhule.java
+++ b/src/main/java/org/drip/sample/securitysuite/Dhule.java
@@ -3,7 +3,7 @@
import org.drip.analytics.cashflow.CompositePeriod;
import org.drip.analytics.date.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.creator.BondBuilder;
import org.drip.product.credit.BondComponent;
import org.drip.service.common.FormatUtil;
@@ -1657,7 +1657,7 @@ public static final void main (
9.96,
};
- double dblIssueAmount = MatrixUtil.Sum (adblPrincipalPayDown);
+ double dblIssueAmount = R1MatrixUtil.Sum (adblPrincipalPayDown);
JulianDate dtEffective = DateUtil.CreateFromYMD (
2017,
diff --git a/src/main/java/org/drip/sample/securitysuite/Korba.java b/src/main/java/org/drip/sample/securitysuite/Korba.java
index 04ed6e4640f2..434956bdd7f0 100644
--- a/src/main/java/org/drip/sample/securitysuite/Korba.java
+++ b/src/main/java/org/drip/sample/securitysuite/Korba.java
@@ -3,7 +3,7 @@
import org.drip.analytics.cashflow.CompositePeriod;
import org.drip.analytics.date.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.creator.BondBuilder;
import org.drip.product.credit.BondComponent;
import org.drip.service.common.FormatUtil;
@@ -1273,7 +1273,7 @@ public static final void main (
0.00,
};
- double dblIssueAmount = MatrixUtil.Sum (adblPrincipalPayDown);
+ double dblIssueAmount = R1MatrixUtil.Sum (adblPrincipalPayDown);
JulianDate dtEffective = DateUtil.CreateFromYMD (
2017,
diff --git a/src/main/java/org/drip/sample/securitysuite/Rohtak.java b/src/main/java/org/drip/sample/securitysuite/Rohtak.java
index 676070287eeb..8da2aba3a894 100644
--- a/src/main/java/org/drip/sample/securitysuite/Rohtak.java
+++ b/src/main/java/org/drip/sample/securitysuite/Rohtak.java
@@ -3,7 +3,7 @@
import org.drip.analytics.cashflow.CompositePeriod;
import org.drip.analytics.date.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.creator.BondBuilder;
import org.drip.product.credit.BondComponent;
import org.drip.service.common.FormatUtil;
@@ -1657,7 +1657,7 @@ public static final void main (
3.21,
};
- double dblIssueAmount = MatrixUtil.Sum (adblPrincipalPayDown);
+ double dblIssueAmount = R1MatrixUtil.Sum (adblPrincipalPayDown);
JulianDate dtEffective = DateUtil.CreateFromYMD (
2017,
diff --git a/src/main/java/org/drip/sample/securitysuite/Tirupati.java b/src/main/java/org/drip/sample/securitysuite/Tirupati.java
index 8e498a82402c..0deb393e8e46 100644
--- a/src/main/java/org/drip/sample/securitysuite/Tirupati.java
+++ b/src/main/java/org/drip/sample/securitysuite/Tirupati.java
@@ -3,7 +3,7 @@
import org.drip.analytics.cashflow.CompositePeriod;
import org.drip.analytics.date.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.product.creator.BondBuilder;
import org.drip.product.credit.BondComponent;
import org.drip.service.common.FormatUtil;
@@ -1657,7 +1657,7 @@ public static final void main (
4.88,
};
- double dblIssueAmount = MatrixUtil.Sum (adblPrincipalPayDown);
+ double dblIssueAmount = R1MatrixUtil.Sum (adblPrincipalPayDown);
JulianDate dtEffective = DateUtil.CreateFromYMD (
2017,
diff --git a/src/main/java/org/drip/sample/simmvariance/CrossGroupPrincipalCovariance.java b/src/main/java/org/drip/sample/simmvariance/CrossGroupPrincipalCovariance.java
index 203a3ceeb29b..5ff79079bdb7 100644
--- a/src/main/java/org/drip/sample/simmvariance/CrossGroupPrincipalCovariance.java
+++ b/src/main/java/org/drip/sample/simmvariance/CrossGroupPrincipalCovariance.java
@@ -4,7 +4,7 @@
import org.drip.numerical.common.NumberUtil;
import org.drip.numerical.eigen.EigenComponent;
import org.drip.numerical.eigen.PowerIterationComponentExtractor;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
@@ -225,7 +225,7 @@ public static final void main (
System.out.println();
- double[][] unadjustedOffDiagonalBlockMatrix = MatrixUtil.CrossProduct (
+ double[][] unadjustedOffDiagonalBlockMatrix = R1MatrixUtil.CrossProduct (
scaledEigenvector,
scaledEigenvector
);
@@ -249,7 +249,7 @@ public static final void main (
System.out.println();
- double[][] adjustedOffDiagonalBlockMatrix = MatrixUtil.Scale2D (
+ double[][] adjustedOffDiagonalBlockMatrix = R1MatrixUtil.Scale2D (
unadjustedOffDiagonalBlockMatrix,
crossBucketCorrelation
);
diff --git a/src/main/java/org/drip/sample/sor/DULDecomposition.java b/src/main/java/org/drip/sample/sor/DULDecomposition.java
index 24a533bd05a0..a63efae591c8 100644
--- a/src/main/java/org/drip/sample/sor/DULDecomposition.java
+++ b/src/main/java/org/drip/sample/sor/DULDecomposition.java
@@ -2,7 +2,7 @@
package org.drip.sample.sor;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.env.EnvManager;
/*
@@ -153,7 +153,7 @@ public static final void main (
"\t| SQUARE",
" JACOBI ITERATION",
squareMatrix,
- MatrixUtil.JacobiIteration (squareMatrix),
+ R1MatrixUtil.JacobiIteration (squareMatrix),
false
);
@@ -173,7 +173,7 @@ public static final void main (
"\t| SQUARE",
" DIAGONAL",
squareMatrix,
- MatrixUtil.Diagonal (squareMatrix),
+ R1MatrixUtil.Diagonal (squareMatrix),
false
);
@@ -193,7 +193,7 @@ public static final void main (
"\t| SQUARE",
" LOWER TRIANGULAR",
squareMatrix,
- MatrixUtil.StrictlyLowerTriangular (squareMatrix),
+ R1MatrixUtil.StrictlyLowerTriangular (squareMatrix),
false
);
@@ -213,7 +213,7 @@ public static final void main (
"\t| SQUARE",
" UPPER TRIANGULAR",
squareMatrix,
- MatrixUtil.StrictlyUpperTriangular (squareMatrix),
+ R1MatrixUtil.StrictlyUpperTriangular (squareMatrix),
false
);
diff --git a/src/main/java/org/drip/sample/sor/MatrixConditioningChecks.java b/src/main/java/org/drip/sample/sor/MatrixConditioningChecks.java
index 3f197431fa85..ce43ed26f243 100644
--- a/src/main/java/org/drip/sample/sor/MatrixConditioningChecks.java
+++ b/src/main/java/org/drip/sample/sor/MatrixConditioningChecks.java
@@ -1,7 +1,7 @@
package org.drip.sample.sor;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.StringUtil;
import org.drip.service.env.EnvManager;
@@ -170,16 +170,16 @@ public static final void main (
System.out.println (
"\t| Is Matrix Square? => " +
- StringUtil.ToString (MatrixUtil.IsSquare (squareMatrix)) + " | " +
- StringUtil.ToString (MatrixUtil.IsSquare (nonSquareMatrix)) + " | " +
- StringUtil.ToString (MatrixUtil.IsSquare (squareSymmetricMatrix)) + " ||"
+ StringUtil.ToString (R1MatrixUtil.IsSquare (squareMatrix)) + " | " +
+ StringUtil.ToString (R1MatrixUtil.IsSquare (nonSquareMatrix)) + " | " +
+ StringUtil.ToString (R1MatrixUtil.IsSquare (squareSymmetricMatrix)) + " ||"
);
System.out.println (
"\t| Is Matrix Square Symmetric? => " +
- StringUtil.ToString (MatrixUtil.IsSquareSymmetric (squareMatrix)) + " | " +
- StringUtil.ToString (MatrixUtil.IsSquareSymmetric (nonSquareMatrix)) + " | " +
- StringUtil.ToString (MatrixUtil.IsSquareSymmetric (squareSymmetricMatrix)) + " ||"
+ StringUtil.ToString (R1MatrixUtil.IsSquareSymmetric (squareMatrix)) + " | " +
+ StringUtil.ToString (R1MatrixUtil.IsSquareSymmetric (nonSquareMatrix)) + " | " +
+ StringUtil.ToString (R1MatrixUtil.IsSquareSymmetric (squareSymmetricMatrix)) + " ||"
);
System.out.println ("\t|------------------------------------------------------||");
diff --git a/src/main/java/org/drip/sample/triangular/AtomicLowerUnitriangular.java b/src/main/java/org/drip/sample/triangular/AtomicLowerUnitriangular.java
index 8946cb6c094d..3bccb8f826c8 100644
--- a/src/main/java/org/drip/sample/triangular/AtomicLowerUnitriangular.java
+++ b/src/main/java/org/drip/sample/triangular/AtomicLowerUnitriangular.java
@@ -5,7 +5,7 @@
import org.drip.measure.crng.RandomMatrixGenerator;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.TriangularMatrix;
+import org.drip.numerical.matrix.R1Triangular;
import org.drip.service.common.FormatUtil;
import org.drip.service.common.StringUtil;
import org.drip.service.env.EnvManager;
@@ -128,7 +128,7 @@ private static final void Trial (
final double maximumElement)
throws Exception
{
- TriangularMatrix atomicLowerTriangular = RandomMatrixGenerator.AtomicLowerTriangular (
+ R1Triangular atomicLowerTriangular = RandomMatrixGenerator.AtomicLowerTriangular (
elementCount,
maximumElement,
true
diff --git a/src/main/java/org/drip/sample/triangular/AtomicUpperUnitriangular.java b/src/main/java/org/drip/sample/triangular/AtomicUpperUnitriangular.java
index 9f7528cd6d2c..01e6e340e41a 100644
--- a/src/main/java/org/drip/sample/triangular/AtomicUpperUnitriangular.java
+++ b/src/main/java/org/drip/sample/triangular/AtomicUpperUnitriangular.java
@@ -5,7 +5,7 @@
import org.drip.measure.crng.RandomMatrixGenerator;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.TriangularMatrix;
+import org.drip.numerical.matrix.R1Triangular;
import org.drip.service.common.FormatUtil;
import org.drip.service.common.StringUtil;
import org.drip.service.env.EnvManager;
@@ -128,7 +128,7 @@ private static final void Trial (
final double maximumElement)
throws Exception
{
- TriangularMatrix atomicUpperTriangular = RandomMatrixGenerator.AtomicUpperTriangular (
+ R1Triangular atomicUpperTriangular = RandomMatrixGenerator.AtomicUpperTriangular (
elementCount,
maximumElement,
true
diff --git a/src/main/java/org/drip/sample/triangular/Diagonal.java b/src/main/java/org/drip/sample/triangular/Diagonal.java
index 0bccc9a45c15..e71e45ad1203 100644
--- a/src/main/java/org/drip/sample/triangular/Diagonal.java
+++ b/src/main/java/org/drip/sample/triangular/Diagonal.java
@@ -5,7 +5,7 @@
import org.drip.measure.crng.RandomMatrixGenerator;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.TriangularMatrix;
+import org.drip.numerical.matrix.R1Triangular;
import org.drip.service.common.FormatUtil;
import org.drip.service.common.StringUtil;
import org.drip.service.env.EnvManager;
@@ -128,7 +128,7 @@ private static final void Trial (
final double maximumElement)
throws Exception
{
- TriangularMatrix diagonal = RandomMatrixGenerator.Diagonal (elementCount, maximumElement, true);
+ R1Triangular diagonal = RandomMatrixGenerator.Diagonal (elementCount, maximumElement, true);
System.out.println (
"\t|----------------------------------------------------------------------------------||"
diff --git a/src/main/java/org/drip/sample/triangular/Lower.java b/src/main/java/org/drip/sample/triangular/Lower.java
index b357ef9f0861..76cbfab3f8ea 100644
--- a/src/main/java/org/drip/sample/triangular/Lower.java
+++ b/src/main/java/org/drip/sample/triangular/Lower.java
@@ -5,7 +5,7 @@
import org.drip.measure.crng.RandomMatrixGenerator;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.TriangularMatrix;
+import org.drip.numerical.matrix.R1Triangular;
import org.drip.service.common.FormatUtil;
import org.drip.service.common.StringUtil;
import org.drip.service.env.EnvManager;
@@ -128,7 +128,7 @@ private static final void Trial (
final double maximumElement)
throws Exception
{
- TriangularMatrix lowerTriangular = RandomMatrixGenerator.LowerTriangular (
+ R1Triangular lowerTriangular = RandomMatrixGenerator.LowerTriangular (
elementCount,
maximumElement,
true
diff --git a/src/main/java/org/drip/sample/triangular/LowerSolverSuite.java b/src/main/java/org/drip/sample/triangular/LowerSolverSuite.java
index dec8863c4d99..e3f8696258d2 100644
--- a/src/main/java/org/drip/sample/triangular/LowerSolverSuite.java
+++ b/src/main/java/org/drip/sample/triangular/LowerSolverSuite.java
@@ -6,9 +6,9 @@
import org.drip.measure.crng.RandomMatrixGenerator;
import org.drip.measure.crng.RdRandomSequence;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.MatrixUtil;
-import org.drip.numerical.linearalgebra.TriangularMatrix;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.numerical.linearsolver.TriangularScheme;
+import org.drip.numerical.matrix.R1Triangular;
import org.drip.service.env.EnvManager;
/*
@@ -131,7 +131,7 @@ private static final void Trial (
{
double[] xArray = RdRandomSequence.OneD (elementCount, maximumElement, true);
- TriangularMatrix lowerTriangularMatrix = RandomMatrixGenerator.LowerTriangular (
+ R1Triangular lowerTriangularMatrix = RandomMatrixGenerator.LowerTriangular (
elementCount,
maximumElement,
true
@@ -165,7 +165,7 @@ private static final void Trial (
"\t|----------------------------------------------------------------------------------||"
);
- double[] rhsArray = MatrixUtil.Product (lowerTriangularR2Array, xArray);
+ double[] rhsArray = R1MatrixUtil.Product (lowerTriangularR2Array, xArray);
System.out.println (
"\t| RHS Input {" + NumberUtil.ArrayRow (rhsArray, 5, 0, false) + "} ||"
@@ -183,7 +183,7 @@ private static final void Trial (
"\t| Expected => " +
NumberUtil.ArrayRow (
new TriangularScheme (
- TriangularMatrix.Standard (lowerTriangularR2Array),
+ R1Triangular.Standard (lowerTriangularR2Array),
rhsArray
).solve(),
2,
diff --git a/src/main/java/org/drip/sample/triangular/LowerUnitriangular.java b/src/main/java/org/drip/sample/triangular/LowerUnitriangular.java
index 1b0d851124c9..165005fcc48a 100644
--- a/src/main/java/org/drip/sample/triangular/LowerUnitriangular.java
+++ b/src/main/java/org/drip/sample/triangular/LowerUnitriangular.java
@@ -5,7 +5,7 @@
import org.drip.measure.crng.RandomMatrixGenerator;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.TriangularMatrix;
+import org.drip.numerical.matrix.R1Triangular;
import org.drip.service.common.FormatUtil;
import org.drip.service.common.StringUtil;
import org.drip.service.env.EnvManager;
@@ -128,7 +128,7 @@ private static final void Trial (
final double maximumElement)
throws Exception
{
- TriangularMatrix lowerUnitriangular = RandomMatrixGenerator.LowerUnitriangular (
+ R1Triangular lowerUnitriangular = RandomMatrixGenerator.LowerUnitriangular (
elementCount,
maximumElement,
true
diff --git a/src/main/java/org/drip/sample/triangular/StrictlyLower.java b/src/main/java/org/drip/sample/triangular/StrictlyLower.java
index 992fa571c4b5..889a5fd9a652 100644
--- a/src/main/java/org/drip/sample/triangular/StrictlyLower.java
+++ b/src/main/java/org/drip/sample/triangular/StrictlyLower.java
@@ -5,7 +5,7 @@
import org.drip.measure.crng.RandomMatrixGenerator;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.TriangularMatrix;
+import org.drip.numerical.matrix.R1Triangular;
import org.drip.service.common.FormatUtil;
import org.drip.service.common.StringUtil;
import org.drip.service.env.EnvManager;
@@ -128,7 +128,7 @@ private static final void Trial (
final double maximumElement)
throws Exception
{
- TriangularMatrix strictlyLowerTriangular = RandomMatrixGenerator.StrictlyLowerTriangular (
+ R1Triangular strictlyLowerTriangular = RandomMatrixGenerator.StrictlyLowerTriangular (
elementCount,
maximumElement,
true
diff --git a/src/main/java/org/drip/sample/triangular/StrictlyUpper.java b/src/main/java/org/drip/sample/triangular/StrictlyUpper.java
index 4397f317b9a3..a6a69c051c48 100644
--- a/src/main/java/org/drip/sample/triangular/StrictlyUpper.java
+++ b/src/main/java/org/drip/sample/triangular/StrictlyUpper.java
@@ -5,7 +5,7 @@
import org.drip.measure.crng.RandomMatrixGenerator;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.TriangularMatrix;
+import org.drip.numerical.matrix.R1Triangular;
import org.drip.service.common.FormatUtil;
import org.drip.service.common.StringUtil;
import org.drip.service.env.EnvManager;
@@ -128,7 +128,7 @@ private static final void Trial (
final double maximumElement)
throws Exception
{
- TriangularMatrix strictlyUpperTriangular = RandomMatrixGenerator.StrictlyUpperTriangular (
+ R1Triangular strictlyUpperTriangular = RandomMatrixGenerator.StrictlyUpperTriangular (
elementCount,
maximumElement,
true
diff --git a/src/main/java/org/drip/sample/triangular/Upper.java b/src/main/java/org/drip/sample/triangular/Upper.java
index b27f1e880647..0b819da7c539 100644
--- a/src/main/java/org/drip/sample/triangular/Upper.java
+++ b/src/main/java/org/drip/sample/triangular/Upper.java
@@ -5,7 +5,7 @@
import org.drip.measure.crng.RandomMatrixGenerator;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.TriangularMatrix;
+import org.drip.numerical.matrix.R1Triangular;
import org.drip.service.common.FormatUtil;
import org.drip.service.common.StringUtil;
import org.drip.service.env.EnvManager;
@@ -128,7 +128,7 @@ private static final void Trial (
final double maximumElement)
throws Exception
{
- TriangularMatrix upperTriangular = RandomMatrixGenerator.UpperTriangular (
+ R1Triangular upperTriangular = RandomMatrixGenerator.UpperTriangular (
elementCount,
maximumElement,
true
diff --git a/src/main/java/org/drip/sample/triangular/UpperSolverSuite.java b/src/main/java/org/drip/sample/triangular/UpperSolverSuite.java
index a9901db6fa39..f2a1dbe0b3df 100644
--- a/src/main/java/org/drip/sample/triangular/UpperSolverSuite.java
+++ b/src/main/java/org/drip/sample/triangular/UpperSolverSuite.java
@@ -6,9 +6,9 @@
import org.drip.measure.crng.RandomMatrixGenerator;
import org.drip.measure.crng.RdRandomSequence;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.MatrixUtil;
-import org.drip.numerical.linearalgebra.TriangularMatrix;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.numerical.linearsolver.TriangularScheme;
+import org.drip.numerical.matrix.R1Triangular;
import org.drip.service.env.EnvManager;
/*
@@ -131,7 +131,7 @@ private static final void Trial (
{
double[] xArray = RdRandomSequence.OneD (elementCount, maximumElement, true);
- TriangularMatrix upperTriangularMatrix = RandomMatrixGenerator.UpperTriangular (
+ R1Triangular upperTriangularMatrix = RandomMatrixGenerator.UpperTriangular (
elementCount,
maximumElement,
true
@@ -165,7 +165,7 @@ private static final void Trial (
"\t|----------------------------------------------------------------------------------||"
);
- double[] rhsArray = MatrixUtil.Product (upperTriangularR2Array, xArray);
+ double[] rhsArray = R1MatrixUtil.Product (upperTriangularR2Array, xArray);
System.out.println (
"\t| RHS Input {" + NumberUtil.ArrayRow (rhsArray, 5, 0, false) + "} ||"
@@ -183,7 +183,7 @@ private static final void Trial (
"\t| Expected => " +
NumberUtil.ArrayRow (
new TriangularScheme (
- TriangularMatrix.Standard (upperTriangularR2Array),
+ R1Triangular.Standard (upperTriangularR2Array),
rhsArray
).solve(),
2,
diff --git a/src/main/java/org/drip/sample/triangular/UpperUnitriangular.java b/src/main/java/org/drip/sample/triangular/UpperUnitriangular.java
index dfb69553f5f5..c92e8de22dbe 100644
--- a/src/main/java/org/drip/sample/triangular/UpperUnitriangular.java
+++ b/src/main/java/org/drip/sample/triangular/UpperUnitriangular.java
@@ -5,7 +5,7 @@
import org.drip.measure.crng.RandomMatrixGenerator;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.TriangularMatrix;
+import org.drip.numerical.matrix.R1Triangular;
import org.drip.service.common.FormatUtil;
import org.drip.service.common.StringUtil;
import org.drip.service.env.EnvManager;
@@ -128,7 +128,7 @@ private static final void Trial (
final double maximumElement)
throws Exception
{
- TriangularMatrix upperUnitriangular = RandomMatrixGenerator.UpperUnitriangular (
+ R1Triangular upperUnitriangular = RandomMatrixGenerator.UpperUnitriangular (
elementCount,
maximumElement,
true
diff --git a/src/main/java/org/drip/sample/tridiagonal/NonPeriodicSolverSuite.java b/src/main/java/org/drip/sample/tridiagonal/NonPeriodicSolverSuite.java
index f223998fb626..2d982089960f 100644
--- a/src/main/java/org/drip/sample/tridiagonal/NonPeriodicSolverSuite.java
+++ b/src/main/java/org/drip/sample/tridiagonal/NonPeriodicSolverSuite.java
@@ -5,7 +5,7 @@
import org.drip.measure.crng.RdRandomSequence;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.numerical.linearsolver.NonPeriodicTridiagonalScheme;
import org.drip.service.env.EnvManager;
@@ -152,7 +152,7 @@ private static final void Trial (
System.out.println ("\t|-----------------------------------------------------------------||");
- double[] rhsArray = MatrixUtil.Product (tridiagonalMatrix, xArray);
+ double[] rhsArray = R1MatrixUtil.Product (tridiagonalMatrix, xArray);
System.out.println (
"\t| RHS Input {" + NumberUtil.ArrayRow (rhsArray, 5, 0, false) + "} ||"
diff --git a/src/main/java/org/drip/sample/tridiagonal/PeriodicRyabenkiiTsynkovSolverSuite.java b/src/main/java/org/drip/sample/tridiagonal/PeriodicRyabenkiiTsynkovSolverSuite.java
index 890068d17415..cd299e7fa0f9 100644
--- a/src/main/java/org/drip/sample/tridiagonal/PeriodicRyabenkiiTsynkovSolverSuite.java
+++ b/src/main/java/org/drip/sample/tridiagonal/PeriodicRyabenkiiTsynkovSolverSuite.java
@@ -5,7 +5,7 @@
import org.drip.measure.crng.RdRandomSequence;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.numerical.linearsolver.RyabenkiiTsynkovScheme;
import org.drip.service.env.EnvManager;
@@ -155,7 +155,7 @@ private static final void Trial (
);
}
- double[] rhsArray = MatrixUtil.Product (periodicTridiagonalMatrix, xArray);
+ double[] rhsArray = R1MatrixUtil.Product (periodicTridiagonalMatrix, xArray);
System.out.println ("\t|-----------------------------------------------------------------||");
diff --git a/src/main/java/org/drip/sample/tridiagonal/PeriodicShermanMorrisonSolverSuite.java b/src/main/java/org/drip/sample/tridiagonal/PeriodicShermanMorrisonSolverSuite.java
index 5287634c3131..e3f84dadff6b 100644
--- a/src/main/java/org/drip/sample/tridiagonal/PeriodicShermanMorrisonSolverSuite.java
+++ b/src/main/java/org/drip/sample/tridiagonal/PeriodicShermanMorrisonSolverSuite.java
@@ -5,7 +5,7 @@
import org.drip.measure.crng.RdRandomSequence;
import org.drip.numerical.common.NumberUtil;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.numerical.linearsolver.ShermanMorrisonScheme;
import org.drip.service.env.EnvManager;
@@ -155,7 +155,7 @@ private static final void Trial (
);
}
- double[] rhsArray = MatrixUtil.Product (periodicTridiagonalMatrix, xArray);
+ double[] rhsArray = R1MatrixUtil.Product (periodicTridiagonalMatrix, xArray);
System.out.println ("\t|-----------------------------------------------------------------||");
diff --git a/src/main/java/org/drip/sample/xva/CollateralizedCollateralGroupCorrelated.java b/src/main/java/org/drip/sample/xva/CollateralizedCollateralGroupCorrelated.java
index 3b863486cba6..12492a0a3a41 100644
--- a/src/main/java/org/drip/sample/xva/CollateralizedCollateralGroupCorrelated.java
+++ b/src/main/java/org/drip/sample/xva/CollateralizedCollateralGroupCorrelated.java
@@ -10,7 +10,7 @@
import org.drip.measure.dynamics.*;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -424,7 +424,7 @@ public static final void main (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
SequenceGenerator.GaussianJoint (
iNumStep,
aadblCorrelation
diff --git a/src/main/java/org/drip/sample/xva/UncollateralizedCollateralGroupCorrelated.java b/src/main/java/org/drip/sample/xva/UncollateralizedCollateralGroupCorrelated.java
index 77ab8ffff8fa..04c801fadf17 100644
--- a/src/main/java/org/drip/sample/xva/UncollateralizedCollateralGroupCorrelated.java
+++ b/src/main/java/org/drip/sample/xva/UncollateralizedCollateralGroupCorrelated.java
@@ -8,7 +8,7 @@
import org.drip.measure.dynamics.*;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -406,7 +406,7 @@ public static final void main (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
SequenceGenerator.GaussianJoint (
iNumStep,
aadblCorrelation
diff --git a/src/main/java/org/drip/sample/xva/ZeroThresholdCollateralGroupCorrelated.java b/src/main/java/org/drip/sample/xva/ZeroThresholdCollateralGroupCorrelated.java
index ae2239549e73..b77baea22364 100644
--- a/src/main/java/org/drip/sample/xva/ZeroThresholdCollateralGroupCorrelated.java
+++ b/src/main/java/org/drip/sample/xva/ZeroThresholdCollateralGroupCorrelated.java
@@ -10,7 +10,7 @@
import org.drip.measure.dynamics.*;
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -419,7 +419,7 @@ public static final void main (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
SequenceGenerator.GaussianJoint (
iNumStep,
aadblCorrelation
diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralNeutralStochastic.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralNeutralStochastic.java
index 32f744aca1a4..645b44cecd3e 100644
--- a/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralNeutralStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralNeutralStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -443,7 +443,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralPayableStochastic.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralPayableStochastic.java
index 7c37ed300abb..04f665f8a4d3 100644
--- a/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralPayableStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralPayableStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -443,7 +443,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralReceivableStochastic.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralReceivableStochastic.java
index 94743fc6210c..43d75e3bcf30 100644
--- a/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralReceivableStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralReceivableStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -443,7 +443,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingNeutralStochastic.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingNeutralStochastic.java
index f3f4ddf5d4ea..050527459b15 100644
--- a/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingNeutralStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingNeutralStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -443,7 +443,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingPayableStochastic.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingPayableStochastic.java
index 7644cd6f87bf..620ae272172d 100644
--- a/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingPayableStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingPayableStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -443,7 +443,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingReceivableStochastic.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingReceivableStochastic.java
index 8d1c3d0145b9..6e3bae4ef34a 100644
--- a/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingReceivableStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingReceivableStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -443,7 +443,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingNeutralStochastic.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingNeutralStochastic.java
index 55523535ee01..d71d4fd0a692 100644
--- a/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingNeutralStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingNeutralStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -443,7 +443,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingPayableStochastic.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingPayableStochastic.java
index 28b5ed93368f..0900eb7d138f 100644
--- a/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingPayableStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingPayableStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -443,7 +443,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingReceivableStochastic.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingReceivableStochastic.java
index 8a233fcd2bf1..e66659366881 100644
--- a/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingReceivableStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingReceivableStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -443,7 +443,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralNeutralStochastic.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralNeutralStochastic.java
index 10c06d1687f5..3010bb2837e3 100644
--- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralNeutralStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralNeutralStochastic.java
@@ -10,7 +10,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -428,7 +428,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralPayableStochastic.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralPayableStochastic.java
index 8b85976602ee..f63e3b052e86 100644
--- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralPayableStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralPayableStochastic.java
@@ -10,7 +10,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -428,7 +428,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralReceivableStochastic.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralReceivableStochastic.java
index ba8526db28bd..1c42511c1e0a 100644
--- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralReceivableStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralReceivableStochastic.java
@@ -10,7 +10,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -429,7 +429,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingNeutralStochastic.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingNeutralStochastic.java
index 8d25e5dd8b26..752a10760dc6 100644
--- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingNeutralStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingNeutralStochastic.java
@@ -10,7 +10,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -430,7 +430,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingPayableStochastic.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingPayableStochastic.java
index e6767265046c..1d61ecb04998 100644
--- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingPayableStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingPayableStochastic.java
@@ -10,7 +10,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -428,7 +428,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingReceivableStochastic.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingReceivableStochastic.java
index 6cd6564edc71..bda73f86e337 100644
--- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingReceivableStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingReceivableStochastic.java
@@ -10,7 +10,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -428,7 +428,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingNeutralStochastic.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingNeutralStochastic.java
index e1328275bae8..166599581bae 100644
--- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingNeutralStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingNeutralStochastic.java
@@ -10,7 +10,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -428,7 +428,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingPayableStochastic.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingPayableStochastic.java
index 474dd7cc54dd..d1ab2fb1d9e3 100644
--- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingPayableStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingPayableStochastic.java
@@ -10,7 +10,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -428,7 +428,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingReceivableStochastic.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingReceivableStochastic.java
index 0cf57f264f61..79fbb1ab8c54 100644
--- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingReceivableStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingReceivableStochastic.java
@@ -10,7 +10,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -428,7 +428,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralNeutralStochastic.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralNeutralStochastic.java
index affe1e79e52d..3aee18716251 100644
--- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralNeutralStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralNeutralStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -443,7 +443,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralPayableStochastic.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralPayableStochastic.java
index 29e078ba13a3..dd4a692f283d 100644
--- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralPayableStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralPayableStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -443,7 +443,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralReceivableStochastic.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralReceivableStochastic.java
index 3d6d3e2dcf01..a6fa97422615 100644
--- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralReceivableStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralReceivableStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -443,7 +443,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingNeutralStochastic.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingNeutralStochastic.java
index 551d321a0010..e9d9f89a6e70 100644
--- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingNeutralStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingNeutralStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -443,7 +443,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingPayableStochastic.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingPayableStochastic.java
index bb598f829fb3..028a87d13467 100644
--- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingPayableStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingPayableStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -444,7 +444,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingReceivableStochastic.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingReceivableStochastic.java
index 3109fbd97156..1ece6c5651c8 100644
--- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingReceivableStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingReceivableStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -443,7 +443,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingNeutralStochastic.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingNeutralStochastic.java
index 77f5fc99379e..334d82ed03f0 100644
--- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingNeutralStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingNeutralStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -444,7 +444,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingPayableStochastic.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingPayableStochastic.java
index 6467d543982f..073742e1f988 100644
--- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingPayableStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingPayableStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -443,7 +443,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingReceivableStochastic.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingReceivableStochastic.java
index da6276cb734d..ca4fd9a29d48 100644
--- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingReceivableStochastic.java
+++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingReceivableStochastic.java
@@ -12,7 +12,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -442,7 +442,7 @@ private static final ExposureAdjustmentAggregator[] Mix (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
Path (
aadblCorrelation,
iNumVertex
diff --git a/src/main/java/org/drip/sample/xvadigest/CPGACollateralizedCorrelated.java b/src/main/java/org/drip/sample/xvadigest/CPGACollateralizedCorrelated.java
index b2c0b48bbff9..a01ba8e18b76 100644
--- a/src/main/java/org/drip/sample/xvadigest/CPGACollateralizedCorrelated.java
+++ b/src/main/java/org/drip/sample/xvadigest/CPGACollateralizedCorrelated.java
@@ -11,7 +11,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -491,7 +491,7 @@ public static final void main (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
SequenceGenerator.GaussianJoint (
iNumStep,
aadblCorrelation
diff --git a/src/main/java/org/drip/sample/xvadigest/CPGAUncollateralizedCorrelated.java b/src/main/java/org/drip/sample/xvadigest/CPGAUncollateralizedCorrelated.java
index 73f3484160ec..97b33386d5d7 100644
--- a/src/main/java/org/drip/sample/xvadigest/CPGAUncollateralizedCorrelated.java
+++ b/src/main/java/org/drip/sample/xvadigest/CPGAUncollateralizedCorrelated.java
@@ -9,7 +9,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -473,7 +473,7 @@ public static final void main (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
SequenceGenerator.GaussianJoint (
iNumStep,
aadblCorrelation
diff --git a/src/main/java/org/drip/sample/xvadigest/CPGAZeroThresholdCorrelated.java b/src/main/java/org/drip/sample/xvadigest/CPGAZeroThresholdCorrelated.java
index 66cd75124925..dc3f04d0983f 100644
--- a/src/main/java/org/drip/sample/xvadigest/CPGAZeroThresholdCorrelated.java
+++ b/src/main/java/org/drip/sample/xvadigest/CPGAZeroThresholdCorrelated.java
@@ -11,7 +11,7 @@
import org.drip.measure.process.DiffusionEvolver;
import org.drip.measure.realization.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.state.identifier.OTCFixFloatLabel;
@@ -486,7 +486,7 @@ public static final void main (
);
for (int i = 0; i < iNumPath; ++i) {
- double[][] aadblNumeraire = MatrixUtil.Transpose (
+ double[][] aadblNumeraire = R1MatrixUtil.Transpose (
SequenceGenerator.GaussianJoint (
iNumStep,
aadblCorrelation
diff --git a/src/main/java/org/drip/sample/xvafixfloat/AlbaneseAndersenBaselProxy.java b/src/main/java/org/drip/sample/xvafixfloat/AlbaneseAndersenBaselProxy.java
index b80aba46ba1d..a980fa9f38e0 100644
--- a/src/main/java/org/drip/sample/xvafixfloat/AlbaneseAndersenBaselProxy.java
+++ b/src/main/java/org/drip/sample/xvafixfloat/AlbaneseAndersenBaselProxy.java
@@ -13,7 +13,7 @@
import org.drip.measure.dynamics.*;
import org.drip.measure.process.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.common.StringUtil;
import org.drip.service.env.EnvManager;
@@ -795,7 +795,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
);
}
diff --git a/src/main/java/org/drip/sample/xvafixfloat/GoldPlatedBaselProxy.java b/src/main/java/org/drip/sample/xvafixfloat/GoldPlatedBaselProxy.java
index bf0655deb5b8..16763375e2f8 100644
--- a/src/main/java/org/drip/sample/xvafixfloat/GoldPlatedBaselProxy.java
+++ b/src/main/java/org/drip/sample/xvafixfloat/GoldPlatedBaselProxy.java
@@ -13,7 +13,7 @@
import org.drip.measure.dynamics.*;
import org.drip.measure.process.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.common.StringUtil;
import org.drip.service.env.EnvManager;
@@ -832,7 +832,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
);
}
diff --git a/src/main/java/org/drip/sample/xvafixfloat/HedgeErrorBaselProxy.java b/src/main/java/org/drip/sample/xvafixfloat/HedgeErrorBaselProxy.java
index adfe1f51a10e..0c6cd4589256 100644
--- a/src/main/java/org/drip/sample/xvafixfloat/HedgeErrorBaselProxy.java
+++ b/src/main/java/org/drip/sample/xvafixfloat/HedgeErrorBaselProxy.java
@@ -13,7 +13,7 @@
import org.drip.measure.dynamics.*;
import org.drip.measure.process.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.common.StringUtil;
import org.drip.service.env.EnvManager;
@@ -832,7 +832,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
);
}
diff --git a/src/main/java/org/drip/sample/xvafixfloat/OneWayBaselProxy.java b/src/main/java/org/drip/sample/xvafixfloat/OneWayBaselProxy.java
index 54809f3c1352..ebfd2eabbbb1 100644
--- a/src/main/java/org/drip/sample/xvafixfloat/OneWayBaselProxy.java
+++ b/src/main/java/org/drip/sample/xvafixfloat/OneWayBaselProxy.java
@@ -13,7 +13,7 @@
import org.drip.measure.dynamics.*;
import org.drip.measure.process.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.common.StringUtil;
import org.drip.service.env.EnvManager;
@@ -832,7 +832,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
);
}
diff --git a/src/main/java/org/drip/sample/xvafixfloat/SemiReplicationBaselProxy.java b/src/main/java/org/drip/sample/xvafixfloat/SemiReplicationBaselProxy.java
index 160ccff656fe..4016f794e8ee 100644
--- a/src/main/java/org/drip/sample/xvafixfloat/SemiReplicationBaselProxy.java
+++ b/src/main/java/org/drip/sample/xvafixfloat/SemiReplicationBaselProxy.java
@@ -13,7 +13,7 @@
import org.drip.measure.dynamics.*;
import org.drip.measure.process.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.common.StringUtil;
import org.drip.service.env.EnvManager;
@@ -832,7 +832,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
);
}
diff --git a/src/main/java/org/drip/sample/xvafixfloat/SetOffBaselProxy.java b/src/main/java/org/drip/sample/xvafixfloat/SetOffBaselProxy.java
index ad62aeccce17..42c4d6585ab3 100644
--- a/src/main/java/org/drip/sample/xvafixfloat/SetOffBaselProxy.java
+++ b/src/main/java/org/drip/sample/xvafixfloat/SetOffBaselProxy.java
@@ -13,7 +13,7 @@
import org.drip.measure.dynamics.*;
import org.drip.measure.process.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.service.common.FormatUtil;
import org.drip.service.common.StringUtil;
import org.drip.service.env.EnvManager;
@@ -832,7 +832,7 @@ public static final void main (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())
)
);
}
diff --git a/src/main/java/org/drip/sequence/random/MultivariateSequenceGenerator.java b/src/main/java/org/drip/sequence/random/MultivariateSequenceGenerator.java
index 8352428f5454..cabaa383bd30 100644
--- a/src/main/java/org/drip/sequence/random/MultivariateSequenceGenerator.java
+++ b/src/main/java/org/drip/sequence/random/MultivariateSequenceGenerator.java
@@ -104,7 +104,7 @@ public MultivariateSequenceGenerator (
if (null == (_aUSG = aUSG) || null == (_aadblCorrelation = aadblCorrelation))
throw new java.lang.Exception ("MultivariateSequenceGenerator ctr: Invalid Inputs");
- _aadblCholesky = org.drip.numerical.linearalgebra.MatrixUtil.CholeskyBanachiewiczFactorization
+ _aadblCholesky = org.drip.numerical.linearalgebra.R1MatrixUtil.CholeskyBanachiewiczFactorization
(aadblCorrelation);
int iNumVariate = aUSG.length;
diff --git a/src/main/java/org/drip/simm/foundation/RiskGroupPrincipalCovariance.java b/src/main/java/org/drip/simm/foundation/RiskGroupPrincipalCovariance.java
index 378b6867fd3c..2d47ac2b0d68 100644
--- a/src/main/java/org/drip/simm/foundation/RiskGroupPrincipalCovariance.java
+++ b/src/main/java/org/drip/simm/foundation/RiskGroupPrincipalCovariance.java
@@ -4,7 +4,7 @@
import org.drip.numerical.common.NumberUtil;
import org.drip.numerical.eigen.EigenComponent;
import org.drip.numerical.eigen.PowerIterationComponentExtractor;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -248,7 +248,7 @@ public double[][] unadjustedCovariance()
{
double[] scaledPrincipalEigenvector = scaledPrincipalEigenvector();
- return MatrixUtil.CrossProduct (scaledPrincipalEigenvector, scaledPrincipalEigenvector);
+ return R1MatrixUtil.CrossProduct (scaledPrincipalEigenvector, scaledPrincipalEigenvector);
}
/**
@@ -259,6 +259,6 @@ public double[][] unadjustedCovariance()
public double[][] adjustedCovariance()
{
- return MatrixUtil.Scale2D (unadjustedCovariance(),_extraGroupCorrelation);
+ return R1MatrixUtil.Scale2D (unadjustedCovariance(),_extraGroupCorrelation);
}
}
diff --git a/src/main/java/org/drip/specialfunction/definition/HankelFirstKindEstimator.java b/src/main/java/org/drip/specialfunction/definition/HankelFirstKindEstimator.java
index 6183ef9e3ae5..a22daeafed2c 100644
--- a/src/main/java/org/drip/specialfunction/definition/HankelFirstKindEstimator.java
+++ b/src/main/java/org/drip/specialfunction/definition/HankelFirstKindEstimator.java
@@ -1,9 +1,9 @@
package org.drip.specialfunction.definition;
-import org.drip.function.definition.CartesianComplexNumber;
import org.drip.function.definition.R2ToZ1;
import org.drip.numerical.common.NumberUtil;
+import org.drip.numerical.complex.CartesianC1;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -146,12 +146,12 @@ public abstract class HankelFirstKindEstimator implements R2ToZ1
public static final HankelFirstKindEstimator LargeZAsymptote()
{
return new HankelFirstKindEstimator() {
- @Override public CartesianComplexNumber bigH1 (
+ @Override public CartesianC1 bigH1 (
final double alpha,
final double z)
{
return !NumberUtil.IsValid (alpha) || !NumberUtil.IsValid (z) ? null :
- CartesianComplexNumber.FromPolar (
+ CartesianC1.FromPolar (
Math.sqrt (2. / Math.PI / z),
z - 0.5 * Math.PI * alpha - 0.25 * Math.PI
);
@@ -168,12 +168,12 @@ public static final HankelFirstKindEstimator LargeZAsymptote()
* @return Hankel Function First Kind H1 Value
*/
- public abstract CartesianComplexNumber bigH1 (
+ public abstract CartesianC1 bigH1 (
final double alpha,
final double z
);
- @Override public CartesianComplexNumber evaluate (
+ @Override public CartesianC1 evaluate (
final double alpha,
final double z)
{
diff --git a/src/main/java/org/drip/specialfunction/definition/HankelSecondKindEstimator.java b/src/main/java/org/drip/specialfunction/definition/HankelSecondKindEstimator.java
index 2c122cabfba1..e40c14d9e7f8 100644
--- a/src/main/java/org/drip/specialfunction/definition/HankelSecondKindEstimator.java
+++ b/src/main/java/org/drip/specialfunction/definition/HankelSecondKindEstimator.java
@@ -1,9 +1,9 @@
package org.drip.specialfunction.definition;
-import org.drip.function.definition.CartesianComplexNumber;
import org.drip.function.definition.R2ToZ1;
import org.drip.numerical.common.NumberUtil;
+import org.drip.numerical.complex.CartesianC1;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -146,12 +146,12 @@ public abstract class HankelSecondKindEstimator implements R2ToZ1
public static final HankelSecondKindEstimator LargeZAsymptote()
{
return new HankelSecondKindEstimator() {
- @Override public CartesianComplexNumber bigH2 (
+ @Override public CartesianC1 bigH2 (
final double alpha,
final double z)
{
return !NumberUtil.IsValid (alpha) || !NumberUtil.IsValid (z) ? null :
- CartesianComplexNumber.FromPolar (
+ CartesianC1.FromPolar (
Math.sqrt (2. / Math.PI / z),
0.5 * Math.PI * alpha + 0.25 * Math.PI - z
);
@@ -168,12 +168,12 @@ public static final HankelSecondKindEstimator LargeZAsymptote()
* @return Hankel Function Second Kind H2 Value
*/
- public abstract CartesianComplexNumber bigH2 (
+ public abstract CartesianC1 bigH2 (
final double alpha,
final double z
);
- @Override public CartesianComplexNumber evaluate (
+ @Override public CartesianC1 evaluate (
final double alpha,
final double z)
{
diff --git a/src/main/java/org/drip/specialfunction/definition/RiccatiBesselXeeEstimator.java b/src/main/java/org/drip/specialfunction/definition/RiccatiBesselXeeEstimator.java
index 1c1547c4021b..b83cad0bb475 100644
--- a/src/main/java/org/drip/specialfunction/definition/RiccatiBesselXeeEstimator.java
+++ b/src/main/java/org/drip/specialfunction/definition/RiccatiBesselXeeEstimator.java
@@ -1,8 +1,8 @@
package org.drip.specialfunction.definition;
-import org.drip.function.definition.CartesianComplexNumber;
import org.drip.function.definition.R2ToZ1;
+import org.drip.numerical.complex.CartesianC1;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -144,12 +144,12 @@ public abstract class RiccatiBesselXeeEstimator implements R2ToZ1
* @return Riccati-Bessel Xee Estimate
*/
- public abstract CartesianComplexNumber xee (
+ public abstract CartesianC1 xee (
final double alpha,
final double z
);
- @Override public CartesianComplexNumber evaluate (
+ @Override public CartesianC1 evaluate (
final double alpha,
final double z)
{
diff --git a/src/main/java/org/drip/specialfunction/definition/RiccatiBesselZitaEstimator.java b/src/main/java/org/drip/specialfunction/definition/RiccatiBesselZitaEstimator.java
index 5aeb5415567f..ca6da20192b6 100644
--- a/src/main/java/org/drip/specialfunction/definition/RiccatiBesselZitaEstimator.java
+++ b/src/main/java/org/drip/specialfunction/definition/RiccatiBesselZitaEstimator.java
@@ -1,8 +1,8 @@
package org.drip.specialfunction.definition;
-import org.drip.function.definition.CartesianComplexNumber;
import org.drip.function.definition.R2ToZ1;
+import org.drip.numerical.complex.CartesianC1;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -144,12 +144,12 @@ public abstract class RiccatiBesselZitaEstimator implements R2ToZ1
* @return Riccati-Bessel Zita Estimate
*/
- public abstract CartesianComplexNumber zita (
+ public abstract CartesianC1 zita (
final double alpha,
final double z
);
- @Override public CartesianComplexNumber evaluate (
+ @Override public CartesianC1 evaluate (
final double alpha,
final double z)
{
diff --git a/src/main/java/org/drip/specialfunction/definition/SphericalHankelFirstKindEstimator.java b/src/main/java/org/drip/specialfunction/definition/SphericalHankelFirstKindEstimator.java
index a30f21fa246f..05afa78484d4 100644
--- a/src/main/java/org/drip/specialfunction/definition/SphericalHankelFirstKindEstimator.java
+++ b/src/main/java/org/drip/specialfunction/definition/SphericalHankelFirstKindEstimator.java
@@ -1,8 +1,8 @@
package org.drip.specialfunction.definition;
-import org.drip.function.definition.CartesianComplexNumber;
import org.drip.function.definition.R2ToZ1;
+import org.drip.numerical.complex.CartesianC1;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -144,12 +144,12 @@ public abstract class SphericalHankelFirstKindEstimator implements R2ToZ1
* @return Spherical Hankel Function First Kind h1 Value
*/
- public abstract CartesianComplexNumber smallH1 (
+ public abstract CartesianC1 smallH1 (
final double alpha,
final double z
);
- @Override public CartesianComplexNumber evaluate (
+ @Override public CartesianC1 evaluate (
final double alpha,
final double z)
{
diff --git a/src/main/java/org/drip/specialfunction/definition/SphericalHankelSecondKindEstimator.java b/src/main/java/org/drip/specialfunction/definition/SphericalHankelSecondKindEstimator.java
index 39f8e1afbbde..6fb260aedb46 100644
--- a/src/main/java/org/drip/specialfunction/definition/SphericalHankelSecondKindEstimator.java
+++ b/src/main/java/org/drip/specialfunction/definition/SphericalHankelSecondKindEstimator.java
@@ -1,8 +1,8 @@
package org.drip.specialfunction.definition;
-import org.drip.function.definition.CartesianComplexNumber;
import org.drip.function.definition.R2ToZ1;
+import org.drip.numerical.complex.CartesianC1;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -144,12 +144,12 @@ public abstract class SphericalHankelSecondKindEstimator implements R2ToZ1
* @return Spherical Hankel Function Second Kind h2 Value
*/
- public abstract CartesianComplexNumber smallH2 (
+ public abstract CartesianC1 smallH2 (
final double alpha,
final double z
);
- @Override public CartesianComplexNumber evaluate (
+ @Override public CartesianC1 evaluate (
final double alpha,
final double z)
{
diff --git a/src/main/java/org/drip/specialfunction/digamma/SpecialValues.java b/src/main/java/org/drip/specialfunction/digamma/SpecialValues.java
index b576e4aafd9e..dad1a83da76a 100644
--- a/src/main/java/org/drip/specialfunction/digamma/SpecialValues.java
+++ b/src/main/java/org/drip/specialfunction/digamma/SpecialValues.java
@@ -4,7 +4,7 @@
import java.util.Map;
import java.util.TreeMap;
-import org.drip.function.definition.CartesianComplexNumber;
+import org.drip.numerical.complex.CartesianC1;
import org.drip.specialfunction.gamma.Definitions;
/*
@@ -187,7 +187,7 @@ public static final Map Fractionals()
* @return Unit Imaginary Digamma Complex Number
*/
- public static final CartesianComplexNumber UnitImaginary (
+ public static final CartesianC1 UnitImaginary (
final int termCount)
{
if (0 >= termCount) {
@@ -201,7 +201,7 @@ public static final CartesianComplexNumber UnitImaginary (
}
try {
- return new CartesianComplexNumber (realPart, 0.5 + 0.5 * Math.PI / Math.tanh (Math.PI));
+ return new CartesianC1 (realPart, 0.5 + 0.5 * Math.PI / Math.tanh (Math.PI));
} catch (Exception e) {
e.printStackTrace();
}
diff --git a/src/main/java/org/drip/specialfunction/group/MonodromyTransform2F1.java b/src/main/java/org/drip/specialfunction/group/MonodromyTransform2F1.java
index e74e25623bbf..c66643ca9712 100644
--- a/src/main/java/org/drip/specialfunction/group/MonodromyTransform2F1.java
+++ b/src/main/java/org/drip/specialfunction/group/MonodromyTransform2F1.java
@@ -1,7 +1,7 @@
package org.drip.specialfunction.group;
-import org.drip.function.definition.CartesianComplexNumber;
+import org.drip.numerical.complex.CartesianC1;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
@@ -146,7 +146,7 @@ public class MonodromyTransform2F1
* @return The Monodromy Group Matrix G0 around the '0' Singularity
*/
- public static final CartesianComplexNumber[][] G0 (
+ public static final CartesianC1[][] G0 (
final FundamentalGroupPathExponent2F1 pathExponent1,
final FundamentalGroupPathExponent2F1 pathExponent2)
{
@@ -154,20 +154,20 @@ public static final CartesianComplexNumber[][] G0 (
return null;
}
- CartesianComplexNumber[][] g0 = new CartesianComplexNumber[2][2];
+ CartesianC1[][] g0 = new CartesianC1[2][2];
double theta1 = 2. * Math.PI * pathExponent1.alpha();
double theta2 = 2. * Math.PI * pathExponent2.alpha();
try {
- g0[0][0] = new CartesianComplexNumber (Math.cos (theta1), Math.sin (theta1));
+ g0[0][0] = new CartesianC1 (Math.cos (theta1), Math.sin (theta1));
- g0[0][1] = new CartesianComplexNumber (0., 0.);
+ g0[0][1] = new CartesianC1 (0., 0.);
- g0[1][0] = new CartesianComplexNumber (0., 0.);
+ g0[1][0] = new CartesianC1 (0., 0.);
- g0[1][1] = new CartesianComplexNumber (Math.cos (theta2), Math.sin (theta2));
+ g0[1][1] = new CartesianC1 (Math.cos (theta2), Math.sin (theta2));
} catch (Exception e) {
e.printStackTrace();
}
@@ -220,7 +220,7 @@ public static final double G1Mu (
* @return The Monodromy Group Matrix G1 around the '1' Singularity
*/
- public static final CartesianComplexNumber[][] G1 (
+ public static final CartesianC1[][] G1 (
final FundamentalGroupPathExponent2F1 pathExponent1,
final FundamentalGroupPathExponent2F1 pathExponent2)
{
@@ -228,7 +228,7 @@ public static final CartesianComplexNumber[][] G1 (
return null;
}
- CartesianComplexNumber[][] g0 = new CartesianComplexNumber[2][2];
+ CartesianC1[][] g0 = new CartesianC1[2][2];
double theta1 = 2. * Math.PI * pathExponent1.beta();
@@ -240,22 +240,22 @@ public static final CartesianComplexNumber[][] G1 (
double muMinus1 = g1Mu - 1.;
double muMinus1Squared = muMinus1 * muMinus1;
- g0[0][0] = new CartesianComplexNumber (
+ g0[0][0] = new CartesianC1 (
(g1Mu * Math.cos (theta1) - Math.cos (theta2)) / muMinus1,
(g1Mu * Math.sin (theta1) - Math.sin (theta2)) / muMinus1
);
- g0[0][1] = new CartesianComplexNumber (
+ g0[0][1] = new CartesianC1 (
Math.cos (theta2) - Math.cos (theta1),
Math.sin (theta2) - Math.sin (theta1)
);
- g0[1][0] = new CartesianComplexNumber (
+ g0[1][0] = new CartesianC1 (
g1Mu * (Math.cos (theta2) - Math.cos (theta1)) / (muMinus1Squared * muMinus1Squared),
g1Mu * (Math.sin (theta2) - Math.sin (theta1)) / (muMinus1Squared * muMinus1Squared)
);
- g0[1][1] = new CartesianComplexNumber (
+ g0[1][1] = new CartesianC1 (
(g1Mu * Math.cos (theta2) - Math.cos (theta1)) / muMinus1,
(g1Mu * Math.sin (theta2) - Math.sin (theta1)) / muMinus1
);
diff --git a/src/main/java/org/drip/specialfunction/hankel/BigH1FromBigJ.java b/src/main/java/org/drip/specialfunction/hankel/BigH1FromBigJ.java
index a56bcb3600e9..ce37b9d809dc 100644
--- a/src/main/java/org/drip/specialfunction/hankel/BigH1FromBigJ.java
+++ b/src/main/java/org/drip/specialfunction/hankel/BigH1FromBigJ.java
@@ -1,7 +1,7 @@
package org.drip.specialfunction.hankel;
-import org.drip.function.definition.CartesianComplexNumber;
+import org.drip.numerical.complex.CartesianC1;
import org.drip.specialfunction.definition.BesselFirstKindEstimator;
import org.drip.specialfunction.definition.HankelFirstKindEstimator;
@@ -166,12 +166,12 @@ public BesselFirstKindEstimator besselFirstKindEstimator()
return _besselFirstKindEstimator;
}
- @Override public CartesianComplexNumber bigH1 (
+ @Override public CartesianC1 bigH1 (
final double alpha,
final double z)
{
try {
- return new CartesianComplexNumber (
+ return new CartesianC1 (
_besselFirstKindEstimator.bigJ (alpha, z),
(
_besselFirstKindEstimator.bigJ (alpha, z) * Math.cos (Math.PI * alpha) -
diff --git a/src/main/java/org/drip/specialfunction/hankel/BigH1FromBigJBigY.java b/src/main/java/org/drip/specialfunction/hankel/BigH1FromBigJBigY.java
index 95c10ffc1bda..52c4e326447f 100644
--- a/src/main/java/org/drip/specialfunction/hankel/BigH1FromBigJBigY.java
+++ b/src/main/java/org/drip/specialfunction/hankel/BigH1FromBigJBigY.java
@@ -1,7 +1,7 @@
package org.drip.specialfunction.hankel;
-import org.drip.function.definition.CartesianComplexNumber;
+import org.drip.numerical.complex.CartesianC1;
import org.drip.specialfunction.definition.BesselFirstKindEstimator;
import org.drip.specialfunction.definition.BesselSecondKindEstimator;
import org.drip.specialfunction.definition.HankelFirstKindEstimator;
@@ -184,12 +184,12 @@ public BesselSecondKindEstimator besselSecondKindEstimator()
return _besselSecondKindEstimator;
}
- @Override public CartesianComplexNumber bigH1 (
+ @Override public CartesianC1 bigH1 (
final double alpha,
final double z)
{
try {
- return new CartesianComplexNumber (
+ return new CartesianC1 (
_besselFirstKindEstimator.bigJ (alpha, z),
_besselSecondKindEstimator.bigY (alpha, z)
);
diff --git a/src/main/java/org/drip/specialfunction/hankel/BigH2FromBigJ.java b/src/main/java/org/drip/specialfunction/hankel/BigH2FromBigJ.java
index 85362cfcf22d..3b0a8d8ae4f3 100644
--- a/src/main/java/org/drip/specialfunction/hankel/BigH2FromBigJ.java
+++ b/src/main/java/org/drip/specialfunction/hankel/BigH2FromBigJ.java
@@ -1,7 +1,7 @@
package org.drip.specialfunction.hankel;
-import org.drip.function.definition.CartesianComplexNumber;
+import org.drip.numerical.complex.CartesianC1;
import org.drip.specialfunction.definition.BesselFirstKindEstimator;
import org.drip.specialfunction.definition.HankelSecondKindEstimator;
@@ -166,12 +166,12 @@ public BesselFirstKindEstimator besselFirstKindEstimator()
return _besselFirstKindEstimator;
}
- @Override public CartesianComplexNumber bigH2 (
+ @Override public CartesianC1 bigH2 (
final double alpha,
final double z)
{
try {
- return new CartesianComplexNumber (
+ return new CartesianC1 (
-1. * _besselFirstKindEstimator.bigJ (-1. * alpha, z),
(
_besselFirstKindEstimator.bigJ (alpha, z) * Math.cos (Math.PI * alpha) +
diff --git a/src/main/java/org/drip/specialfunction/hankel/BigH2FromBigJBigY.java b/src/main/java/org/drip/specialfunction/hankel/BigH2FromBigJBigY.java
index 43682aef8e73..74506232b714 100644
--- a/src/main/java/org/drip/specialfunction/hankel/BigH2FromBigJBigY.java
+++ b/src/main/java/org/drip/specialfunction/hankel/BigH2FromBigJBigY.java
@@ -1,7 +1,7 @@
package org.drip.specialfunction.hankel;
-import org.drip.function.definition.CartesianComplexNumber;
+import org.drip.numerical.complex.CartesianC1;
import org.drip.specialfunction.definition.BesselFirstKindEstimator;
import org.drip.specialfunction.definition.BesselSecondKindEstimator;
import org.drip.specialfunction.definition.HankelFirstKindEstimator;
@@ -184,12 +184,12 @@ public BesselSecondKindEstimator besselSecondKindEstimator()
return _besselSecondKindEstimator;
}
- @Override public CartesianComplexNumber bigH1 (
+ @Override public CartesianC1 bigH1 (
final double alpha,
final double z)
{
try {
- return new CartesianComplexNumber (
+ return new CartesianC1 (
_besselFirstKindEstimator.bigJ (alpha, z),
-1. * _besselSecondKindEstimator.bigY (alpha, z)
);
diff --git a/src/main/java/org/drip/specialfunction/hankel/SmallH1.java b/src/main/java/org/drip/specialfunction/hankel/SmallH1.java
index dc0a40b60e7f..30bfc2d5d44a 100644
--- a/src/main/java/org/drip/specialfunction/hankel/SmallH1.java
+++ b/src/main/java/org/drip/specialfunction/hankel/SmallH1.java
@@ -1,7 +1,7 @@
package org.drip.specialfunction.hankel;
-import org.drip.function.definition.CartesianComplexNumber;
+import org.drip.numerical.complex.CartesianC1;
import org.drip.specialfunction.definition.SphericalBesselFirstKindEstimator;
import org.drip.specialfunction.definition.SphericalBesselSecondKindEstimator;
import org.drip.specialfunction.definition.SphericalHankelFirstKindEstimator;
@@ -184,12 +184,12 @@ public SphericalBesselSecondKindEstimator sphericalBesselSecondKindEstimator()
return _sphericalBesselSecondKindEstimator;
}
- @Override public CartesianComplexNumber smallH1 (
+ @Override public CartesianC1 smallH1 (
final double alpha,
final double z)
{
try {
- return new CartesianComplexNumber (
+ return new CartesianC1 (
_sphericalBesselFirstKindEstimator.smallJ (alpha, z),
_sphericalBesselSecondKindEstimator.smallY (alpha, z)
);
diff --git a/src/main/java/org/drip/specialfunction/hankel/SmallH2.java b/src/main/java/org/drip/specialfunction/hankel/SmallH2.java
index 39503253e700..1ce982907ce6 100644
--- a/src/main/java/org/drip/specialfunction/hankel/SmallH2.java
+++ b/src/main/java/org/drip/specialfunction/hankel/SmallH2.java
@@ -1,7 +1,7 @@
package org.drip.specialfunction.hankel;
-import org.drip.function.definition.CartesianComplexNumber;
+import org.drip.numerical.complex.CartesianC1;
import org.drip.specialfunction.definition.SphericalBesselFirstKindEstimator;
import org.drip.specialfunction.definition.SphericalBesselSecondKindEstimator;
import org.drip.specialfunction.definition.SphericalHankelSecondKindEstimator;
@@ -184,12 +184,12 @@ public SphericalBesselSecondKindEstimator sphericalBesselSecondKindEstimator()
return _sphericalBesselSecondKindEstimator;
}
- @Override public CartesianComplexNumber smallH2 (
+ @Override public CartesianC1 smallH2 (
final double alpha,
final double z)
{
try {
- return new CartesianComplexNumber (
+ return new CartesianC1 (
_sphericalBesselFirstKindEstimator.smallJ (alpha, z),
-1. * _sphericalBesselSecondKindEstimator.smallY (alpha, z)
);
diff --git a/src/main/java/org/drip/specialfunction/hankel/XeeFromBigH1.java b/src/main/java/org/drip/specialfunction/hankel/XeeFromBigH1.java
index d574f14be846..345d139ad4a8 100644
--- a/src/main/java/org/drip/specialfunction/hankel/XeeFromBigH1.java
+++ b/src/main/java/org/drip/specialfunction/hankel/XeeFromBigH1.java
@@ -1,7 +1,8 @@
package org.drip.specialfunction.hankel;
-import org.drip.function.definition.CartesianComplexNumber;
+import org.drip.numerical.complex.C1MatrixUtil;
+import org.drip.numerical.complex.CartesianC1;
import org.drip.specialfunction.definition.HankelFirstKindEstimator;
import org.drip.specialfunction.definition.RiccatiBesselXeeEstimator;
@@ -166,12 +167,12 @@ public HankelFirstKindEstimator hankelFirstKindEstimator()
return _hankelFirstKindEstimator;
}
- @Override public CartesianComplexNumber xee (
+ @Override public CartesianC1 xee (
final double alpha,
final double z)
{
- CartesianComplexNumber bigH1 = _hankelFirstKindEstimator.bigH1 (alpha + 0.5, z);
+ CartesianC1 bigH1 = _hankelFirstKindEstimator.bigH1 (alpha + 0.5, z);
- return null == bigH1 ? null : CartesianComplexNumber.Scale (bigH1, Math.sqrt (0.5 * Math.PI * z));
+ return null == bigH1 ? null : C1MatrixUtil.Scale (bigH1, Math.sqrt (0.5 * Math.PI * z));
}
}
diff --git a/src/main/java/org/drip/specialfunction/hankel/XeeFromSC.java b/src/main/java/org/drip/specialfunction/hankel/XeeFromSC.java
index aa97e59a0843..962f86fa35bd 100644
--- a/src/main/java/org/drip/specialfunction/hankel/XeeFromSC.java
+++ b/src/main/java/org/drip/specialfunction/hankel/XeeFromSC.java
@@ -1,7 +1,7 @@
package org.drip.specialfunction.hankel;
-import org.drip.function.definition.CartesianComplexNumber;
+import org.drip.numerical.complex.CartesianC1;
import org.drip.specialfunction.definition.RiccatiBesselCEstimator;
import org.drip.specialfunction.definition.RiccatiBesselSEstimator;
import org.drip.specialfunction.definition.RiccatiBesselXeeEstimator;
@@ -184,12 +184,12 @@ public RiccatiBesselSEstimator riccatiBesselSEstimator()
return _riccatiBesselSEstimator;
}
- @Override public CartesianComplexNumber xee (
+ @Override public CartesianC1 xee (
final double alpha,
final double z)
{
try {
- return new CartesianComplexNumber (
+ return new CartesianC1 (
_riccatiBesselSEstimator.bigS (alpha, z),
-1. * _riccatiBesselCEstimator.bigC (alpha, z)
);
diff --git a/src/main/java/org/drip/specialfunction/hankel/XeeFromSmallH1.java b/src/main/java/org/drip/specialfunction/hankel/XeeFromSmallH1.java
index 68328d2f1a2d..ed9d50532c3a 100644
--- a/src/main/java/org/drip/specialfunction/hankel/XeeFromSmallH1.java
+++ b/src/main/java/org/drip/specialfunction/hankel/XeeFromSmallH1.java
@@ -1,7 +1,8 @@
package org.drip.specialfunction.hankel;
-import org.drip.function.definition.CartesianComplexNumber;
+import org.drip.numerical.complex.C1MatrixUtil;
+import org.drip.numerical.complex.CartesianC1;
import org.drip.specialfunction.definition.RiccatiBesselXeeEstimator;
import org.drip.specialfunction.definition.SphericalHankelFirstKindEstimator;
@@ -166,12 +167,12 @@ public SphericalHankelFirstKindEstimator sphericalHankelFirstKindEstimator()
return _sphericalHankelFirstKindEstimator;
}
- @Override public CartesianComplexNumber xee (
+ @Override public CartesianC1 xee (
final double alpha,
final double z)
{
- CartesianComplexNumber smallH1 = _sphericalHankelFirstKindEstimator.smallH1 (alpha, z);
+ CartesianC1 smallH1 = _sphericalHankelFirstKindEstimator.smallH1 (alpha, z);
- return null == smallH1 ? null : CartesianComplexNumber.Scale (smallH1, z);
+ return null == smallH1 ? null : C1MatrixUtil.Scale (smallH1, z);
}
}
diff --git a/src/main/java/org/drip/specialfunction/hankel/ZitaFromBigH2.java b/src/main/java/org/drip/specialfunction/hankel/ZitaFromBigH2.java
index e0904dbd61ea..10265821fa51 100644
--- a/src/main/java/org/drip/specialfunction/hankel/ZitaFromBigH2.java
+++ b/src/main/java/org/drip/specialfunction/hankel/ZitaFromBigH2.java
@@ -1,7 +1,8 @@
package org.drip.specialfunction.hankel;
-import org.drip.function.definition.CartesianComplexNumber;
+import org.drip.numerical.complex.C1MatrixUtil;
+import org.drip.numerical.complex.CartesianC1;
import org.drip.specialfunction.definition.HankelSecondKindEstimator;
import org.drip.specialfunction.definition.RiccatiBesselZitaEstimator;
@@ -166,12 +167,12 @@ public HankelSecondKindEstimator hankelSecondKindEstimator()
return _hankelSecondKindEstimator;
}
- @Override public CartesianComplexNumber zita (
+ @Override public CartesianC1 zita (
final double alpha,
final double z)
{
- CartesianComplexNumber bigH2 = _hankelSecondKindEstimator.bigH2 (alpha + 0.5, z);
+ CartesianC1 bigH2 = _hankelSecondKindEstimator.bigH2 (alpha + 0.5, z);
- return null == bigH2 ? null : CartesianComplexNumber.Scale (bigH2, Math.sqrt (0.5 * Math.PI * z));
+ return null == bigH2 ? null : C1MatrixUtil.Scale (bigH2, Math.sqrt (0.5 * Math.PI * z));
}
}
diff --git a/src/main/java/org/drip/specialfunction/hankel/ZitaFromSC.java b/src/main/java/org/drip/specialfunction/hankel/ZitaFromSC.java
index 122f71274017..786bf61d5f0b 100644
--- a/src/main/java/org/drip/specialfunction/hankel/ZitaFromSC.java
+++ b/src/main/java/org/drip/specialfunction/hankel/ZitaFromSC.java
@@ -1,7 +1,7 @@
package org.drip.specialfunction.hankel;
-import org.drip.function.definition.CartesianComplexNumber;
+import org.drip.numerical.complex.CartesianC1;
import org.drip.specialfunction.definition.RiccatiBesselCEstimator;
import org.drip.specialfunction.definition.RiccatiBesselSEstimator;
import org.drip.specialfunction.definition.RiccatiBesselZitaEstimator;
@@ -184,12 +184,12 @@ public RiccatiBesselSEstimator riccatiBesselSEstimator()
return _riccatiBesselSEstimator;
}
- @Override public CartesianComplexNumber zita (
+ @Override public CartesianC1 zita (
final double alpha,
final double z)
{
try {
- return new CartesianComplexNumber (
+ return new CartesianC1 (
_riccatiBesselSEstimator.bigS (alpha, z),
_riccatiBesselCEstimator.bigC (alpha, z)
);
diff --git a/src/main/java/org/drip/specialfunction/hankel/ZitaFromSmallH2.java b/src/main/java/org/drip/specialfunction/hankel/ZitaFromSmallH2.java
index ffd338b36889..151b8ca178b5 100644
--- a/src/main/java/org/drip/specialfunction/hankel/ZitaFromSmallH2.java
+++ b/src/main/java/org/drip/specialfunction/hankel/ZitaFromSmallH2.java
@@ -1,7 +1,8 @@
package org.drip.specialfunction.hankel;
-import org.drip.function.definition.CartesianComplexNumber;
+import org.drip.numerical.complex.C1MatrixUtil;
+import org.drip.numerical.complex.CartesianC1;
import org.drip.specialfunction.definition.RiccatiBesselZitaEstimator;
import org.drip.specialfunction.definition.SphericalHankelSecondKindEstimator;
@@ -166,12 +167,12 @@ public SphericalHankelSecondKindEstimator sphericalHankelSecondKindEstimator()
return _sphericalHankelSecondKindEstimator;
}
- @Override public CartesianComplexNumber zita (
+ @Override public CartesianC1 zita (
final double alpha,
final double z)
{
- CartesianComplexNumber smallH2 = _sphericalHankelSecondKindEstimator.smallH2 (alpha, z);
+ CartesianC1 smallH2 = _sphericalHankelSecondKindEstimator.smallH2 (alpha, z);
- return null == smallH2 ? null : CartesianComplexNumber.Scale (smallH2, z);
+ return null == smallH2 ? null : C1MatrixUtil.Scale (smallH2, z);
}
}
diff --git a/src/main/java/org/drip/xva/dynamics/PathSimulator.java b/src/main/java/org/drip/xva/dynamics/PathSimulator.java
index 2058bc8c2cf0..d64a1cf518fe 100644
--- a/src/main/java/org/drip/xva/dynamics/PathSimulator.java
+++ b/src/main/java/org/drip/xva/dynamics/PathSimulator.java
@@ -11,7 +11,7 @@
import org.drip.exposure.universe.MarketVertex;
import org.drip.exposure.universe.MarketVertexGenerator;
import org.drip.measure.discrete.CorrelatedPathVertexDimension;
-import org.drip.numerical.linearalgebra.MatrixUtil;
+import org.drip.numerical.linearalgebra.R1MatrixUtil;
import org.drip.state.identifier.LatentStateLabel;
import org.drip.xva.gross.ExposureAdjustmentAggregator;
import org.drip.xva.gross.MonoPathExposureAdjustment;
@@ -416,8 +416,8 @@ public ExposureAdjustmentAggregator simulate (
initialMarketVertex,
LatentStateWeiner.FromUnitRandom (
latentStateLabelList,
- MatrixUtil.Transpose (
- MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())))
+ R1MatrixUtil.Transpose (
+ R1MatrixUtil.Transpose (correlatedPathVertexDimension.straightPathVertexRd().flatform())))
))) {
return null;
}