diff --git a/ReleaseNotes/09_20_2023.txt b/ReleaseNotes/09_20_2023.txt new file mode 100644 index 000000000000..e79a115eecaa --- /dev/null +++ b/ReleaseNotes/09_20_2023.txt @@ -0,0 +1,44 @@ + +Features: + +Bug Fixes/Re-organization: + + - Spaces Function Class Normed R^1 To L^1 Finite - Agnostic Covering Number Bounds #1 (1, 2, 3) + - Spaces Function Class Normed R^1 To L^1 Finite - Agnostic Covering Number Bounds #2 (4, 5, 6) + - Spaces Function Class Normed R^1 To L^1 Finite - Agnostic Covering Number Bounds #3 (7, 8, 9) + - Spaces Function Class Normed R^1 To L^1 Finite - Agnostic Covering Number Bounds #4 (10, 11, 12) + - Spaces Function Class Normed R^1 To L^1 Finite - Agnostic Covering Number Bounds #5 (13, 14, 15) + - Spaces Function Class Normed R^1 To L^1 Finite - Agnostic Covering Number Bounds #6 (16, 17, 18) + - Spaces Instance Generalized Validated Vector (19, 20, 21) + - Spaces Instance Generalized Validated Vector - Tensor Space Type (22) + - Spaces Instance Generalized Validated Vector - Sample Size (23) + - Spaces Instance Validated R^1 (24, 25, 26) + - Spaces Instance Validated R^1 - Array (27, 28) + - Spaces Instance Validated R^1 - Generalized Vector (29, 30) + - Spaces Instance Validated R^1 - Constructor (31) + - Spaces Instance Validated R^1 - Tensor Space Type (32) + - Spaces Instance Validated R^1 - Sample Size (33) + - Spaces Instance Validated R^1 Combinatorial (34, 35) + - Spaces Instance Validated R^1 Combinatorial - Constructor (36) + - Spaces Instance Validated R^1 Combinatorial - Tensor Space Type (37) + - Spaces Instance Validated R^1 Continuous (38, 39) + - Spaces Instance Validated R^1 Continuous - Constructor (40) + - Spaces Instance Validated R^1 Continuous - Tensor Space Type (41) + - Spaces Instance Validated R^d (42, 43, 44) + - Spaces Instance Validated R^d - Instance (45, 46) + - Spaces Instance Validated R^d - Generalized Vector (47) + - Spaces Instance Validated R^d - Tensor Space Type (48) + - Spaces Instance Validated R^d - Constructor (49) + - Spaces Instance Validated R^d - Sample Size (50) + - Spaces Instance Validated R^d Combinatorial (51, 52) + - Spaces Instance Validated R^d Combinatorial - Constructor (53) + - Spaces Instance Validated R^d Combinatorial - Tensor Space Type (54) + - Spaces Instance Validated R^d Continuous (55, 56) + - Spaces Instance Validated R^d Continuous - Constructor (57) + - Spaces Instance Validated R^d Continuous - Tensor Space Type (58) + - Spaces Iterator Iteration Helper (59, 60) + + +Samples: + +IdeaDRIP: diff --git a/ScheduleSheet.xlsx b/ScheduleSheet.xlsx index ebc0a599dab4..8afb4408a07e 100644 Binary files a/ScheduleSheet.xlsx and b/ScheduleSheet.xlsx differ diff --git a/src/main/java/org/drip/spaces/instance/GeneralizedValidatedVector.java b/src/main/java/org/drip/spaces/instance/GeneralizedValidatedVector.java index 08121c8ea4b1..7cb013eab0bb 100644 --- a/src/main/java/org/drip/spaces/instance/GeneralizedValidatedVector.java +++ b/src/main/java/org/drip/spaces/instance/GeneralizedValidatedVector.java @@ -1,11 +1,16 @@ package org.drip.spaces.instance; +import org.drip.spaces.tensor.GeneralizedVector; + /* * -*- 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 @@ /** * GeneralizedValidatedVector holds the Validated Vector Variate Instance Sequence and the - * corresponding generalized Vector Space Type. The Reference we've used is: + * corresponding generalized Vector Space Type. The Reference we've used is: * *

* * - *

+ * 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 Validated Continuous/Combinatorial Metric Spaces
* * @author Lakshmi Krishnamurthy */ -public interface GeneralizedValidatedVector { +public interface GeneralizedValidatedVector +{ /** * Retrieve the Generalized Tensor Space Type @@ -112,7 +130,7 @@ public interface GeneralizedValidatedVector { * @return The Generalized Tensor Space Type */ - public abstract org.drip.spaces.tensor.GeneralizedVector tensorSpaceType(); + public abstract GeneralizedVector tensorSpaceType(); /** * Retrieve the Sample Size diff --git a/src/main/java/org/drip/spaces/instance/ValidatedR1.java b/src/main/java/org/drip/spaces/instance/ValidatedR1.java index f911fe7a5151..c29a0483bb0b 100644 --- a/src/main/java/org/drip/spaces/instance/ValidatedR1.java +++ b/src/main/java/org/drip/spaces/instance/ValidatedR1.java @@ -1,11 +1,16 @@ package org.drip.spaces.instance; +import org.drip.spaces.tensor.R1GeneralizedVector; + /* * -*- 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 @@ /** * ValidatedR1 holds the Validated R1 Vector Instance Sequence and the Corresponding - * Generalized Vector Space Type. The Reference we've used is: + * Generalized Vector Space Type. The Reference we've used is: * *

* * - *

+ * 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 Validated Continuous/Combinatorial Metric Spaces
* * @author Lakshmi Krishnamurthy */ -public class ValidatedR1 implements org.drip.spaces.instance.GeneralizedValidatedVector { - private double[] _adblInstance = null; - private org.drip.spaces.tensor.R1GeneralizedVector _gvR1 = null; +public class ValidatedR1 implements GeneralizedValidatedVector +{ + private double[] _instanceArray = null; + private R1GeneralizedVector _r1GeneralizedVector = null; /** - * ValidatedR1 Constructor + * ValidatedR1 Constructor * - * @param gvR1 The R^1 Tensor Space Type - * @param adblInstance The Data Instance + * @param r1GeneralizedVector The R1 Tensor Space Type + * @param instanceArray The Data Instance * - * @throws java.lang.Exception Thrown if the Inputs are Invalid + * @throws Exception Thrown if the Inputs are Invalid */ public ValidatedR1 ( - final org.drip.spaces.tensor.R1GeneralizedVector gvR1, - final double[] adblInstance) - throws java.lang.Exception + final R1GeneralizedVector r1GeneralizedVector, + final double[] instanceArray) + throws Exception { - if (null == (_gvR1 = gvR1) || null == (_adblInstance = adblInstance) || 0 == _adblInstance.length) - throw new java.lang.Exception ("ValidatedR1 ctr: Invalid Inputs"); + if (null == (_r1GeneralizedVector = r1GeneralizedVector) || + null == (_instanceArray = instanceArray) || 0 == _instanceArray.length) + { + throw new Exception ("ValidatedR1 ctr: Invalid Inputs"); + } } - @Override public org.drip.spaces.tensor.R1GeneralizedVector tensorSpaceType() + @Override public R1GeneralizedVector tensorSpaceType() { - return _gvR1; + return _r1GeneralizedVector; } /** @@ -139,11 +160,11 @@ public ValidatedR1 ( public double[] instance() { - return _adblInstance; + return _instanceArray; } @Override public int sampleSize() { - return _adblInstance.length; + return _instanceArray.length; } } diff --git a/src/main/java/org/drip/spaces/instance/ValidatedR1Combinatorial.java b/src/main/java/org/drip/spaces/instance/ValidatedR1Combinatorial.java index 9c58af2e70e3..dcb6cd2ab17a 100644 --- a/src/main/java/org/drip/spaces/instance/ValidatedR1Combinatorial.java +++ b/src/main/java/org/drip/spaces/instance/ValidatedR1Combinatorial.java @@ -1,11 +1,16 @@ package org.drip.spaces.instance; +import org.drip.spaces.tensor.R1CombinatorialVector; + /* * -*- 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 @@ /** * ValidatedR1Combinatorial holds the Validated R1 Combinatorial Vector Instance Sequence - * and the corresponding Generalized Vector Space Type. The Reference we've used is: + * and the corresponding Generalized Vector Space Type. The Reference we've used is: * *

* * - *

+ * 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 Validated Continuous/Combinatorial Metric Spaces
* * @author Lakshmi Krishnamurthy */ -public class ValidatedR1Combinatorial extends org.drip.spaces.instance.ValidatedR1 { +public class ValidatedR1Combinatorial extends ValidatedR1 +{ /** - * ValidatedR1Combinatorial Constructor + * ValidatedR1Combinatorial Constructor * - * @param cvR1 The Combinatorial R^1 Tensor Space Type - * @param adblInstance The Data Instance + * @param r1CombinatorialVector The Combinatorial R1 Tensor Space Type + * @param instanceArray The Data Instance * - * @throws java.lang.Exception Thrown if the Inputs are Invalid + * @throws Exception Thrown if the Inputs are Invalid */ public ValidatedR1Combinatorial ( - final org.drip.spaces.tensor.R1CombinatorialVector cvR1, - final double[] adblInstance) - throws java.lang.Exception + final R1CombinatorialVector r1CombinatorialVector, + final double[] instanceArray) + throws Exception { - super (cvR1, adblInstance); + super (r1CombinatorialVector, instanceArray); } - @Override public org.drip.spaces.tensor.R1CombinatorialVector tensorSpaceType() + @Override public R1CombinatorialVector tensorSpaceType() { - return (org.drip.spaces.tensor.R1CombinatorialVector) super.tensorSpaceType(); + return (R1CombinatorialVector) super.tensorSpaceType(); } } diff --git a/src/main/java/org/drip/spaces/instance/ValidatedR1Continuous.java b/src/main/java/org/drip/spaces/instance/ValidatedR1Continuous.java index 32e3ca35435c..67b5ecdcd971 100644 --- a/src/main/java/org/drip/spaces/instance/ValidatedR1Continuous.java +++ b/src/main/java/org/drip/spaces/instance/ValidatedR1Continuous.java @@ -1,11 +1,16 @@ package org.drip.spaces.instance; +import org.drip.spaces.tensor.R1ContinuousVector; + /* * -*- 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 @@ -92,39 +97,51 @@ * * * - *

+ * 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 Validated Continuous/Combinatorial Metric Spaces
* * @author Lakshmi Krishnamurthy */ -public class ValidatedR1Continuous extends org.drip.spaces.instance.ValidatedR1 { +public class ValidatedR1Continuous extends ValidatedR1 +{ /** - * ValidatedR1Continuous Constructor + * ValidatedR1Continuous Constructor * - * @param cvR1 The Continuous R^1 Tensor Space Type - * @param adblInstance The Data Instance + * @param r1ContinuousVector The Continuous R1 Tensor Space Type + * @param instanceArray The Data Instance * - * @throws java.lang.Exception Thrown if the Inputs are Invalid + * @throws Exception Thrown if the Inputs are Invalid */ public ValidatedR1Continuous ( - final org.drip.spaces.tensor.R1ContinuousVector cvR1, - final double[] adblInstance) - throws java.lang.Exception + final R1ContinuousVector r1ContinuousVector, + final double[] instanceArray) + throws Exception { - super (cvR1, adblInstance); + super (r1ContinuousVector, instanceArray); } - @Override public org.drip.spaces.tensor.R1ContinuousVector tensorSpaceType() + @Override public R1ContinuousVector tensorSpaceType() { - return (org.drip.spaces.tensor.R1ContinuousVector) super.tensorSpaceType(); + return (R1ContinuousVector) super.tensorSpaceType(); } } diff --git a/src/main/java/org/drip/spaces/instance/ValidatedRd.java b/src/main/java/org/drip/spaces/instance/ValidatedRd.java index 5005d2dc92d7..298949c245f7 100644 --- a/src/main/java/org/drip/spaces/instance/ValidatedRd.java +++ b/src/main/java/org/drip/spaces/instance/ValidatedRd.java @@ -1,11 +1,16 @@ package org.drip.spaces.instance; +import org.drip.spaces.tensor.RdGeneralizedVector; + /* * -*- 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 @@ /** * ValidatedRd holds the Validated Rd Vector Instance Sequence and the Corresponding - * Generalized Vector Space Type. The Reference we've used is: + * Generalized Vector Space Type. The Reference we've used is: * *

* * - *

+ * 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 Validated Continuous/Combinatorial Metric Spaces
* * @author Lakshmi Krishnamurthy */ -public class ValidatedRd implements org.drip.spaces.instance.GeneralizedValidatedVector { - private double[][] _aadblInstance = null; - private org.drip.spaces.tensor.RdGeneralizedVector _gvRd = null; +public class ValidatedRd implements GeneralizedValidatedVector +{ + private double[][] _instanceGrid = null; + private RdGeneralizedVector _rdGeneralizedVector = null; /** - * ValidatedRd Constructor + * ValidatedRd Constructor * - * @param gvRd The R^d Tensor Space Type - * @param aadblInstance The Data Instance + * @param rdGeneralizedVector The Rd Tensor Space Type + * @param instanceGrid The Data Instance * - * @throws java.lang.Exception Thrown if the Inputs are Invalid + * @throws Exception Thrown if the Inputs are Invalid */ public ValidatedRd ( - final org.drip.spaces.tensor.RdGeneralizedVector gvRd, - final double[][] aadblInstance) + final RdGeneralizedVector rdGeneralizedVector, + final double[][] instanceGrid) throws java.lang.Exception { - if (null == (_gvRd = gvRd) || null == (_aadblInstance = aadblInstance) || 0 == _aadblInstance.length) - throw new java.lang.Exception ("ValidatedRd ctr: Invalid Inputs"); + if (null == (_rdGeneralizedVector = rdGeneralizedVector) || + null == (_instanceGrid = instanceGrid) || 0 == _instanceGrid.length) + { + throw new Exception ("ValidatedRd ctr: Invalid Inputs"); + } } - @Override public org.drip.spaces.tensor.RdGeneralizedVector tensorSpaceType() + @Override public RdGeneralizedVector tensorSpaceType() { - return _gvRd; + return _rdGeneralizedVector; } /** @@ -139,11 +160,11 @@ public ValidatedRd ( public double[][] instance() { - return _aadblInstance; + return _instanceGrid; } @Override public int sampleSize() { - return _aadblInstance.length; + return _instanceGrid.length; } } diff --git a/src/main/java/org/drip/spaces/instance/ValidatedRdCombinatorial.java b/src/main/java/org/drip/spaces/instance/ValidatedRdCombinatorial.java index 43ce13603eb0..ade6894cc67b 100644 --- a/src/main/java/org/drip/spaces/instance/ValidatedRdCombinatorial.java +++ b/src/main/java/org/drip/spaces/instance/ValidatedRdCombinatorial.java @@ -1,11 +1,16 @@ package org.drip.spaces.instance; +import org.drip.spaces.tensor.RdCombinatorialVector; + /* * -*- 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 @@ /** * ValidatedRdCombinatorial holds the Validated Rd Vector Instance Sequence and the - * Corresponding Generalized Vector Space Type. The Reference we've used is: + * Corresponding Generalized Vector Space Type. The Reference we've used is: * *

* * - *

+ * 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 Validated Continuous/Combinatorial Metric Spaces
* * @author Lakshmi Krishnamurthy */ -public class ValidatedRdCombinatorial extends org.drip.spaces.instance.ValidatedRd { +public class ValidatedRdCombinatorial extends ValidatedRd +{ /** - * ValidatedRdCombinatorial Constructor + * ValidatedRdCombinatorial Constructor * - * @param cvRd The Combinatorial R^d Tensor Space Type - * @param aadblInstance The Data Instance + * @param rdCombinatorialVector The Combinatorial Rd Tensor Space Type + * @param instanceGrid The Data Instance * - * @throws java.lang.Exception Thrown if the Inputs are Invalid + * @throws Exception Thrown if the Inputs are Invalid */ public ValidatedRdCombinatorial ( - final org.drip.spaces.tensor.RdCombinatorialVector cvRd, - final double[][] aadblInstance) - throws java.lang.Exception + final RdCombinatorialVector rdCombinatorialVector, + final double[][] instanceGrid) + throws Exception { - super (cvRd, aadblInstance); + super (rdCombinatorialVector, instanceGrid); } - @Override public org.drip.spaces.tensor.RdCombinatorialVector tensorSpaceType() + @Override public RdCombinatorialVector tensorSpaceType() { - return (org.drip.spaces.tensor.RdCombinatorialVector) super.tensorSpaceType(); + return (RdCombinatorialVector) super.tensorSpaceType(); } } diff --git a/src/main/java/org/drip/spaces/instance/ValidatedRdContinuous.java b/src/main/java/org/drip/spaces/instance/ValidatedRdContinuous.java index 95494f514210..f037837f5929 100644 --- a/src/main/java/org/drip/spaces/instance/ValidatedRdContinuous.java +++ b/src/main/java/org/drip/spaces/instance/ValidatedRdContinuous.java @@ -1,11 +1,16 @@ package org.drip.spaces.instance; +import org.drip.spaces.tensor.RdContinuousVector; + /* * -*- 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 @@ /** * ValidatedRdContinuous holds the Validated Rd Continuous Vector Instance Sequence and the - * corresponding Generalized Vector Space Type. The Reference we've used is: + * corresponding Generalized Vector Space Type. The Reference we've used is: * *

* * - *

+ * 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 Validated Continuous/Combinatorial Metric Spaces
* * @author Lakshmi Krishnamurthy */ -public class ValidatedRdContinuous extends org.drip.spaces.instance.ValidatedRd { +public class ValidatedRdContinuous extends ValidatedRd +{ /** - * ValidatedRdContinuous Constructor + * ValidatedRdContinuous Constructor * - * @param cvRd The Continuous R^d Tensor Space Type - * @param aadblInstance The Data Instance + * @param rdContinuousVector The Continuous Rd Tensor Space Type + * @param instanceGrid The Data Instance * - * @throws java.lang.Exception Thrown if the Inputs are Invalid + * @throws Exception Thrown if the Inputs are Invalid */ public ValidatedRdContinuous ( - final org.drip.spaces.tensor.RdContinuousVector cvRd, - final double[][] aadblInstance) + final RdContinuousVector rdContinuousVector, + final double[][] instanceGrid) throws java.lang.Exception { - super (cvRd, aadblInstance); + super (rdContinuousVector, instanceGrid); } - @Override public org.drip.spaces.tensor.RdContinuousVector tensorSpaceType() + @Override public RdContinuousVector tensorSpaceType() { - return (org.drip.spaces.tensor.RdContinuousVector) super.tensorSpaceType(); + return (RdContinuousVector) super.tensorSpaceType(); } } diff --git a/src/main/java/org/drip/spaces/iterator/IterationHelper.java b/src/main/java/org/drip/spaces/iterator/IterationHelper.java index 9153775f75a3..167bd6eaf56b 100644 --- a/src/main/java/org/drip/spaces/iterator/IterationHelper.java +++ b/src/main/java/org/drip/spaces/iterator/IterationHelper.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,42 +85,62 @@ /** * IterationHelper contains the Functionality that helps perform Checked Multidimensional Iterative - * Scans. + * Scans. + * + * 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 Iterative/Exhaustive Vector Space Scanners
* * @author Lakshmi Krishnamurthy */ -public class IterationHelper { +public class IterationHelper +{ /** * Scan through the Integer Array looking for a repeating Index * - * @param ai The Index Array + * @param indexArray The Index Array * * @return TRUE - A Repeating Index exists */ public static final boolean CheckForRepeatingIndex ( - final int[] ai) + final int[] indexArray) { - if (null == ai) return false; + if (null == indexArray) { + return false; + } - int iCursorLength = ai.length; + int cursorLength = indexArray.length; - if (1 >= iCursorLength) return false; + if (1 >= cursorLength) { + return false; + } - for (int i = 0; i < iCursorLength; ++i) { - for (int j = i + 1; j < iCursorLength; ++j) { - if (ai[i] == ai[j]) return true; + for (int i = 0; i < cursorLength; ++i) { + for (int j = i + 1; j < cursorLength; ++j) { + if (indexArray[i] == indexArray[j]) { + return true; + } } } @@ -127,50 +150,60 @@ public static final boolean CheckForRepeatingIndex ( /** * Display the Contents of the Index Array * - * @param strPrefix The Dump Prefix - * @param ai The Index Array + * @param prefix The Dump Prefix + * @param indexArray The Index Array */ public static final void DumpIndexArray ( - final java.lang.String strPrefix, - final int[] ai) + final String prefix, + final int[] indexArray) { - if (null == ai) return; + if (null == indexArray) { + return; + } - int iNumIndex = ai.length; - java.lang.String strIndexArray = strPrefix; + String indexArrayString = prefix; + int indexCount = indexArray.length; - if (0 >= iNumIndex) return; + if (0 >= indexCount) { + return; + } - for (int i = 0; i < iNumIndex; ++i) - strIndexArray += (0 == i ? "[" : ",") + ai[i]; + for (int i = 0; i < indexCount; ++i) { + indexArrayString += (0 == i ? "[" : ",") + indexArray[i]; + } - System.out.println (strIndexArray + "]"); + System.out.println (indexArrayString + "]"); } /** * Compose a String constructed from the specified Array Index * - * @param strMaster The Master String - * @param aiIndex The Index Array + * @param master The Master String + * @param indexArray The Index Array * * @return The Composed String */ - public static final java.lang.String ComposeFromIndex ( - final java.lang.String strMaster, - final int[] aiIndex) + public static final String ComposeFromIndex ( + final String master, + final int[] indexArray) { - if (null == aiIndex) return null; + if (null == indexArray) { + return null; + } - int iNumIndex = aiIndex.length; - java.lang.String strOffOfIndex = ""; + String compositionFromIndex = ""; + int indexCount = indexArray.length; - if (0 >= iNumIndex) return null; + if (0 >= indexCount) { + return null; + } - for (int i = 0; i < iNumIndex; ++i) - strOffOfIndex += strMaster.charAt (aiIndex[i]); + for (int i = 0; i < indexCount; ++i) { + compositionFromIndex += master.charAt (indexArray[i]); + } - return strOffOfIndex; + return compositionFromIndex; } }