Skip to content

Commit

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

	- Spaces Big Sub-matrix Set Extractor - Lean Max Composite (1, 2)
	- Spaces Big Sub-string Set Extractor (3, 4, 5)
	- Spaces Big Sub-string Set Extractor - Receding Permutation Scan #1 (6, 7, 8)
	- Spaces Big Sub-string Set Extractor - Receding Permutation Scan #2 (9, 10, 11)
	- Spaces Big Sub-string Set Extractor - Receding Permutation Scan #3 (12, 13, 14)
	- Spaces Big Sub-string Set Extractor - Exhaustive Permutation Scan #1 (15, 16, 17)
	- Spaces Big Sub-string Set Extractor - Exhaustive Permutation Scan #2 (18, 19, 20)
	- Spaces Big Sub-string Set Extractor - Exhaustive Permutation Scan #3 (21, 22, 23)
	- Spaces Big Sub-string Set Extractor - Contiguous #1 (24, 25, 26)
	- Spaces Big Sub-string Set Extractor - Contiguous #2 (27, 28)
	- Spaces Big Zombie Matrix (29, 30, 31)
	- Spaces Big Zombie Matrix - Row Count (32, 33)
	- Spaces Big Zombie Matrix - Column Count (34, 35)
	- Spaces Big Zombie Matrix - Uninfected Cell Set (36, 37)
	- Spaces Big Zombie Matrix - Infectable #1 (38, 39)
	- Spaces Big Zombie Matrix - Infectable #2 (40, 41, 42)
	- Spaces Big Zombie Matrix - Infectable #3 (43, 44, 45)
	- Spaces Big Zombie Matrix - Constructor #1 (46, 47, 48)
	- Spaces Big Zombie Matrix - Constructor #2 (49, 50)
	- Spaces Big Zombie Matrix - Infection Period #1 (51, 52)
	- Spaces Big Zombie Matrix - Infection Period #2 (53, 54)
	- Spaces Cover Carl Stephanie Normed Bounds (55, 56, 57)
	- Spaces Cover Carl Stephanie Normed Bounds - Entropy Bound Normed A (58, 59)
	- Spaces Cover Carl Stephanie Normed Bounds - Entropy Bound Normed B (60)


Samples:

IdeaDRIP:
  • Loading branch information
Lakshmik committed Mar 18, 2024
1 parent 08a29f9 commit 306b586
Show file tree
Hide file tree
Showing 5 changed files with 224 additions and 166 deletions.
34 changes: 34 additions & 0 deletions ReleaseNotes/09_11_2023.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

Features:

Bug Fixes/Re-organization:

- Spaces Big Sub-matrix Set Extractor - Lean Max Composite (1, 2)
- Spaces Big Sub-string Set Extractor (3, 4, 5)
- Spaces Big Sub-string Set Extractor - Receding Permutation Scan #1 (6, 7, 8)
- Spaces Big Sub-string Set Extractor - Receding Permutation Scan #2 (9, 10, 11)
- Spaces Big Sub-string Set Extractor - Receding Permutation Scan #3 (12, 13, 14)
- Spaces Big Sub-string Set Extractor - Exhaustive Permutation Scan #1 (15, 16, 17)
- Spaces Big Sub-string Set Extractor - Exhaustive Permutation Scan #2 (18, 19, 20)
- Spaces Big Sub-string Set Extractor - Exhaustive Permutation Scan #3 (21, 22, 23)
- Spaces Big Sub-string Set Extractor - Contiguous #1 (24, 25, 26)
- Spaces Big Sub-string Set Extractor - Contiguous #2 (27, 28)
- Spaces Big Zombie Matrix (29, 30, 31)
- Spaces Big Zombie Matrix - Row Count (32, 33)
- Spaces Big Zombie Matrix - Column Count (34, 35)
- Spaces Big Zombie Matrix - Uninfected Cell Set (36, 37)
- Spaces Big Zombie Matrix - Infectable #1 (38, 39)
- Spaces Big Zombie Matrix - Infectable #2 (40, 41, 42)
- Spaces Big Zombie Matrix - Infectable #3 (43, 44, 45)
- Spaces Big Zombie Matrix - Constructor #1 (46, 47, 48)
- Spaces Big Zombie Matrix - Constructor #2 (49, 50)
- Spaces Big Zombie Matrix - Infection Period #1 (51, 52)
- Spaces Big Zombie Matrix - Infection Period #2 (53, 54)
- Spaces Cover Carl Stephanie Normed Bounds (55, 56, 57)
- Spaces Cover Carl Stephanie Normed Bounds - Entropy Bound Normed A (58, 59)
- Spaces Cover Carl Stephanie Normed Bounds - Entropy Bound Normed B (60)


Samples:

IdeaDRIP:
Binary file modified ScheduleSheet.xlsx
Binary file not shown.
148 changes: 88 additions & 60 deletions src/main/java/org/drip/spaces/big/SubStringSetExtractor.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@

package org.drip.spaces.big;

import java.util.ArrayList;
import java.util.List;

import org.drip.spaces.iterator.IterationHelper;
import org.drip.spaces.iterator.RdExhaustiveStateSpaceScan;

/*
* -*- 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,128 +91,147 @@

/**
* <i>SubStringSetExtractor</i> contains the Functionality to extract the Full Suite of the Sub-strings
* contained inside of the given String.
*
* <br><br>
* contained inside of the given String. It provides the following Functionality:
*
* <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/StatisticalLearningLibrary.md">Statistical Learning Library</a></li>
* <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/spaces/README.md">R<sup>1</sup> and R<sup>d</sup> Vector/Tensor Spaces (Validated and/or Normed), and Function Classes</a></li>
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/spaces/big/README.md">Big-data In-place Manipulator</a></li>
* <li>Locate the String Set of the Target Size using a Receding Permutation Scan</li>
* <li>Locate the String Set of the Target Size using an Exhaustive Permutation Scan</li>
* <li>Extract all the Contiguous Strings available inside the specified Master String</li>
* </ul>
* <br><br>
*
* <br>
* <style>table, td, th {
* padding: 1px; border: 2px solid #008000; border-radius: 8px; background-color: #dfff00;
* text-align: center; color: #0000ff;
* }
* </style>
*
* <table style="border:1px solid black;margin-left:auto;margin-right:auto;">
* <tr><td><b>Module </b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></td></tr>
* <tr><td><b>Library</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/StatisticalLearningLibrary.md">Statistical Learning Library</a></td></tr>
* <tr><td><b>Project</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/spaces/README.md">R<sup>1</sup> and R<sup>d</sup> Vector/Tensor Spaces (Validated and/or Normed), and Function Classes</a></td></tr>
* <tr><td><b>Package</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/spaces/big/README.md">Big-data In-place Manipulator</a></td></tr>
* </table>
*
* @author Lakshmi Krishnamurthy
*/

public class SubStringSetExtractor {
public class SubStringSetExtractor
{

/**
* Locate the String Set of the Target Size using a Receeding Permutation Scan
* Locate the String Set of the Target Size using a Receding Permutation Scan
*
* @param strMaster The Master String
* @param iTargetStringSize The Target String Size
* @param master The Master String
* @param targetStringSize The Target String Size
*
* @return The List of the Target String
*/

public static final java.util.List<java.lang.String> ReceedingPermutationScan (
final java.lang.String strMaster,
final int iTargetStringSize)
public static final List<String> ReceedingPermutationScan (
final String master,
final int targetStringSize)
{
int[] aiMax = new int[iTargetStringSize];
org.drip.spaces.iterator.RdExhaustiveStateSpaceScan mdIter = null;
int[] maxSizeArray = new int[targetStringSize];
RdExhaustiveStateSpaceScan rdExhaustiveStateSpaceScanIterator = null;

int iMasterStringSize = strMaster.length();
int masterStringSize = master.length();

for (int i = 0; i < iTargetStringSize; ++i)
aiMax[i] = iMasterStringSize;
for (int i = 0; i < targetStringSize; ++i) {
maxSizeArray[i] = masterStringSize;
}

try {
mdIter = new org.drip.spaces.iterator.RdExhaustiveStateSpaceScan (aiMax, false);
} catch (java.lang.Exception e) {
rdExhaustiveStateSpaceScanIterator = new RdExhaustiveStateSpaceScan (maxSizeArray, false);
} catch (Exception e) {
e.printStackTrace();
}

java.util.List<java.lang.String> lsTarget = new java.util.ArrayList<java.lang.String>();
List<String> targetList = new ArrayList<String>();

int[] aiIndex = mdIter.stateIndexCursor();
int[] indexCursorArray = rdExhaustiveStateSpaceScanIterator.stateIndexCursor();

while (null != aiIndex) {
lsTarget.add (org.drip.spaces.iterator.IterationHelper.ComposeFromIndex (strMaster, aiIndex));
while (null != indexCursorArray) {
targetList.add (IterationHelper.ComposeFromIndex (master, indexCursorArray));

aiIndex = mdIter.nextStateIndexCursor();
indexCursorArray = rdExhaustiveStateSpaceScanIterator.nextStateIndexCursor();
}

return lsTarget;
return targetList;
}

/**
* Locate the String Set of the Target Size using an Exhaustive Permutation Scan
*
* @param strMaster The Master String
* @param iTargetStringSize The Target String Size
* @param master The Master String
* @param targetStringSize The Target String Size
*
* @return The List of the Target String
*/

public static final java.util.List<java.lang.String> ExhaustivePermutationScan (
final java.lang.String strMaster,
final int iTargetStringSize)
public static final List<String> ExhaustivePermutationScan (
final String master,
final int targetStringSize)
{
int[] aiMax = new int[iTargetStringSize];
org.drip.spaces.iterator.RdExhaustiveStateSpaceScan mdIter = null;
int[] maxSizeArray = new int[targetStringSize];
RdExhaustiveStateSpaceScan rdExhaustiveStateSpaceScanIterator = null;

int iMasterStringSize = strMaster.length();
int masterStringSize = master.length();

for (int i = 0; i < iTargetStringSize; ++i)
aiMax[i] = iMasterStringSize;
for (int i = 0; i < targetStringSize; ++i) {
maxSizeArray[i] = masterStringSize;
}

try {
mdIter = new org.drip.spaces.iterator.RdExhaustiveStateSpaceScan (aiMax, false);
} catch (java.lang.Exception e) {
rdExhaustiveStateSpaceScanIterator = new RdExhaustiveStateSpaceScan (maxSizeArray, false);
} catch (Exception e) {
e.printStackTrace();
}

java.util.List<java.lang.String> lsTarget = new java.util.ArrayList<java.lang.String>();
List<String> targetList = new ArrayList<String>();

int[] aiIndex = mdIter.stateIndexCursor();
int[] indexCursorArray = rdExhaustiveStateSpaceScanIterator.stateIndexCursor();

while (null != aiIndex) {
if (!org.drip.spaces.iterator.IterationHelper.CheckForRepeatingIndex (aiIndex))
lsTarget.add (org.drip.spaces.iterator.IterationHelper.ComposeFromIndex (strMaster,
aiIndex));
while (null != indexCursorArray) {
if (!IterationHelper.CheckForRepeatingIndex (indexCursorArray)) {
targetList.add (IterationHelper.ComposeFromIndex (master, indexCursorArray));
}

aiIndex = mdIter.nextStateIndexCursor();
indexCursorArray = rdExhaustiveStateSpaceScanIterator.nextStateIndexCursor();
}

return lsTarget;
return targetList;
}

/**
* Extract all the Contiguous Strings available inside the specified Master String
*
* @param strMaster The Master String
* @param master The Master String
*
* @return The Full Set of Contiguous Strings
* @return The Full List of Contiguous Strings
*/

public static final java.util.List<java.lang.String> Contiguous (
final java.lang.String strMaster)
public static final List<String> Contiguous (
final String master)
{
if (null == strMaster) return null;
if (null == master) {
return null;
}

int iMasterStringLength = strMaster.length();
int masterStringLength = master.length();

java.util.List<java.lang.String> lsTarget = new java.util.ArrayList<java.lang.String>();
List<String> targetList = new ArrayList<String>();

if (0 == iMasterStringLength) return lsTarget;
if (0 == masterStringLength) {
return targetList;
}

for (int iStartIndex = 0; iStartIndex < iMasterStringLength; ++iStartIndex) {
for (int iFinishIndex = iStartIndex + 1; iFinishIndex <= iMasterStringLength; ++iFinishIndex)
lsTarget.add (strMaster.substring (iStartIndex, iFinishIndex));
for (int startIndex = 0; startIndex < masterStringLength; ++startIndex) {
for (int finishIndex = startIndex + 1; finishIndex <= masterStringLength; ++finishIndex) {
targetList.add (master.substring (startIndex, finishIndex));
}
}

return lsTarget;
return targetList;
}
}
Loading

0 comments on commit 306b586

Please sign in to comment.