Skip to content

Commit

Permalink
Features:
Browse files Browse the repository at this point in the history
	- C1 Matrix Util Product #1 (1, 2, 3)
	- C1 Matrix Util Product #2 (4, 5, 6)
	- C1 Matrix Util Product #3 (7, 8, 9)
	- C1 Matrix Util Product #4 (10, 11, 12)
	- C1 Matrix Util Product #5 (13, 14, 15)
	- C1 Matrix Util Product #6 (16, 17, 18)
	- C1 Matrix Util Product #7 (19, 20, 21)
	- C1 Matrix Util Product #8 (22, 23, 24)
	- C1 Cartesian Phi Alpha Beta Theta Standard (25, 26, 27)
	- C1 Cartesian Phi Psi Theta Delta Standard #1 (28, 29, 30)
	- C1 Cartesian Phi Psi Theta Delta Standard #2 (31, 32, 33)
	- C1 Cartesian Phi Psi Theta Delta Alpha (34, 35, 36)
	- C1 Cartesian Phi Psi Theta Delta Beta (37, 38, 39)
	- C1 Cartesian Fuhr Rzeszotnik Shell (40, 41, 42)
	- C1 Cartesian Fuhr Rzeszotnik Rho (43, 44)
	- C1 Cartesian Fuhr Rzeszotnik Epsilon (45, 46)
	- C1 Cartesian Fuhr Rzeszotnik Eta (47, 48)
	- C1 Cartesian Fuhr Rzeszotnik Sigma (49, 50)
	- C1 Cartesian Fuhr Rzeszotnik Constructor #1 (51, 52)
	- C1 Cartesian Fuhr Rzeszotnik Constructor #2 (53, 54)
	- C1 Cartesian Fuhr Rzeszotnik Jordan Normal Left (55, 56)
	- C1 Cartesian Fuhr Rzeszotnik Jordan Normal Center (57, 58)
	- C1 Cartesian Fuhr Rzeszotnik Jordan Normal Right (58, 60)
	- C1 Cartesian Fuhr Rzeszotnik #1 (61, 62, 63)
	- C1 Cartesian Fuhr Rzeszotnik #2 (64, 65)
	- Numerical Common Unitary Matrix Shell (66, 67, 68)
	- Numerical Common Unitary Matrix Constructor (69, 70)
	- C1 Util Numerical Complex Unitary (71, 72)
	- C1 Matrix Util Unsafe Determinant #1 (73, 74, 75)
	- C1 Matrix Util Unsafe Determinant #2 (76, 77, 78)
	- Standard Instance of the Unitary Matrix (79, 80, 81)
	- Unitary Matrix Condition Number (82, 83, 84)


Bug Fixes/Re-organization:

Samples:

IdeaDRIP:

	- Matrix Norm (85-87)
	- Matrix Norm Preliminaries (88-106)
	- Matrix Norms Induced by Vector (107-117)
	- Matrix Norms Induced by Vector p-Norms (118-120)
  • Loading branch information
Lakshmik committed Aug 14, 2024
1 parent 76d7eff commit b71a962
Show file tree
Hide file tree
Showing 8 changed files with 819 additions and 104 deletions.
47 changes: 47 additions & 0 deletions ReleaseNotes/03_18_2024.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

Features:

- C1 Matrix Util Product #1 (1, 2, 3)
- C1 Matrix Util Product #2 (4, 5, 6)
- C1 Matrix Util Product #3 (7, 8, 9)
- C1 Matrix Util Product #4 (10, 11, 12)
- C1 Matrix Util Product #5 (13, 14, 15)
- C1 Matrix Util Product #6 (16, 17, 18)
- C1 Matrix Util Product #7 (19, 20, 21)
- C1 Matrix Util Product #8 (22, 23, 24)
- C1 Cartesian Phi Alpha Beta Theta Standard (25, 26, 27)
- C1 Cartesian Phi Psi Theta Delta Standard #1 (28, 29, 30)
- C1 Cartesian Phi Psi Theta Delta Standard #2 (31, 32, 33)
- C1 Cartesian Phi Psi Theta Delta Alpha (34, 35, 36)
- C1 Cartesian Phi Psi Theta Delta Beta (37, 38, 39)
- C1 Cartesian Fuhr Rzeszotnik Shell (40, 41, 42)
- C1 Cartesian Fuhr Rzeszotnik Rho (43, 44)
- C1 Cartesian Fuhr Rzeszotnik Epsilon (45, 46)
- C1 Cartesian Fuhr Rzeszotnik Eta (47, 48)
- C1 Cartesian Fuhr Rzeszotnik Sigma (49, 50)
- C1 Cartesian Fuhr Rzeszotnik Constructor #1 (51, 52)
- C1 Cartesian Fuhr Rzeszotnik Constructor #2 (53, 54)
- C1 Cartesian Fuhr Rzeszotnik Jordan Normal Left (55, 56)
- C1 Cartesian Fuhr Rzeszotnik Jordan Normal Center (57, 58)
- C1 Cartesian Fuhr Rzeszotnik Jordan Normal Right (58, 60)
- C1 Cartesian Fuhr Rzeszotnik #1 (61, 62, 63)
- C1 Cartesian Fuhr Rzeszotnik #2 (64, 65)
- Numerical Common Unitary Matrix Shell (66, 67, 68)
- Numerical Common Unitary Matrix Constructor (69, 70)
- C1 Util Numerical Complex Unitary (71, 72)
- C1 Matrix Util Unsafe Determinant #1 (73, 74, 75)
- C1 Matrix Util Unsafe Determinant #2 (76, 77, 78)
- Standard Instance of the Unitary Matrix (79, 80, 81)
- Unitary Matrix Condition Number (82, 83, 84)


Bug Fixes/Re-organization:

Samples:

IdeaDRIP:

- Matrix Norm (85-87)
- Matrix Norm Preliminaries (88-106)
- Matrix Norms Induced by Vector (107-117)
- Matrix Norms Induced by Vector p-Norms (118-120)
Original file line number Diff line number Diff line change
@@ -0,0 +1,278 @@

package org.drip.numerical.complex;

import org.drip.numerical.matrix.R1SquareRotation2x2;

/*
* -*- 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.
*/

/**
* <i>C1CartesianFuhrRzeszotnik</i> implements the type and Functionality associated with a C<sup>1</sup>
* Square Matrix parameterized by the Fuhr-Rzeszotnik parameters <code>rho</code>, <code>epsilon</code>,
* <code>eta</code>, and <code>sigma</code> Fields. The References are:
*
* <br><br>
* <ul>
* <li>
* Fuhr, H., and Z. Rzeszotnik (2018): A Note on Factoring Unitary Matrices <i>Linear Algebra and
* its Applications</i> <b>547</b> 32-44
* </li>
* <li>
* Horn, R. A., and C. R. Johnson (2013): <i>Matrix Analysis</i> <b>Cambridge University Press</b>
* Cambridge UK
* </li>
* <li>
* Li, C. K., and E. Poon (2002): Additive Decomposition of Real Matrices <i>Linear and Multilinear
* Algebra</i> <b>50 (4)</b> 321-326
* </li>
* <li>
* Marvian, I. (2022): Restrictions on realizable Unitary Operations imposed by Symmetry and
* Locality <i>Nature Science</i> <b>18 (3)</b> 283-289
* </li>
* <li>
* Wikipedia (2024): Unitary Matrix https://en.wikipedia.org/wiki/Unitary_matrix
* </li>
* </ul>
*
* <br><br>
* <ul>
* <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></li>
* <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/NumericalAnalysisLibrary.md">Numerical Analysis Library</a></li>
* <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/numerical/README.md">Numerical Quadrature, Differentiation, Eigenization, Linear Algebra, and Utilities</a></li>
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/numerical/complex/README.md">Implementation of Complex Number Suite</a></li>
* </ul>
* <br><br>
*
* @author Lakshmi Krishnamurthy
*/

public class C1CartesianFuhrRzeszotnik extends C1Square
{
private double _eta = Double.NaN;
private double _rho = Double.NaN;
private double _sigma = Double.NaN;
private double _epsilon = Double.NaN;
private C1Square _jordanNormalCenter = null;
private R1SquareRotation2x2 _jordanNormalLeft = null;
private R1SquareRotation2x2 _jordanNormalRight = null;

/**
* Construct a Standard Instance of <i>C1CartesianFuhrRzeszotnik</i>
*
* @param eta "Eta"
* @param rho "Rho"
* @param sigma "Sigma"
* @param epsilon "Epsilon"
*
* @return <i>C1CartesianFuhrRzeszotnik</i> Instance
*/

public static C1CartesianFuhrRzeszotnik Standard (
final double eta,
final double rho,
final double sigma,
final double epsilon)
{
R1SquareRotation2x2 jordanNormalLeft = R1SquareRotation2x2.Standard (rho);

if (null == jordanNormalLeft) {
return null;
}

C1Square jordanNormalCenter = C1Square.Rotation2x2 (epsilon, eta);

if (null == jordanNormalCenter) {
return null;
}

R1SquareRotation2x2 jordanNormalRight = R1SquareRotation2x2.Standard (sigma);

if (null == jordanNormalRight) {
return null;
}

C1Cartesian[][] c1Grid = C1MatrixUtil.Product (
jordanNormalLeft.r1Grid(),
jordanNormalCenter.c1Grid()
);

return null == c1Grid || null == (c1Grid = C1MatrixUtil.Product (c1Grid, jordanNormalRight.r1Grid()))
? null : new C1CartesianFuhrRzeszotnik (
c1Grid,
eta,
rho,
sigma,
epsilon,
jordanNormalLeft,
jordanNormalCenter,
jordanNormalRight
);
}

private C1CartesianFuhrRzeszotnik (
final C1Cartesian[][] c1Grid,
final double eta,
final double rho,
final double sigma,
final double epsilon,
final R1SquareRotation2x2 jordanNormalLeft,
final C1Square jordanNormalCenter,
final R1SquareRotation2x2 jordanNormalRight)
{
super (c1Grid);

_eta = eta;
_rho = rho;
_sigma = sigma;
_epsilon = epsilon;
_jordanNormalLeft = jordanNormalLeft;
_jordanNormalRight = jordanNormalRight;
_jordanNormalCenter = jordanNormalCenter;
}

/**
* Retrieve <code>Rho</code>
*
* @return <code>Rho</code>
*/

public double rho()
{
return _rho;
}

/**
* Retrieve <code>Epsilon</code>
*
* @return <code>Epsilon</code>
*/

public double epsilon()
{
return _epsilon;
}

/**
* Retrieve <code>Eta</code>
*
* @return <code>Eta</code>
*/

public double eta()
{
return _eta;
}

/**
* Retrieve <code>Sigma</code>
*
* @return <code>Sigma</code>
*/

public double sigma()
{
return _sigma;
}

/**
* Retrieve the Jordan Normal Left Part of <i>C1CartesianPhiPsiThetaDelta</i>
*
* @return Jordan Normal Left Part of <i>C1CartesianPhiPsiThetaDelta</i>
*/

public R1SquareRotation2x2 jordanNormalLeft()
{
return _jordanNormalLeft;
}

/**
* Retrieve the Jordan Normal Center Part of <i>C1CartesianPhiPsiThetaDelta</i>
*
* @return Jordan Normal Center Part of <i>C1CartesianPhiPsiThetaDelta</i>
*/

public C1Square jordanNormalCenter()
{
return _jordanNormalCenter;
}

/**
* Retrieve the Jordan Normal Right Part of <i>C1CartesianPhiPsiThetaDelta</i>
*
* @return Jordan Normal Right Part of <i>C1CartesianPhiPsiThetaDelta</i>
*/

public R1SquareRotation2x2 jordanNormalRight()
{
return _jordanNormalRight;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -147,23 +147,43 @@ public static C1CartesianPhiAlphaBetaTheta Standard (

C1Cartesian ePowerIPhi = C1Cartesian.UnitImaginary().scale (0.5 * phi).exponentiate();

if (null == ePowerIPhi) {
return null;
}

C1Cartesian ePowerIAlpha = C1Cartesian.UnitImaginary().scale (alpha).exponentiate();

if (null == ePowerIAlpha) {
return null;
}

C1Cartesian ePowerIBeta = C1Cartesian.UnitImaginary().scale (beta).exponentiate();

C1Cartesian[][] c1Grid = new C1Cartesian[2][2];
if (null == ePowerIBeta) {
return null;
}

double sinTheta = Math.sin (theta);

double cosTheta = Math.cos (theta);

c1Grid[1][1] = ePowerIPhi.divide (ePowerIAlpha).scale (cosTheta);
C1Cartesian[][] c1Grid = new C1Cartesian[2][2];

c1Grid[0][1] = ePowerIPhi.product (ePowerIBeta).scale (sinTheta);
if (null == (c1Grid[0][0] = ePowerIPhi.product (ePowerIAlpha).scale (cosTheta))) {
return null;
}

c1Grid[0][0] = ePowerIPhi.product (ePowerIAlpha).scale (cosTheta);
if (null == (c1Grid[0][1] = ePowerIPhi.product (ePowerIBeta).scale (sinTheta))) {
return null;
}

c1Grid[1][0] = ePowerIPhi.divide (ePowerIBeta).scale (-1. * sinTheta);
if (null == (c1Grid[1][0] = ePowerIPhi.divide (ePowerIBeta).scale (-1. * sinTheta))) {
return null;
}

if (null == (c1Grid[1][1] = ePowerIPhi.divide (ePowerIAlpha).scale (cosTheta))) {
return null;
}

return new C1CartesianPhiAlphaBetaTheta (c1Grid, alpha, beta, theta, phi);
}
Expand Down
Loading

0 comments on commit b71a962

Please sign in to comment.