Skip to content

Commit

Permalink
Features:
Browse files Browse the repository at this point in the history
	- C1 Square PhiAB A (1, 2)
	- C1 Square PhiAB B (3, 4)
	- C1 Square PhiAB Phi (5, 6)
	- C1 Square PhiAB Standard #1 (7, 8, 9)
	- C1 Square PhiAB Standard #2 (10, 11, 12)
	- C1 Cartesian Unit Real Standard (13, 14, 15)
	- C1 Cartesian Unit Imaginary Standard (16, 17, 18)
	- C1 Numerical Complex Cartesian Conjugate (19, 20, 21)
	- C1 Numerical Complex Cartesian Determinant (22, 23, 24)
	- Indicate if C1Square is Unitary (25, 26)
	- C1 Cartesian Phi Alpha Beta Theta Shell (27, 28, 29)
	- C1 Cartesian Phi Alpha Beta Theta #1 (30, 31)
	- C1 Cartesian Phi Alpha Beta Theta #2 (32, 33)
	- C1 Cartesian Phi Alpha Beta Theta #3 (34, 35)
	- C1 Cartesian Phi Alpha Beta Theta #4 (36, 37)
	- C1 Cartesian Phi Alpha Beta Theta Constructor (38, 39, 40)
	- C1 Cartesian Phi Alpha Beta Theta Standard #1 (41, 42, 43)
	- C1 Cartesian Phi Alpha Beta Theta Standard #2 (44, 45, 46)
	- C1 Cartesian Phi Alpha Beta Theta A (47, 48, 49)
	- C1 Cartesian Phi Alpha Beta Theta B (50, 51, 52)
	- C1 Cartesian Phi Alpha Beta Theta #5 (53, 54)
	- C1 Cartesian Phi Psi Theta Delta Shell (55, 56, 57)
	- C1 Cartesian Phi Psi Theta Delta Jordan Normal Left (58, 59)
	- C1 Cartesian Phi Psi Theta Delta Jordan Normal Right (60, 61)
	- C1 Cartesian Phi Psi Theta Delta Jordan Normal Center (62, 63)
	- C1 Cartesian Phi Psi Theta Delta #1 (64, 65)
	- C1 Cartesian Phi Psi Theta Delta #2 (66, 67)
	- C1 Cartesian Phi Psi Theta Delta #3 (68, 69)
	- C1 Cartesian Phi Psi Theta Delta #4 (70, 71)
	- C1 Cartesian Phi Psi Theta Delta Constructor #1 (72, 73)
	- C1 Cartesian Phi Psi Theta Delta Constructor #2 (74, 75)
	- C1 Cartesian Phi Psi Theta Delta #5 (76, 77, 78)
	- R1 Rotation 2x2 Shell Annotation (79, 80, 81)
	- R1 Square Rotation 2x2 Theta (82, 83, 84)
	- R1 Square Rotation 2x2 Constructor (85, 86, 87)
	- R1 Square Rotation 2x2 Standard #1 (88, 89)
	- R1 Square Rotation 2x2 Standard #2 (90, 91)
	- R1 Square Rotation 2x2 Standard #3 (92, 93)
	- C1 Square Rotation 2x2 #1 (94, 95, 96)
	- C1 Square Rotation 2x2 #2 (97, 98)
	- C1 R1 Matrix Product #1 (99, 100, 101)
	- C1 R1 Matrix Product #2 (102, 103, 104)
	- C1 R1 Matrix Product #3 (105, 106, 107)
	- C1 Grid of Complex Numbers (108, 109)
	- C1 Util Is Grid Valid (110, 111, 112)
	- C1 Util Is Vector Valid (113, 114, 115)
	- C1 Util/Vector/Grid Validity (116, 117)
	- Number Util Is Grid Valid (118, 119, 120)


Bug Fixes/Re-organization:

Samples:

IdeaDRIP:
  • Loading branch information
Lakshmik committed Aug 11, 2024
1 parent 137ad62 commit 76d7eff
Show file tree
Hide file tree
Showing 10 changed files with 1,057 additions and 13 deletions.
58 changes: 58 additions & 0 deletions ReleaseNotes/03_17_2024.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

Features:

- C1 Square PhiAB A (1, 2)
- C1 Square PhiAB B (3, 4)
- C1 Square PhiAB Phi (5, 6)
- C1 Square PhiAB Standard #1 (7, 8, 9)
- C1 Square PhiAB Standard #2 (10, 11, 12)
- C1 Cartesian Unit Real Standard (13, 14, 15)
- C1 Cartesian Unit Imaginary Standard (16, 17, 18)
- C1 Numerical Complex Cartesian Conjugate (19, 20, 21)
- C1 Numerical Complex Cartesian Determinant (22, 23, 24)
- Indicate if C1Square is Unitary (25, 26)
- C1 Cartesian Phi Alpha Beta Theta Shell (27, 28, 29)
- C1 Cartesian Phi Alpha Beta Theta #1 (30, 31)
- C1 Cartesian Phi Alpha Beta Theta #2 (32, 33)
- C1 Cartesian Phi Alpha Beta Theta #3 (34, 35)
- C1 Cartesian Phi Alpha Beta Theta #4 (36, 37)
- C1 Cartesian Phi Alpha Beta Theta Constructor (38, 39, 40)
- C1 Cartesian Phi Alpha Beta Theta Standard #1 (41, 42, 43)
- C1 Cartesian Phi Alpha Beta Theta Standard #2 (44, 45, 46)
- C1 Cartesian Phi Alpha Beta Theta A (47, 48, 49)
- C1 Cartesian Phi Alpha Beta Theta B (50, 51, 52)
- C1 Cartesian Phi Alpha Beta Theta #5 (53, 54)
- C1 Cartesian Phi Psi Theta Delta Shell (55, 56, 57)
- C1 Cartesian Phi Psi Theta Delta Jordan Normal Left (58, 59)
- C1 Cartesian Phi Psi Theta Delta Jordan Normal Right (60, 61)
- C1 Cartesian Phi Psi Theta Delta Jordan Normal Center (62, 63)
- C1 Cartesian Phi Psi Theta Delta #1 (64, 65)
- C1 Cartesian Phi Psi Theta Delta #2 (66, 67)
- C1 Cartesian Phi Psi Theta Delta #3 (68, 69)
- C1 Cartesian Phi Psi Theta Delta #4 (70, 71)
- C1 Cartesian Phi Psi Theta Delta Constructor #1 (72, 73)
- C1 Cartesian Phi Psi Theta Delta Constructor #2 (74, 75)
- C1 Cartesian Phi Psi Theta Delta #5 (76, 77, 78)
- R1 Rotation 2x2 Shell Annotation (79, 80, 81)
- R1 Square Rotation 2x2 Theta (82, 83, 84)
- R1 Square Rotation 2x2 Constructor (85, 86, 87)
- R1 Square Rotation 2x2 Standard #1 (88, 89)
- R1 Square Rotation 2x2 Standard #2 (90, 91)
- R1 Square Rotation 2x2 Standard #3 (92, 93)
- C1 Square Rotation 2x2 #1 (94, 95, 96)
- C1 Square Rotation 2x2 #2 (97, 98)
- C1 R1 Matrix Product #1 (99, 100, 101)
- C1 R1 Matrix Product #2 (102, 103, 104)
- C1 R1 Matrix Product #3 (105, 106, 107)
- C1 Grid of Complex Numbers (108, 109)
- C1 Util Is Grid Valid (110, 111, 112)
- C1 Util Is Vector Valid (113, 114, 115)
- C1 Util/Vector/Grid Validity (116, 117)
- Number Util Is Grid Valid (118, 119, 120)


Bug Fixes/Re-organization:

Samples:

IdeaDRIP:
22 changes: 22 additions & 0 deletions src/main/java/org/drip/numerical/common/NumberUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,28 @@ public static final boolean IsValid (
return true;
}

/**
* Checks if the Input Matrix contains an Infinite or an NaN
*
* @param r1Grid Input Matrix
*
* @return TRUE - Input Matrix contains an Infinite or an NaN
*/

public static final boolean IsValid (
final double[][] r1Grid)
{
if (null == r1Grid) {
return true;
}

for (int i = 0; i < r1Grid.length; ++i) {
if (!IsValid (r1Grid[i])) return false;
}

return true;
}

/**
* Compare and checks if the two input numbers fall within a specified tolerance
*
Expand Down
51 changes: 51 additions & 0 deletions src/main/java/org/drip/numerical/complex/C1Cartesian.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,40 @@ public static final C1Cartesian Zero()
return null;
}

/**
* Construct a Unit Real Complex Number
*
* @return Unit Real Complex Number
*/

public static final C1Cartesian UnitReal()
{
try {
new C1Cartesian (1., 0.);
} catch (Exception e) {
e.printStackTrace();
}

return null;
}

/**
* Construct a Unit Imaginary Complex Number
*
* @return Unit Imaginary Complex Number
*/

public static final C1Cartesian UnitImaginary()
{
try {
new C1Cartesian (0., 1.);
} catch (Exception e) {
e.printStackTrace();
}

return null;
}

/**
* CartesianComplexNumber constructor
*
Expand Down Expand Up @@ -379,6 +413,23 @@ public double dotProduct (
return C1Util.UnsafeDotProduct (this, other);
}

/**
* Compute Conjugate of the Complex Number
*
* @return The Complex Number Conjugate Instance
*/

public C1Cartesian conjugate()
{
try {
return new C1Cartesian (_real, -1. * _imaginary);
} catch (Exception e) {
e.printStackTrace();
}

return null;
}

/**
* Display the Real/Imaginary Contents
*
Expand Down
51 changes: 49 additions & 2 deletions src/main/java/org/drip/numerical/complex/C1CartesianPhiAB.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

package org.drip.numerical.complex;

import org.drip.numerical.common.NumberUtil;

/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*/
Expand Down Expand Up @@ -74,8 +76,8 @@
*/

/**
* <i>C1CartesianPhiAB</i> implements the type and Functionality associated with a C<sup>1</sup>Square Matrix
* parameterized by <code>a</code>, <code>b</code>, and <code>phi</code> Fields. The References are:
* <i>C1CartesianPhiAB</i> implements the type and Functionality associated with a C<sup>1</sup> Square
* Matrix parameterized by <code>a</code>, <code>b</code>, and <code>phi</code> Fields. The References are:
*
* <br><br>
* <ul>
Expand Down Expand Up @@ -118,6 +120,40 @@ public class C1CartesianPhiAB extends C1Square
private C1Cartesian _b = null;
private double _phi = Double.NaN;

/**
* Construct a Standard Instance of <i>C1CartesianPhiAB</i>
*
* @param a "A"
* @param b "B"
* @param phi "Phi"
*
* @return <i>C1CartesianPhiAB</i> Instance
*/

public static C1CartesianPhiAB Standard (
final C1Cartesian a,
final C1Cartesian b,
final double phi)
{
if (null == a || null == b || !NumberUtil.IsValid (phi) ||
NumberUtil.WithinTolerance (a.square().modulus() + b.square().modulus(), 1.))
{
return null;
}

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

C1Cartesian[][] c1Grid = new C1Cartesian[2][2];
c1Grid[0][1] = b;
c1Grid[0][0] = a;

c1Grid[1][1] = ePowerIPhi.product (a.conjugate());

c1Grid[1][0] = ePowerIPhi.product (b.conjugate()).scale (-1.);

return new C1CartesianPhiAB (c1Grid, a, b, phi);
}

private C1CartesianPhiAB (
final C1Cartesian[][] c1Grid,
final C1Cartesian a,
Expand Down Expand Up @@ -163,4 +199,15 @@ public double phi()
{
return _phi;
}

/**
* Retrieve the Determinant
*
* @return The Determinant
*/

@Override public double determinant()
{
return C1Cartesian.UnitImaginary().scale (_phi).l2Norm();
}
}
Loading

0 comments on commit 76d7eff

Please sign in to comment.