diff --git a/ReleaseNotes/09_12_2023.txt b/ReleaseNotes/09_12_2023.txt new file mode 100644 index 00000000000..d9eee8717ee --- /dev/null +++ b/ReleaseNotes/09_12_2023.txt @@ -0,0 +1,44 @@ + +Features: + +Bug Fixes/Re-organization: + + - Spaces Cover Carl Stephanie Normed Bounds - Entropy Bound Normed B (1) + - Spaces Cover Carl Stephanie Normed Bounds - Constructor (2) + - Spaces Cover Carl Stephanie Normed Bounds - Minimum Upper Bound (3) + - Spaces Cover Carl Stephanie Product Bounds (4, 5, 6) + - Spaces Cover Carl Stephanie Product Bounds - Function Class R^x -> A (7, 8) + - Spaces Cover Carl Stephanie Product Bounds - Function Class R^x -> B (9, 10) + - Spaces Cover Carl Stephanie Product Bounds - Constructor (11) + - Spaces Cover Carl Stephanie Product Bounds - Population Metric Entropy Number (12) + - Spaces Cover Carl Stephanie Product Bounds - Population Supremum Entropy Number (13) + - Spaces Cover Carl Stephanie Product Bounds - Sample Metric Entropy Number (14) + - Spaces Cover Carl Stephanie Product Bounds - Sample Supremum Entropy Number (15) + - Spaces Cover Carl Stephanie Product Bounds - Normed Entropy Upper Bound (16, 17) + - Spaces Cover Carl Stephanie Product Bounds - Population Supremum Entropy Bound (18) + - Spaces Cover Carl Stephanie Product Bounds - Population Metric Entropy Bound (19) + - Spaces Cover Carl Stephanie Product Bounds - Sample Supremum Entropy Bound (20) + - Spaces Cover Carl Stephanie Product Bounds - Sample Metric Entropy Norm (21) + - Spaces Cover Covering Bounds Helper (22, 23, 24) + - Spaces Cover Covering Bounds Helper - Dyadic Entropy Number (25, 26) + - Spaces Cover Covering Bounds Helper - Carl Stephani Product Bound (27, 28) + - Spaces Cover Covering Bounds Helper - Carl Stephani Product Norm (29, 30, 31) + - Spaces Cover Function Class Covering Bounds (32, 33, 34) + - Spaces Cover Function Class Covering Bounds - Log Lower Bound (35) + - Spaces Cover Function Class Covering Bounds - Log Upper Bound (36) + - Spaces Cover L^1 R^1 Covering Bounds (37, 38, 39) + - Spaces Cover L^1 R^1 Covering Bounds - Bound (40, 41) + - Spaces Cover L^1 R^1 Covering Bounds - Support (42, 43) + - Spaces Cover L^1 R^1 Covering Bounds - Variation (44, 45) + - Spaces Cover L^1 R^1 Covering Bounds - Constructor (46, 47) + - Spaces Cover L^1 R^1 Covering Bounds - Log Lower Bound #1 (48, 49, 50) + - Spaces Cover L^1 R^1 Covering Bounds - Log Lower Bound #2 (51, 52) + - Spaces Cover L^1 R^1 Covering Bounds - Log Upper Bound #1 (53, 54) + - Spaces Cover L^1 R^1 Covering Bounds - Log Upper Bound #2 (55, 56) + - Spaces Cover Maurey Operator Covering Bounds (57, 58, 59) + - Spaces Cover Maurey Operator Covering Bounds - Constant - from the Hilbert - Supremum Identity Map Estimate (60) + + +Samples: + +IdeaDRIP: diff --git a/ScheduleSheet.xlsx b/ScheduleSheet.xlsx index f8bd0cf27a9..e67fcac1ee8 100644 Binary files a/ScheduleSheet.xlsx and b/ScheduleSheet.xlsx differ diff --git a/src/main/java/org/drip/spaces/cover/CarlStephaniProductBounds.java b/src/main/java/org/drip/spaces/cover/CarlStephaniProductBounds.java index 356c381e7f3..6549f47d95c 100644 --- a/src/main/java/org/drip/spaces/cover/CarlStephaniProductBounds.java +++ b/src/main/java/org/drip/spaces/cover/CarlStephaniProductBounds.java @@ -1,11 +1,17 @@ package org.drip.spaces.cover; +import org.drip.spaces.functionclass.NormedRxToNormedRxFinite; +import org.drip.spaces.instance.GeneralizedValidatedVector; + /* * -*- 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 @@ -82,7 +88,7 @@ /** * CarlStephaniProductBounds implements the Bounds that result from the Convolution Product Product of - * 2 Normed Rx To Normed Rx Function Spaces. The References are: + * 2 Normed Rx To Normed Rx Function Spaces. The References are: * *

* * - *

+ * It provides the following Functionality: + * * - *

+ * + *
+ * + * + * + * + * + * + * + *
Module Computational Core Module
Library Statistical Learning Library
Project R1 and Rd Vector/Tensor Spaces (Validated and/or Normed), and Function Classes
Package Vector Spaces Covering Number Estimator
* * @author Lakshmi Krishnamurthy */ -public class CarlStephaniProductBounds { - private org.drip.spaces.functionclass.NormedRxToNormedRxFinite _funcClassRxRxA = null; - private org.drip.spaces.functionclass.NormedRxToNormedRxFinite _funcClassRxRxB = null; +public class CarlStephaniProductBounds +{ + private NormedRxToNormedRxFinite _functionClassRxRxA = null; + private NormedRxToNormedRxFinite _functionClassRxRxB = null; /** - * CarlStephaniProductBounds Constructor + * CarlStephaniProductBounds Constructor * - * @param funcClassRxRxA Function Class A - * @param funcClassRxRxB Function Class B + * @param functionClassRxRxA Function Class A + * @param functionClassRxRxB Function Class B * - * @throws java.lang.Exception Thrown if the Inputs are Invalid + * @throws Exception Thrown if the Inputs are Invalid */ public CarlStephaniProductBounds ( - final org.drip.spaces.functionclass.NormedRxToNormedRxFinite funcClassRxRxA, - final org.drip.spaces.functionclass.NormedRxToNormedRxFinite funcClassRxRxB) - throws java.lang.Exception + final NormedRxToNormedRxFinite functionClassRxRxA, + final NormedRxToNormedRxFinite functionClassRxRxB) + throws Exception { - if (null == (_funcClassRxRxA = funcClassRxRxA) || null == (_funcClassRxRxB = funcClassRxRxB)) - throw new java.lang.Exception ("CarlStephaniProductBounds ctr: Invalid Inputs"); + if (null == (_functionClassRxRxA = functionClassRxRxA) || + null == (_functionClassRxRxB = functionClassRxRxB)) + { + throw new Exception ("CarlStephaniProductBounds ctr: Invalid Inputs"); + } } /** @@ -141,9 +173,9 @@ public CarlStephaniProductBounds ( * @return The Function Class A */ - public org.drip.spaces.functionclass.NormedRxToNormedRxFinite funcClassA() + public NormedRxToNormedRxFinite funcClassA() { - return _funcClassRxRxA; + return _functionClassRxRxA; } /** @@ -152,143 +184,155 @@ public org.drip.spaces.functionclass.NormedRxToNormedRxFinite funcClassA() * @return The Function Class B */ - public org.drip.spaces.functionclass.NormedRxToNormedRxFinite funcClassB() + public NormedRxToNormedRxFinite funcClassB() { - return _funcClassRxRxB; + return _functionClassRxRxB; } /** * Compute the Upper Bound for the Entropy Number of the Operator Population Metric Covering Number * Convolution Product Product across both the Function Classes * - * @param iEntropyNumberIndexA Entropy Number Index for Class A - * @param iEntropyNumberIndexB Entropy Number Index for Class B + * @param entropyNumberIndexA Entropy Number Index for Class A + * @param entropyNumberIndexB Entropy Number Index for Class B * * @return The Upper Bound for the Entropy Number of the Operator Population Metric Covering Number * Convolution Product Product across both the Function Classes * - * @throws java.lang.Exception Thrown if the Convolution Product Product Population Metric Entropy Number cannot be - * Computed + * @throws Exception Thrown if the Convolution Product Product Population Metric Entropy Number cannot be + * computed */ public double populationMetricEntropyNumber ( - final int iEntropyNumberIndexA, - final int iEntropyNumberIndexB) - throws java.lang.Exception + final int entropyNumberIndexA, + final int entropyNumberIndexB) + throws Exception { - return org.drip.spaces.cover.CoveringBoundsHelper.CarlStephaniProductBound - (_funcClassRxRxA.populationMetricCoveringBounds(), - _funcClassRxRxB.populationMetricCoveringBounds(), iEntropyNumberIndexA, - iEntropyNumberIndexB); + return CoveringBoundsHelper.CarlStephaniProductBound ( + _functionClassRxRxA.populationMetricCoveringBounds(), + _functionClassRxRxB.populationMetricCoveringBounds(), + entropyNumberIndexA, + entropyNumberIndexB + ); } /** * Compute the Upper Bound for the Entropy Number of the Operator Population Supremum Covering Number * Convolution Product across both the Function Classes * - * @param iEntropyNumberIndexA Entropy Number Index for Class A - * @param iEntropyNumberIndexB Entropy Number Index for Class B + * @param entropyNumberIndexA Entropy Number Index for Class A + * @param entropyNumberIndexB Entropy Number Index for Class B * * @return The Upper Bound for the Entropy Number of the Operator Population Supremum Covering Number * Convolution Product across both the Function Classes * - * @throws java.lang.Exception Thrown if the Convolution Product Population Supremum Dyadic Entropy cannot be + * @throws Exception Thrown if the Convolution Product Population Supremum Dyadic Entropy cannot be * Computed */ public double populationSupremumEntropyNumber ( - final int iEntropyNumberIndexA, - final int iEntropyNumberIndexB) - throws java.lang.Exception + final int entropyNumberIndexA, + final int entropyNumberIndexB) + throws Exception { - return org.drip.spaces.cover.CoveringBoundsHelper.CarlStephaniProductBound - (_funcClassRxRxA.populationSupremumCoveringBounds(), - _funcClassRxRxB.populationSupremumCoveringBounds(), iEntropyNumberIndexA, - iEntropyNumberIndexB); + return CoveringBoundsHelper.CarlStephaniProductBound ( + _functionClassRxRxA.populationSupremumCoveringBounds(), + _functionClassRxRxB.populationSupremumCoveringBounds(), + entropyNumberIndexA, + entropyNumberIndexB + ); } /** * Compute the Upper Bound for the Entropy Number of the Operator Sample Metric Covering Number * Convolution Product across both the Function Classes * - * @param gvviA The Validated Input Vector Space Instance for Class A - * @param gvviB The Validated Input Vector Space Instance for Class B - * @param iEntropyNumberIndexA Entropy Number Index for Class A - * @param iEntropyNumberIndexB Entropy Number Index for Class B + * @param generalizedValidatedVectorA The Validated Input Vector Space Instance for Class A + * @param generalizedValidatedVectorB The Validated Input Vector Space Instance for Class B + * @param entropyNumberIndexA Entropy Number Index for Class A + * @param entropyNumberIndexB Entropy Number Index for Class B * * @return The Upper Bound for the Entropy Number of the Operator Sample Metric Covering Number * Convolution Product across both the Function Classes * - * @throws java.lang.Exception Thrown if the Convolution Product Sample Metric Entropy Number cannot be + * @throws Exception Thrown if the Convolution Product Sample Metric Entropy Number cannot be * Computed */ public double sampleMetricEntropyNumber ( - final org.drip.spaces.instance.GeneralizedValidatedVector gvviA, - final org.drip.spaces.instance.GeneralizedValidatedVector gvviB, - final int iEntropyNumberIndexA, - final int iEntropyNumberIndexB) - throws java.lang.Exception + final GeneralizedValidatedVector generalizedValidatedVectorA, + final GeneralizedValidatedVector generalizedValidatedVectorB, + final int entropyNumberIndexA, + final int entropyNumberIndexB) + throws Exception { - return org.drip.spaces.cover.CoveringBoundsHelper.CarlStephaniProductBound - (_funcClassRxRxA.sampleMetricCoveringBounds (gvviA), - _funcClassRxRxB.sampleMetricCoveringBounds (gvviB), iEntropyNumberIndexA, - iEntropyNumberIndexB); + return CoveringBoundsHelper.CarlStephaniProductBound ( + _functionClassRxRxA.sampleMetricCoveringBounds (generalizedValidatedVectorA), + _functionClassRxRxB.sampleMetricCoveringBounds (generalizedValidatedVectorB), + entropyNumberIndexA, + entropyNumberIndexB + ); } /** * Compute the Upper Bound for the Entropy Number of the Operator Sample Supremum Covering Number * Convolution Product across both the Function Classes * - * @param gvviA The Validated Input Vector Space Instance for Class A - * @param gvviB The Validated Input Vector Space Instance for Class B - * @param iEntropyNumberIndexA Entropy Number Index for Class A - * @param iEntropyNumberIndexB Entropy Number Index for Class B + * @param generalizedValidatedVectorA The Validated Input Vector Space Instance for Class A + * @param generalizedValidatedVectorB The Validated Input Vector Space Instance for Class B + * @param entropyNumberIndexA Entropy Number Index for Class A + * @param entropyNumberIndexB Entropy Number Index for Class B * * @return The Upper Bound for the Entropy Number of the Operator Sample Supremum Covering Number * Convolution Product across both the Function Classes * - * @throws java.lang.Exception Thrown if the Convolution Product Sample Supremum Entropy Number cannot be + * @throws Exception Thrown if the Convolution Product Sample Supremum Entropy Number cannot be * Computed */ public double sampleSupremumEntropyNumber ( - final org.drip.spaces.instance.GeneralizedValidatedVector gvviA, - final org.drip.spaces.instance.GeneralizedValidatedVector gvviB, - final int iEntropyNumberIndexA, - final int iEntropyNumberIndexB) + final GeneralizedValidatedVector generalizedValidatedVectorA, + final GeneralizedValidatedVector generalizedValidatedVectorB, + final int entropyNumberIndexA, + final int entropyNumberIndexB) throws java.lang.Exception { - return org.drip.spaces.cover.CoveringBoundsHelper.CarlStephaniProductBound - (_funcClassRxRxA.sampleSupremumCoveringBounds (gvviA), - _funcClassRxRxB.sampleSupremumCoveringBounds (gvviB), iEntropyNumberIndexA, - iEntropyNumberIndexB); + return CoveringBoundsHelper.CarlStephaniProductBound ( + _functionClassRxRxA.sampleSupremumCoveringBounds (generalizedValidatedVectorA), + _functionClassRxRxB.sampleSupremumCoveringBounds (generalizedValidatedVectorB), + entropyNumberIndexA, + entropyNumberIndexB + ); } /** * Compute the Normed Upper Entropy Convolution Product Bound across the Function Classes * - * @param mocbA The Maurey Operator Covering Bounds for Class A - * @param mocbB The Maurey Operator Covering Bounds for Class B - * @param iEntropyNumberIndex Entropy Number Index for either Class - * @param bUseSupremumNorm TRUE/FALSE - Use the Supremum/Metric Bound as the Operator Function Class + * @param maureyOperatorCoveringBoundsA The Maurey Operator Covering Bounds for Class A + * @param maureyOperatorCoveringBoundsB The Maurey Operator Covering Bounds for Class B + * @param entropyNumberIndex Entropy Number Index for either Class + * @param useSupremumNorm TRUE/FALSE - Use the Supremum/Metric Bound as the Operator Function Class * * @return The Normed Upper Entropy Convolution Product Bound across the Function Classes */ - public org.drip.spaces.cover.CarlStephaniNormedBounds normedEntropyUpperBound ( - final org.drip.spaces.cover.MaureyOperatorCoveringBounds mocbA, - final org.drip.spaces.cover.MaureyOperatorCoveringBounds mocbB, - final int iEntropyNumberIndex, - final boolean bUseSupremumNorm) + public CarlStephaniNormedBounds normedEntropyUpperBound ( + final MaureyOperatorCoveringBounds maureyOperatorCoveringBoundsA, + final MaureyOperatorCoveringBounds maureyOperatorCoveringBoundsB, + final int entropyNumberIndex, + final boolean useSupremumNorm) { try { - return org.drip.spaces.cover.CoveringBoundsHelper.CarlStephaniProductNorm (mocbA, mocbB, - bUseSupremumNorm ? _funcClassRxRxA.operatorPopulationSupremumNorm() : - _funcClassRxRxA.operatorPopulationMetricNorm(), bUseSupremumNorm ? - _funcClassRxRxB.operatorPopulationSupremumNorm() : - _funcClassRxRxB.operatorPopulationMetricNorm(), iEntropyNumberIndex); - } catch (java.lang.Exception e) { + return CoveringBoundsHelper.CarlStephaniProductNorm ( + maureyOperatorCoveringBoundsA, + maureyOperatorCoveringBoundsB, + useSupremumNorm ? _functionClassRxRxA.operatorPopulationSupremumNorm() : + _functionClassRxRxA.operatorPopulationMetricNorm(), + useSupremumNorm ? _functionClassRxRxB.operatorPopulationSupremumNorm() : + _functionClassRxRxB.operatorPopulationMetricNorm(), + entropyNumberIndex + ); + } catch (Exception e) { e.printStackTrace(); } @@ -299,83 +343,99 @@ public org.drip.spaces.cover.CarlStephaniNormedBounds normedEntropyUpperBound ( * Compute the Population Supremum Carl-Stephani Entropy Number Upper Bound using either the * Metric/Supremum Population Norm * - * @param iEntropyNumberIndex Entropy Number Index for either Class - * @param bUseSupremumNorm TRUE/FALSE - Use the Supremum/Metric Bound as the Operator Function Class + * @param entropyNumberIndex Entropy Number Index for either Class + * @param useSupremumNorm TRUE/FALSE - Use the Supremum/Metric Bound as the Operator Function Class * * @return The Population Supremum Carl-Stephani Entropy Number Upper Bound using either the * Metric/Supremum Population Norm */ - public org.drip.spaces.cover.CarlStephaniNormedBounds populationSupremumEntropyNorm ( - final int iEntropyNumberIndex, - final boolean bUseSupremumNorm) + public CarlStephaniNormedBounds populationSupremumEntropyNorm ( + final int entropyNumberIndex, + final boolean useSupremumNorm) { - return normedEntropyUpperBound (_funcClassRxRxA.populationSupremumCoveringBounds(), - _funcClassRxRxB.populationSupremumCoveringBounds(), iEntropyNumberIndex, bUseSupremumNorm); + return normedEntropyUpperBound ( + _functionClassRxRxA.populationSupremumCoveringBounds(), + _functionClassRxRxB.populationSupremumCoveringBounds(), + entropyNumberIndex, + useSupremumNorm + ); } /** * Compute the Population Metric Carl-Stephani Entropy Number Upper Bound using either the * Metric/Supremum Population Norm * - * @param iEntropyNumberIndex Entropy Number Index for either Class - * @param bUseSupremumNorm TRUE/FALSE - Use the Supremum/Metric Bound as the Operator Function Class + * @param entropyNumberIndex Entropy Number Index for either Class + * @param useSupremumNorm TRUE/FALSE - Use the Supremum/Metric Bound as the Operator Function Class * * @return The Population Metric Carl-Stephani Entropy Number Upper Bound using either the * Metric/Supremum Population Norm */ - public org.drip.spaces.cover.CarlStephaniNormedBounds populationMetricEntropyNorm ( - final int iEntropyNumberIndex, - final boolean bUseSupremumNorm) + public CarlStephaniNormedBounds populationMetricEntropyNorm ( + final int entropyNumberIndex, + final boolean useSupremumNorm) { - return normedEntropyUpperBound (_funcClassRxRxA.populationMetricCoveringBounds(), - _funcClassRxRxB.populationMetricCoveringBounds(), iEntropyNumberIndex, bUseSupremumNorm); + return normedEntropyUpperBound ( + _functionClassRxRxA.populationMetricCoveringBounds(), + _functionClassRxRxB.populationMetricCoveringBounds(), + entropyNumberIndex, + useSupremumNorm + ); } /** * Compute the Sample Supremum Carl-Stephani Entropy Number Upper Bound using either the Metric/Supremum * Population Norm * - * @param gvviA The Validated Input Vector Space Instance for Class A - * @param gvviB The Validated Input Vector Space Instance for Class B - * @param iEntropyNumberIndex Entropy Number Index for either Class - * @param bUseSupremumNorm TRUE/FALSE - Use the Supremum/Metric Bound as the Operator Function Class + * @param generalizedValidatedVectorA The Validated Input Vector Space Instance for Class A + * @param generalizedValidatedVectorB The Validated Input Vector Space Instance for Class B + * @param entropyNumberIndex Entropy Number Index for either Class + * @param useSupremumNorm TRUE/FALSE - Use the Supremum/Metric Bound as the Operator Function Class * * @return The Sample Supremum Carl-Stephani Entropy Number Upper Bound using either the Metric/Supremum * Population Norm */ - public org.drip.spaces.cover.CarlStephaniNormedBounds sampleSupremumEntropyNorm ( - final org.drip.spaces.instance.GeneralizedValidatedVector gvviA, - final org.drip.spaces.instance.GeneralizedValidatedVector gvviB, - final int iEntropyNumberIndex, - final boolean bUseSupremumNorm) + public CarlStephaniNormedBounds sampleSupremumEntropyNorm ( + final GeneralizedValidatedVector generalizedValidatedVectorA, + final GeneralizedValidatedVector generalizedValidatedVectorB, + final int entropyNumberIndex, + final boolean useSupremumNorm) { - return normedEntropyUpperBound (_funcClassRxRxA.sampleSupremumCoveringBounds (gvviA), - _funcClassRxRxB.sampleSupremumCoveringBounds (gvviB), iEntropyNumberIndex, bUseSupremumNorm); + return normedEntropyUpperBound ( + _functionClassRxRxA.sampleSupremumCoveringBounds (generalizedValidatedVectorA), + _functionClassRxRxB.sampleSupremumCoveringBounds (generalizedValidatedVectorB), + entropyNumberIndex, + useSupremumNorm + ); } /** * Compute the Sample Metric Carl-Stephani Entropy Number Upper Bound using either the Metric/Supremum * Population Norm * - * @param gvviA The Validated Input Vector Space Instance for Class A - * @param gvviB The Validated Input Vector Space Instance for Class B - * @param iEntropyNumberIndex Entropy Number Index for either Class - * @param bUseSupremumNorm TRUE/FALSE - Use the Supremum/Metric Bound as the Operator Function Class + * @param generalizedValidatedVectorA The Validated Input Vector Space Instance for Class A + * @param generalizedValidatedVectorB The Validated Input Vector Space Instance for Class B + * @param entropyNumberIndex Entropy Number Index for either Class + * @param useSupremumNorm TRUE/FALSE - Use the Supremum/Metric Bound as the Operator Function Class * * @return The Sample Metric Carl-Stephani Entropy Number Upper Bound using either the Metric/Supremum * Population Norm */ - public org.drip.spaces.cover.CarlStephaniNormedBounds sampleMetricEntropyNorm ( - final org.drip.spaces.instance.GeneralizedValidatedVector gvviA, - final org.drip.spaces.instance.GeneralizedValidatedVector gvviB, - final int iEntropyNumberIndex, - final boolean bUseSupremumNorm) + public CarlStephaniNormedBounds sampleMetricEntropyNorm ( + final GeneralizedValidatedVector generalizedValidatedVectorA, + final GeneralizedValidatedVector generalizedValidatedVectorB, + final int entropyNumberIndex, + final boolean useSupremumNorm) { - return normedEntropyUpperBound (_funcClassRxRxA.sampleMetricCoveringBounds (gvviA), - _funcClassRxRxB.sampleMetricCoveringBounds (gvviB), iEntropyNumberIndex, bUseSupremumNorm); + return normedEntropyUpperBound ( + _functionClassRxRxA.sampleMetricCoveringBounds (generalizedValidatedVectorA), + _functionClassRxRxB.sampleMetricCoveringBounds (generalizedValidatedVectorB), + entropyNumberIndex, + useSupremumNorm + ); } } diff --git a/src/main/java/org/drip/spaces/cover/CoveringBoundsHelper.java b/src/main/java/org/drip/spaces/cover/CoveringBoundsHelper.java index b6ce7e49921..3fc707c4b0d 100644 --- a/src/main/java/org/drip/spaces/cover/CoveringBoundsHelper.java +++ b/src/main/java/org/drip/spaces/cover/CoveringBoundsHelper.java @@ -1,11 +1,16 @@ package org.drip.spaces.cover; +import org.drip.numerical.common.NumberUtil; + /* * -*- 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 @@ -82,7 +87,7 @@ /** * CoveringBoundsHelper contains the assortment of Utilities used in the Computation of Upper Bounds - * for Normed Single Function Spaces and Function Space Products. The References are: + * for Normed Single Function Spaces and Function Space Products. The References are: * *

* * - *

+ * It provides the following Functionality: + * * - *

+ * + *
+ * + * + * + * + * + * + * + *
Module Computational Core Module
Library Statistical Learning Library
Project R1 and Rd Vector/Tensor Spaces (Validated and/or Normed), and Function Classes
Package Vector Spaces Covering Number Estimator
* * @author Lakshmi Krishnamurthy */ -public class CoveringBoundsHelper { +public class CoveringBoundsHelper +{ /** - * Compute the Dyadic Entropy Number from the nth Entropy Number + * Compute the Dyadic Entropy Number from the nth Entropy Number * - * @param dblLogNEntropyNumber Log of the nth Entropy Number + * @param logNEntropyNumber Log of the nth Entropy Number * * @return The Dyadic Entropy Number * - * @throws java.lang.Exception Thrown if the Dyadic Entropy Number cannot be calculated + * @throws Exception Thrown if the Dyadic Entropy Number cannot be calculated */ public static final double DyadicEntropyNumber ( - final double dblLogNEntropyNumber) - throws java.lang.Exception + final double logNEntropyNumber) + throws Exception { - if (!org.drip.numerical.common.NumberUtil.IsValid (dblLogNEntropyNumber)) - throw new java.lang.Exception ("CoveringBoundsHelper::DyadicEntropyNumber => Invalid Inputs"); + if (!NumberUtil.IsValid (logNEntropyNumber)) { + throw new Exception ("CoveringBoundsHelper::DyadicEntropyNumber => Invalid Inputs"); + } - return 1. + (dblLogNEntropyNumber / java.lang.Math.log (2.)); + return 1. + (logNEntropyNumber / Math.log (2.)); } /** * Compute the Upper Bound for the Entropy Number of the Operator Custom Covering Number Metric Product * across both the Function Classes * - * @param mocbA The Maurey Operator Covering Bounds for Class A - * @param mocbB The Maurey Operator Covering Bounds for Class B - * @param iEntropyNumberIndexA Entropy Number Index for Class A - * @param iEntropyNumberIndexB Entropy Number Index for Class B + * @param maureyOperatorCoveringBoundsA The Maurey Operator Covering Bounds for Class A + * @param maureyOperatorCoveringBoundsB The Maurey Operator Covering Bounds for Class B + * @param entropyNumberIndexA Entropy Number Index for Class A + * @param entropyNumberIndexB Entropy Number Index for Class B * * @return The Upper Bound for the Entropy Number of the Operator Custom Covering Number Metric Product * across both the Function Classes * - * @throws java.lang.Exception Thrown if the Inputs are Invalid + * @throws Exception Thrown if the Inputs are Invalid */ public static final double CarlStephaniProductBound ( - final org.drip.spaces.cover.MaureyOperatorCoveringBounds mocbA, - final org.drip.spaces.cover.MaureyOperatorCoveringBounds mocbB, - final int iEntropyNumberIndexA, - final int iEntropyNumberIndexB) - throws java.lang.Exception + final MaureyOperatorCoveringBounds maureyOperatorCoveringBoundsA, + final MaureyOperatorCoveringBounds maureyOperatorCoveringBoundsB, + final int entropyNumberIndexA, + final int entropyNumberIndexB) + throws Exception { - if (null == mocbA || null == mocbB) - throw new java.lang.Exception - ("CoveringBoundsHelper::CarlStephaniProductBound => Invalid Maurey Bounds for the Function Class"); + if (null == maureyOperatorCoveringBoundsA || null == maureyOperatorCoveringBoundsB) { + throw new Exception ( + "CoveringBoundsHelper::CarlStephaniProductBound => Invalid Maurey Bounds for the Function Class" + ); + } - return mocbA.entropyNumberUpperBound (iEntropyNumberIndexA) * mocbB.entropyNumberUpperBound - (iEntropyNumberIndexB); + return maureyOperatorCoveringBoundsA.entropyNumberUpperBound (entropyNumberIndexA) * + maureyOperatorCoveringBoundsB.entropyNumberUpperBound (entropyNumberIndexB); } /** * Compute the Upper Bound for the Entropy Number of the Operator Custom Covering Number Metric Product * across both the Function Classes using the Function Class Norm * - * @param mocbA The Maurey Operator Covering Bounds for Class A - * @param mocbB The Maurey Operator Covering Bounds for Class B - * @param dblNormA The Function Class A Norm - * @param dblNormB The Function Class B Norm - * @param iEntropyNumberIndex Entropy Number Index for either Class + * @param maureyOperatorCoveringBoundsA The Maurey Operator Covering Bounds for Class A + * @param maureyOperatorCoveringBoundsB The Maurey Operator Covering Bounds for Class B + * @param normA The Function Class A Norm + * @param normB The Function Class B Norm + * @param entropyNumberIndex Entropy Number Index for either Class * - * @return The Upper Bound for the Entropy Number of the Operator Custom Covering Number Metric - * Product across both the Function Classes using the Function Norm + * @return The Upper Bound for the Entropy Number of the Operator Custom Covering Number Metric Product + * across both the Function Classes using the Function Norm */ - public static final org.drip.spaces.cover.CarlStephaniNormedBounds CarlStephaniProductNorm ( - final org.drip.spaces.cover.MaureyOperatorCoveringBounds mocbA, - final org.drip.spaces.cover.MaureyOperatorCoveringBounds mocbB, - final double dblNormA, - final double dblNormB, - final int iEntropyNumberIndex) + public static final CarlStephaniNormedBounds CarlStephaniProductNorm ( + final MaureyOperatorCoveringBounds maureyOperatorCoveringBoundsA, + final MaureyOperatorCoveringBounds maureyOperatorCoveringBoundsB, + final double normA, + final double normB, + final int entropyNumberIndex) { - if (null == mocbA || null == mocbB) return null; + if (null == maureyOperatorCoveringBoundsA || null == maureyOperatorCoveringBoundsB) { + return null; + } try { - return new org.drip.spaces.cover.CarlStephaniNormedBounds (mocbA.entropyNumberUpperBound - (iEntropyNumberIndex) * dblNormB, mocbB.entropyNumberUpperBound (iEntropyNumberIndex) * - dblNormA); - } catch (java.lang.Exception e) { + return new CarlStephaniNormedBounds ( + maureyOperatorCoveringBoundsA.entropyNumberUpperBound (entropyNumberIndex) * normB, + maureyOperatorCoveringBoundsB.entropyNumberUpperBound (entropyNumberIndex) * normA + ); + } catch (Exception e) { e.printStackTrace(); } diff --git a/src/main/java/org/drip/spaces/cover/FunctionClassCoveringBounds.java b/src/main/java/org/drip/spaces/cover/FunctionClassCoveringBounds.java index cd7d92de3b9..c0e3f9a6604 100644 --- a/src/main/java/org/drip/spaces/cover/FunctionClassCoveringBounds.java +++ b/src/main/java/org/drip/spaces/cover/FunctionClassCoveringBounds.java @@ -6,6 +6,9 @@ */ /*! + * 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 @@ -82,7 +85,7 @@ /** * FunctionClassCoveringBounds implements the estimate Lower/Upper Bounds and/or Absolute Values of - * the Covering Number for the Function Class. The Main References are: + * the Covering Number for the Function Class. The Main References are: * *

* * - *

+ * It provides the following Functionality: + * * - *

+ * + *
+ * + * + * + * + * + * + * + *
Module Computational Core Module
Library Statistical Learning Library
Project R1 and Rd Vector/Tensor Spaces (Validated and/or Normed), and Function Classes
Package Vector Spaces Covering Number Estimator
* * @author Lakshmi Krishnamurthy */ -public interface FunctionClassCoveringBounds { +public interface FunctionClassCoveringBounds +{ /** * Log of the Lower Bound of the Function Covering Number * - * @param dblCover The Size of the Cover + * @param cover The Size of the Cover * * @return Log of the Lower Bound of the Function Covering Number * - * @throws java.lang.Exception Thrown if the Inputs are Invalid + * @throws Exception Thrown if the Inputs are Invalid */ public abstract double logLowerBound ( - final double dblCover) - throws java.lang.Exception; + final double cover + ) throws Exception; /** * Log of the Upper Bound of the Function Covering Number * - * @param dblCover The Size of the Cover + * @param cover The Size of the Cover * * @return Log of the Upper Bound of the Function Covering Number * @@ -135,6 +151,6 @@ public abstract double logLowerBound ( */ public abstract double logUpperBound ( - final double dblCover) - throws java.lang.Exception; + final double cover + ) throws Exception; } diff --git a/src/main/java/org/drip/spaces/cover/L1R1CoveringBounds.java b/src/main/java/org/drip/spaces/cover/L1R1CoveringBounds.java index c068c34b306..fad761896e7 100644 --- a/src/main/java/org/drip/spaces/cover/L1R1CoveringBounds.java +++ b/src/main/java/org/drip/spaces/cover/L1R1CoveringBounds.java @@ -1,11 +1,16 @@ package org.drip.spaces.cover; +import org.drip.numerical.common.NumberUtil; + /* * -*- 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 @@ -82,7 +87,7 @@ /** * L1R1CoveringBounds implements the Lower/Upper Bounds for the Class of Non-decreasing R1 - * To L1 R1 for Functions that are: + * to L1 R1 for Functions that are: * *

* * - *

+ * It provides the following Functionality: + * * - *

+ * + *
+ * + * + * + * + * + * + * + *
Module Computational Core Module
Library Statistical Learning Library
Project R1 and Rd Vector/Tensor Spaces (Validated and/or Normed), and Function Classes
Package Vector Spaces Covering Number Estimator
* * @author Lakshmi Krishnamurthy */ -public class L1R1CoveringBounds implements org.drip.spaces.cover.FunctionClassCoveringBounds { - private double _dblBound = java.lang.Double.NaN; - private double _dblSupport = java.lang.Double.NaN; - private double _dblVariation = java.lang.Double.NaN; +public class L1R1CoveringBounds implements FunctionClassCoveringBounds +{ + private double _bound = Double.NaN; + private double _support = Double.NaN; + private double _variation = Double.NaN; /** - * L1R1CoveringBounds Constructor + * L1R1CoveringBounds Constructor * - * @param dblSupport The Ordinate Support - * @param dblVariation The Function Variation - * @param dblBound The Function Bound + * @param support The Ordinate Support + * @param variation The Function Variation + * @param bound The Function Bound * - * @throws java.lang.Exception Thrown if the Inputs are Invalid + * @throws Exception Thrown if the Inputs are Invalid */ public L1R1CoveringBounds ( - final double dblSupport, - final double dblVariation, - final double dblBound) - throws java.lang.Exception + final double support, + final double variation, + final double bound) + throws Exception { - if (!org.drip.numerical.common.NumberUtil.IsValid (_dblSupport = dblSupport) || 0. >= _dblSupport || - !org.drip.numerical.common.NumberUtil.IsValid (_dblVariation = dblVariation) || 0. >= _dblVariation) - throw new java.lang.Exception ("L1R1CoveringBounds ctr: Invalid Inputs"); - - if (org.drip.numerical.common.NumberUtil.IsValid (_dblBound = dblBound) && _dblBound <= 0.5 * - _dblVariation) - throw new java.lang.Exception ("L1R1CoveringBounds ctr: Invalid Inputs"); + if (!NumberUtil.IsValid (_support = support) || 0. >= _support || + !NumberUtil.IsValid (_variation = variation) || 0. >= _variation) + { + throw new Exception ("L1R1CoveringBounds ctr: Invalid Inputs"); + } + + if (NumberUtil.IsValid (_bound = bound) && _bound <= 0.5 * _variation) { + throw new Exception ("L1R1CoveringBounds ctr: Invalid Inputs"); + } } /** @@ -158,7 +180,7 @@ public L1R1CoveringBounds ( public double support() { - return _dblSupport; + return _support; } /** @@ -169,7 +191,7 @@ public double support() public double variation() { - return _dblVariation; + return _variation; } /** @@ -180,43 +202,44 @@ public double variation() public double bound() { - return _dblBound; + return _bound; } @Override public double logLowerBound ( - final double dblCover) - throws java.lang.Exception + final double cover) + throws Exception { - if (!org.drip.numerical.common.NumberUtil.IsValid (dblCover) || 0. == dblCover) - throw new java.lang.Exception ("L1R1CoveringBounds::logLowerBound => Invalid Inputs"); + if (!NumberUtil.IsValid (cover) || 0. == cover) { + throw new Exception ("L1R1CoveringBounds::logLowerBound => Invalid Inputs"); + } - double dblVariationCoverScale = dblCover / (_dblSupport * _dblVariation); - double dblVariationLogLowerBound = 1. / (54. * dblVariationCoverScale); + double variationCoverScale = cover / (_support * _variation); + double variationLogLowerBound = 1. / (54. * variationCoverScale); - if (1. < 12. * dblVariationCoverScale) - throw new java.lang.Exception ("L1R1CoveringBounds::logLowerBound => Invalid Inputs"); + if (1. < 12. * variationCoverScale) { + throw new Exception ("L1R1CoveringBounds::logLowerBound => Invalid Inputs"); + } - return !org.drip.numerical.common.NumberUtil.IsValid (_dblBound) ? dblVariationLogLowerBound : 1. + - dblVariationLogLowerBound * java.lang.Math.log (2.) + java.lang.Math.log (_dblSupport * _dblBound - / (6. * dblCover)); + return !NumberUtil.IsValid (_bound) ? variationLogLowerBound : + 1. + variationLogLowerBound * Math.log (2.) + Math.log (_support * _bound / (6. * cover)); } @Override public double logUpperBound ( - final double dblCover) - throws java.lang.Exception + final double cover) + throws Exception { - if (!org.drip.numerical.common.NumberUtil.IsValid (dblCover)) - throw new java.lang.Exception ("L1R1CoveringBounds::logUpperBound => Invalid Inputs"); - - double dblVariationCoverScale = dblCover / (_dblSupport * _dblVariation); + if (!NumberUtil.IsValid (cover)) { + throw new Exception ("L1R1CoveringBounds::logUpperBound => Invalid Inputs"); + } - if (1. < 12. * dblVariationCoverScale) - throw new java.lang.Exception ("L1R1CoveringBounds::logUpperBound => Invalid Inputs"); + double variationCoverScale = cover / (_support * _variation); - if (!org.drip.numerical.common.NumberUtil.IsValid (_dblBound)) - return java.lang.Math.log (2.) * 12. / dblVariationCoverScale; + if (1. < 12. * variationCoverScale) { + throw new Exception ("L1R1CoveringBounds::logUpperBound => Invalid Inputs"); + } - return java.lang.Math.log (2.) * 18. / dblVariationCoverScale + 3. * _dblSupport * (2. * _dblBound - - _dblVariation) / (8. * dblCover); + return !NumberUtil.IsValid (_bound) ? Math.log (2.) * 12. / variationCoverScale : + Math.log (2.) * 18. / variationCoverScale + + 3. * _support * (2. * _bound - _variation) / (8. * cover); } } diff --git a/src/main/java/org/drip/spaces/cover/MaureyOperatorCoveringBounds.java b/src/main/java/org/drip/spaces/cover/MaureyOperatorCoveringBounds.java index 6e7e9dc0009..ce05121935a 100644 --- a/src/main/java/org/drip/spaces/cover/MaureyOperatorCoveringBounds.java +++ b/src/main/java/org/drip/spaces/cover/MaureyOperatorCoveringBounds.java @@ -6,6 +6,9 @@ */ /*! + * 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 @@ -82,8 +85,8 @@ /** * MaureyOperatorCoveringBounds implements the estimate the Upper Bounds and/or Absolute Values of the - * Covering Number for the Hilbert Rd To Supremum Rd Operator Class. The Main - * References are: + * Covering Number for the Hilbert Rd To Supremum Rd Operator Class. The Main + * References are: * *

* * - *

+ * It provides the following Functionality: + * * - *

+ * + *
+ * + * + * + * + * + * + * + *
Module Computational Core Module
Library Statistical Learning Library
Project R1 and Rd Vector/Tensor Spaces (Validated and/or Normed), and Function Classes
Package Vector Spaces Covering Number Estimator
* * @author Lakshmi Krishnamurthy */ -public class MaureyOperatorCoveringBounds { +public class MaureyOperatorCoveringBounds +{ /** * Maurey Constant - from the Hilbert - Supremum Identity Map Estimate @@ -180,7 +204,7 @@ public static final MaureyOperatorCoveringBounds WilliamsonSmolaScholkopfEstimat } /** - * MaureyOperatorCoveringBounds Constructor + * MaureyOperatorCoveringBounds Constructor * * @param dblMaureyConstant The Maurey Constant * @param iSupremumDimension The Operator Supremum Output Space Dimension