Skip to content

Commit

Permalink
Features:
Browse files Browse the repository at this point in the history
Bug Fixes/Re-organization:

	- Spaces Function Class Normed R^x To R^d Finite - Sample Supremum Norm (1)
	- Spaces Function Class Normed R^x To R^d Finite - Operator Population Metric Norm #1 (2, 3)
	- Spaces Function Class Normed R^x To R^d Finite - Operator Population Metric Norm #2 (4, 5, 6)
	- Spaces Function Class Normed R^x To R^d Finite - Operator Population Metric Norm #3 (7, 8)
	- Spaces Function Class Normed R^x To R^d Finite - Operator Population Supremum Norm #1 (9)
	- Spaces Function Class Normed R^x To R^d Finite - Operator Population Supremum Norm #2 (10, 11, 12)
	- Spaces Function Class Normed R^x To R^d Finite - Operator Population Supremum Norm #3 (13, 14, 15)
	- Spaces Function Class Normed R^x To R^d Finite - Operator Sample Metric Norm #1 (16, 17, 18)
	- Spaces Function Class Normed R^x To R^d Finite - Operator Sample Metric Norm #2 (19, 20, 21)
	- Spaces Function Class Normed R^x To R^d Finite - Operator Sample Metric Norm #3 (22)
	- Spaces Function Class Normed R^x To R^d Finite - Operator Sample Supremum Norm #1 (23, 24)
	- Spaces Function Class Normed R^x To R^d Finite - Operator Sample Supremum Norm #2 (25, 26, 27)
	- Spaces Function Class Normed R^x To R^d Finite - Operator Sample Supremum Norm #3 (28, 29)
	- Spaces Function Class Normed R^x To R^d Finite - R^1 (30, 31, 32)
	- Spaces Function Class Normed R^x To R^d Finite - Constructor (33, 34)
	- Spaces Function Class Normed R^x To R^d Finite - Function R^1 Set #1 (35, 36)
	- Spaces Function Class Normed R^x To R^d Finite - Function R^1 Set #2 (37, 38)
	- Spaces Function Class Normed R^1 To Finite (39, 40, 41)
	- Spaces Function Class Normed R^1 To Finite - Constructor (42, 43)
	- Spaces Function Class Normed R^1 To Finite - Function Set #1 (44, 45, 46)
	- Spaces Function Class Normed R^1 To Finite - Function Set #2 (47, 48, 49)
	- Spaces Function Class Normed R^1 To L^1 Finite (50, 51, 52)
	- Spaces Function Class Normed R^1 To L^1 Finite - Constructor (53)
	- Spaces Function Class Normed R^1 To L^1 Finite - Agnostic Covering Number Bounds #1 (54)
	- Spaces Function Class Normed R^1 To L^1 Finite - Agnostic Covering Number Bounds #2 (55, 56, 57)
	- Spaces Function Class Normed R^1 To L^1 Finite - Agnostic Covering Number Bounds #3 (58, 59, 60)


Samples:

IdeaDRIP:
  • Loading branch information
Lakshmik committed Mar 24, 2024
1 parent 4b7e934 commit b6608e9
Show file tree
Hide file tree
Showing 5 changed files with 190 additions and 101 deletions.
36 changes: 36 additions & 0 deletions ReleaseNotes/09_19_2023.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

Features:

Bug Fixes/Re-organization:

- Spaces Function Class Normed R^x To R^d Finite - Sample Supremum Norm (1)
- Spaces Function Class Normed R^x To R^d Finite - Operator Population Metric Norm #1 (2, 3)
- Spaces Function Class Normed R^x To R^d Finite - Operator Population Metric Norm #2 (4, 5, 6)
- Spaces Function Class Normed R^x To R^d Finite - Operator Population Metric Norm #3 (7, 8)
- Spaces Function Class Normed R^x To R^d Finite - Operator Population Supremum Norm #1 (9)
- Spaces Function Class Normed R^x To R^d Finite - Operator Population Supremum Norm #2 (10, 11, 12)
- Spaces Function Class Normed R^x To R^d Finite - Operator Population Supremum Norm #3 (13, 14, 15)
- Spaces Function Class Normed R^x To R^d Finite - Operator Sample Metric Norm #1 (16, 17, 18)
- Spaces Function Class Normed R^x To R^d Finite - Operator Sample Metric Norm #2 (19, 20, 21)
- Spaces Function Class Normed R^x To R^d Finite - Operator Sample Metric Norm #3 (22)
- Spaces Function Class Normed R^x To R^d Finite - Operator Sample Supremum Norm #1 (23, 24)
- Spaces Function Class Normed R^x To R^d Finite - Operator Sample Supremum Norm #2 (25, 26, 27)
- Spaces Function Class Normed R^x To R^d Finite - Operator Sample Supremum Norm #3 (28, 29)
- Spaces Function Class Normed R^x To R^d Finite - R^1 (30, 31, 32)
- Spaces Function Class Normed R^x To R^d Finite - Constructor (33, 34)
- Spaces Function Class Normed R^x To R^d Finite - Function R^1 Set #1 (35, 36)
- Spaces Function Class Normed R^x To R^d Finite - Function R^1 Set #2 (37, 38)
- Spaces Function Class Normed R^1 To Finite (39, 40, 41)
- Spaces Function Class Normed R^1 To Finite - Constructor (42, 43)
- Spaces Function Class Normed R^1 To Finite - Function Set #1 (44, 45, 46)
- Spaces Function Class Normed R^1 To Finite - Function Set #2 (47, 48, 49)
- Spaces Function Class Normed R^1 To L^1 Finite (50, 51, 52)
- Spaces Function Class Normed R^1 To L^1 Finite - Constructor (53)
- Spaces Function Class Normed R^1 To L^1 Finite - Agnostic Covering Number Bounds #1 (54)
- Spaces Function Class Normed R^1 To L^1 Finite - Agnostic Covering Number Bounds #2 (55, 56, 57)
- Spaces Function Class Normed R^1 To L^1 Finite - Agnostic Covering Number Bounds #3 (58, 59, 60)


Samples:

IdeaDRIP:
Binary file modified ScheduleSheet.xlsx
Binary file not shown.
127 changes: 74 additions & 53 deletions src/main/java/org/drip/spaces/functionclass/NormedR1ToL1R1Finite.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@

package org.drip.spaces.functionclass;

import org.drip.numerical.common.NumberUtil;
import org.drip.spaces.cover.FunctionClassCoveringBounds;
import org.drip.spaces.cover.L1R1CoveringBounds;
import org.drip.spaces.metric.R1Normed;
import org.drip.spaces.rxtor1.NormedR1ToNormedR1;

/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*/

/*!
* Copyright (C) 2025 Lakshmi Krishnamurthy
* Copyright (C) 2024 Lakshmi Krishnamurthy
* Copyright (C) 2023 Lakshmi Krishnamurthy
* Copyright (C) 2022 Lakshmi Krishnamurthy
* Copyright (C) 2021 Lakshmi Krishnamurthy
* Copyright (C) 2020 Lakshmi Krishnamurthy
Expand Down Expand Up @@ -82,7 +91,7 @@

/**
* <i>NormedR1ToL1R1Finite</i> implements the Class f E F : Normed R<sup>1</sup> To L<sub>1</sub>
* R<sup>1</sup> Spaces of Finite Functions. The Reference we've used is:
* R<sup>1</sup> Spaces of Finite Functions. The Reference we've used is:
*
* <br><br>
* <ul>
Expand All @@ -92,6 +101,12 @@
* </li>
* </ul>
*
* It provides the following Functionality:
*
* <ul>
* <li>Create Bounded R<sup>1</sup> To Bounded L1 R<sup>1</sup> Function Class for the specified Bounded Class of Finite Functions</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>
Expand All @@ -104,22 +119,24 @@
* @author Lakshmi Krishnamurthy
*/

public class NormedR1ToL1R1Finite extends org.drip.spaces.functionclass.NormedR1ToNormedR1Finite {
public class NormedR1ToL1R1Finite extends NormedR1ToNormedR1Finite
{

/**
* Create Bounded R^1 To Bounded L1 R^1 Function Class for the specified Bounded Class of Finite
* Functions
* Create Bounded R<sup>1</sup> To Bounded L1 R<sup>1</sup> Function Class for the specified Bounded
* Class of Finite Functions
*
* @param dblMaureyConstant Maurey Constant
* @param aR1ToR1 The Bounded R^1 To Bounded R^1 Function Set
* @param maureyConstant Maurey Constant
* @param aR1ToR1 The Bounded R<sup>1</sup> To Bounded R<sup>1</sup> Function Set
* @param dblPredictorSupport The Set Predictor Support
* @param dblResponseBound The Set Response Bound
*
* @return The Bounded R^1 To Bounded R^1 Function Class for the specified Function Set
* @return The Bounded R<sup>1</sup> To Bounded R<sup>1</sup> Function Class for the specified Function
* Set
*/

public static final NormedR1ToL1R1Finite BoundedPredictorBoundedResponse (
final double dblMaureyConstant,
final double maureyConstant,
final org.drip.function.definition.R1ToR1[] aR1ToR1,
final double dblPredictorSupport,
final double dblResponseBound)
Expand All @@ -143,7 +160,7 @@ public static final NormedR1ToL1R1Finite BoundedPredictorBoundedResponse (
aR1ToR1FunctionSpace[i] = new org.drip.spaces.rxtor1.NormedR1ContinuousToR1Continuous
(r1ContinuousInput, r1ContinuousOutput, aR1ToR1[i]);

return new NormedR1ToL1R1Finite (dblMaureyConstant, aR1ToR1FunctionSpace);
return new NormedR1ToL1R1Finite (maureyConstant, aR1ToR1FunctionSpace);
} catch (java.lang.Exception e) {
e.printStackTrace();
}
Expand All @@ -152,76 +169,80 @@ public static final NormedR1ToL1R1Finite BoundedPredictorBoundedResponse (
}

protected NormedR1ToL1R1Finite (
final double dblMaureyConstant,
final org.drip.spaces.rxtor1.NormedR1ToNormedR1[] aR1ToR1FunctionSpace)
final double maureyConstant,
final NormedR1ToNormedR1[] normedR1ToNormedR1Array)
throws java.lang.Exception
{
super (dblMaureyConstant, aR1ToR1FunctionSpace);
super (maureyConstant, normedR1ToNormedR1Array);
}

@Override public org.drip.spaces.cover.FunctionClassCoveringBounds agnosticCoveringNumberBounds()
@Override public FunctionClassCoveringBounds agnosticCoveringNumberBounds()
{
org.drip.spaces.rxtor1.NormedR1ToNormedR1[] aNormedR1ToNormedR1 =
(org.drip.spaces.rxtor1.NormedR1ToNormedR1[]) functionSpaces();
NormedR1ToNormedR1[] normedR1ToNormedR1Array = (NormedR1ToNormedR1[]) functionSpaces();

int iNumFunction = aNormedR1ToNormedR1.length;
double dblResponseLowerBound = java.lang.Double.NaN;
double dblResponseUpperBound = java.lang.Double.NaN;
double dblPredictorLowerBound = java.lang.Double.NaN;
double dblPredictorUpperBound = java.lang.Double.NaN;
double responseLowerBound = Double.NaN;
double responseUpperBound = Double.NaN;
double predictorLowerBound = Double.NaN;
double predictorUpperBound = Double.NaN;
int functionCount = normedR1ToNormedR1Array.length;

for (int i = 0; i < iNumFunction; ++i) {
org.drip.spaces.rxtor1.NormedR1ToNormedR1 r1Tor1 = aNormedR1ToNormedR1[i];
for (int i = 0; i < functionCount; ++i) {
NormedR1ToNormedR1 normedR1ToNormedR1 = normedR1ToNormedR1Array[i];

org.drip.spaces.metric.R1Normed runsInput = r1Tor1.inputMetricVectorSpace();
R1Normed inputR1Normed = normedR1ToNormedR1.inputMetricVectorSpace();

org.drip.spaces.metric.R1Normed runsOutput = r1Tor1.outputMetricVectorSpace();
R1Normed outputR1Normed = normedR1ToNormedR1.outputMetricVectorSpace();

if (!runsInput.isPredictorBounded() || !runsOutput.isPredictorBounded()) return null;
if (!inputR1Normed.isPredictorBounded() || !outputR1Normed.isPredictorBounded()) {
return null;
}

double dblResponseLeftBound = runsOutput.leftEdge();
double responseLeftBound = outputR1Normed.leftEdge();

double dblPredictorLeftBound = runsInput.leftEdge();
double predictorLeftBound = inputR1Normed.leftEdge();

double dblResponseRightBound = runsOutput.rightEdge();
double responseRightBound = outputR1Normed.rightEdge();

double dblPredictorRightBound = runsInput.rightEdge();
double predictorRightBound = inputR1Normed.rightEdge();

if (!org.drip.numerical.common.NumberUtil.IsValid (dblPredictorLowerBound))
dblPredictorLowerBound = dblPredictorLeftBound;
else {
if (dblPredictorLowerBound > dblPredictorLeftBound)
dblPredictorLowerBound = dblPredictorLeftBound;
if (!NumberUtil.IsValid (predictorLowerBound)) {
predictorLowerBound = predictorLeftBound;
} else {
if (predictorLowerBound > predictorLeftBound) {
predictorLowerBound = predictorLeftBound;
}
}

if (!org.drip.numerical.common.NumberUtil.IsValid (dblPredictorUpperBound))
dblPredictorUpperBound = dblPredictorRightBound;
else {
if (dblPredictorUpperBound < dblPredictorRightBound)
dblPredictorUpperBound = dblPredictorRightBound;
if (!NumberUtil.IsValid (predictorUpperBound)) {
predictorUpperBound = predictorRightBound;
} else {
if (predictorUpperBound < predictorRightBound) {
predictorUpperBound = predictorRightBound;
}
}

if (!org.drip.numerical.common.NumberUtil.IsValid (dblResponseLowerBound))
dblResponseLowerBound = dblResponseLeftBound;
else {
if (dblResponseLowerBound > dblResponseLeftBound)
dblResponseLowerBound = dblResponseLeftBound;
if (!NumberUtil.IsValid (responseLowerBound)) {
responseLowerBound = responseLeftBound;
} else {
if (responseLowerBound > responseLeftBound) {
responseLowerBound = responseLeftBound;
}
}

if (!org.drip.numerical.common.NumberUtil.IsValid (dblResponseUpperBound))
dblResponseUpperBound = dblResponseRightBound;
else {
if (dblResponseUpperBound < dblResponseRightBound)
dblResponseUpperBound = dblResponseRightBound;
if (!NumberUtil.IsValid (responseUpperBound)) {
responseUpperBound = responseRightBound;
} else {
if (responseUpperBound < responseRightBound) {
responseUpperBound = responseRightBound;
}
}
}

double dblVariation = dblResponseUpperBound - dblResponseLowerBound;
double variation = responseUpperBound - responseLowerBound;

try {
return new org.drip.spaces.cover.L1R1CoveringBounds (dblPredictorUpperBound -
dblPredictorLowerBound, dblVariation, dblVariation);
} catch (java.lang.Exception e) {
return new L1R1CoveringBounds (predictorUpperBound - predictorLowerBound, variation, variation);
} catch (Exception e) {
e.printStackTrace();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@

package org.drip.spaces.functionclass;

import org.drip.function.definition.R1ToR1;
import org.drip.spaces.rxtor1.NormedR1ToNormedR1;

/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*/

/*!
* Copyright (C) 2025 Lakshmi Krishnamurthy
* Copyright (C) 2024 Lakshmi Krishnamurthy
* Copyright (C) 2023 Lakshmi Krishnamurthy
* Copyright (C) 2022 Lakshmi Krishnamurthy
* Copyright (C) 2021 Lakshmi Krishnamurthy
* Copyright (C) 2020 Lakshmi Krishnamurthy
Expand Down Expand Up @@ -82,7 +88,7 @@

/**
* <i>NormedR1ToNormedR1Finite</i> implements the Class F of f : Normed R<sup>1</sup> To Normed R<sup>1</sup>
* Spaces of Finite Functions. The Reference we've used is:
* Spaces of Finite Functions. The Reference we've used is:
*
* <br><br>
* <ul>
Expand All @@ -92,6 +98,13 @@
* </li>
* </ul>
*
* It provides the following Functionality:
*
* <ul>
* <li><i>NormedR1ToNormedR1Finite</i> Function Class Constructor</li>
* <li>Retrieve the Finite Class of R<sup>1</sup> To R<sup>1</sup> Functions</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>
Expand All @@ -104,50 +117,53 @@
* @author Lakshmi Krishnamurthy
*/

public class NormedR1ToNormedR1Finite extends org.drip.spaces.functionclass.NormedRxToNormedR1Finite {
public class NormedR1ToNormedR1Finite extends NormedRxToNormedR1Finite
{

/**
* NormedR1ToNormedR1Finite Finite Function Class Constructor
* <i>NormedR1ToNormedR1Finite</i> Finite Function Class Constructor
*
* @param dblMaureyConstant The Maurey Constant
* @param aNormedR1ToNormedR1 Array of the Function Spaces
* @param maureyConstant The Maurey Constant
* @param normedR1ToNormedR1Array Array of the Function Spaces
*
* @throws java.lang.Exception Thrown if NormedR1ToNormedR1 Class Instance cannot be created
* @throws Exception Thrown if <i>NormedR1ToNormedR1Finite</i> Instance cannot be created
*/

public NormedR1ToNormedR1Finite (
final double dblMaureyConstant,
final org.drip.spaces.rxtor1.NormedR1ToNormedR1[] aNormedR1ToNormedR1)
throws java.lang.Exception
final double maureyConstant,
final NormedR1ToNormedR1[] normedR1ToNormedR1Array)
throws Exception
{
super (dblMaureyConstant, aNormedR1ToNormedR1);
super (maureyConstant, normedR1ToNormedR1Array);

for (int i = 0; i < aNormedR1ToNormedR1.length; ++i) {
if (null == aNormedR1ToNormedR1[i])
throw new java.lang.Exception ("NormedR1ToNormedR1Finite ctr: Invalid Input Function");
for (int i = 0; i < normedR1ToNormedR1Array.length; ++i) {
if (null == normedR1ToNormedR1Array[i]) {
throw new Exception ("NormedR1ToNormedR1Finite ctr: Invalid Input Function");
}
}
}

/**
* Retrieve the Finite Class of R^1 To R^1 Functions
* Retrieve the Finite Class of R<sup>1</sup> To R<sup>1</sup> Functions
*
* @return The Finite Class of R^1 To R^1 Functions
* @return The Finite Class of R<sup>1</sup> To R<sup>1</sup> Functions
*/

public org.drip.function.definition.R1ToR1[] functionR1ToR1Set()
public R1ToR1[] functionR1ToR1Set()
{
org.drip.spaces.rxtor1.NormedR1ToNormedR1[] aNormedR1ToNormedR1 =
(org.drip.spaces.rxtor1.NormedR1ToNormedR1[]) functionSpaces();
NormedR1ToNormedR1[] normedR1ToNormedR1Array = (NormedR1ToNormedR1[]) functionSpaces();

if (null == aNormedR1ToNormedR1) return null;
if (null == normedR1ToNormedR1Array) {
return null;
}

int iNumFunction = aNormedR1ToNormedR1.length;
org.drip.function.definition.R1ToR1[] aR1ToR1 = new
org.drip.function.definition.R1ToR1[iNumFunction];
int functionCount = normedR1ToNormedR1Array.length;
R1ToR1[] r1ToR1Array = new R1ToR1[functionCount];

for (int i = 0; i < iNumFunction; ++i)
aR1ToR1[i] = aNormedR1ToNormedR1[i].function();
for (int i = 0; i < functionCount; ++i) {
r1ToR1Array[i] = normedR1ToNormedR1Array[i].function();
}

return aR1ToR1;
return r1ToR1Array;
}
}
Loading

0 comments on commit b6608e9

Please sign in to comment.