6
6
*/
7
7
8
8
/*!
9
+ * Copyright (C) 2025 Lakshmi Krishnamurthy
10
+ * Copyright (C) 2024 Lakshmi Krishnamurthy
11
+ * Copyright (C) 2023 Lakshmi Krishnamurthy
9
12
* Copyright (C) 2022 Lakshmi Krishnamurthy
10
13
* Copyright (C) 2021 Lakshmi Krishnamurthy
11
14
* Copyright (C) 2020 Lakshmi Krishnamurthy
82
85
83
86
/**
84
87
* <i>RdSpanningStateSpaceScan</i> is the Abstract Iterator Class that contains the Functionality to perform
85
- * a Spanning Iterative Scan through an R<sup>d</sup> State Space.
88
+ * a Spanning Iterative Scan through an R<sup>d</sup> State Space.
89
+ *
90
+ * It provides the following Functionality:
86
91
*
87
- * <br><br>
88
92
* <ul>
89
- * <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></li>
90
- * <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/StatisticalLearningLibrary.md">Statistical Learning Library</a></li>
91
- * <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>
92
- * <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/spaces/iterator/README.md">Iterative/Exhaustive Vector Space Scanners</a></li>
93
+ * <li>Retrieve the Array of the Terminal State Indexes</li>
94
+ * <li>Retrieve the Dimension</li>
95
+ * <li>Retrieve the State Index Cursor</li>
96
+ * <li>Retrieve the Cyclical Scan Flag</li>
97
+ * <li>Reset and retrieve the State Index Cursor</li>
98
+ * <li>Move to the Subsequent Index Cursor</li>
93
99
* </ul>
94
- * <br><br>
100
+ *
101
+ * <br>
102
+ * <style>table, td, th {
103
+ * padding: 1px; border: 2px solid #008000; border-radius: 8px; background-color: #dfff00;
104
+ * text-align: center; color: #0000ff;
105
+ * }
106
+ * </style>
107
+ *
108
+ * <table style="border:1px solid black;margin-left:auto;margin-right:auto;">
109
+ * <tr><td><b>Module </b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></td></tr>
110
+ * <tr><td><b>Library</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/StatisticalLearningLibrary.md">Statistical Learning Library</a></td></tr>
111
+ * <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>
112
+ * <tr><td><b>Package</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/spaces/iterator/README.md">Iterative/Exhaustive Vector Space Scanners</a></td></tr>
113
+ * </table>
95
114
*
96
115
* @author Lakshmi Krishnamurthy
97
116
*/
98
117
99
- public abstract class RdSpanningStateSpaceScan {
100
- private boolean _bCyclicalScan = false ;
101
- private int [] _aiStateIndexCursor = null ;
102
- private int [] _aiTerminalStateIndex = null ;
118
+ public abstract class RdSpanningStateSpaceScan
119
+ {
120
+ private boolean _cyclicalScan = false ;
121
+ private int [] _stateIndexCursorArray = null ;
122
+ private int [] _terminalStateIndexArray = null ;
103
123
104
124
protected RdSpanningStateSpaceScan (
105
- final int [] aiTerminalStateIndex ,
106
- final boolean bCyclicalScan )
107
- throws java . lang . Exception
125
+ final int [] terminalStateIndexArray ,
126
+ final boolean cyclicalScan )
127
+ throws Exception
108
128
{
109
- if (null == aiTerminalStateIndex )
110
- throw new java .lang .Exception ("RdSpanningStateSpaceScan ctr: Invalid Input" );
129
+ if (null == terminalStateIndexArray ) {
130
+ throw new Exception ("RdSpanningStateSpaceScan ctr: Invalid Input" );
131
+ }
111
132
112
- int iDimension = aiTerminalStateIndex .length ;
113
- _aiTerminalStateIndex = new int [iDimension ];
114
- _aiStateIndexCursor = new int [iDimension ];
115
- _bCyclicalScan = bCyclicalScan ;
133
+ int dimension = terminalStateIndexArray .length ;
134
+ _terminalStateIndexArray = new int [dimension ];
135
+ _stateIndexCursorArray = new int [dimension ];
136
+ _cyclicalScan = cyclicalScan ;
116
137
117
- if (0 == iDimension )
118
- throw new java .lang .Exception ("RdSpanningStateSpaceScan ctr: Invalid Input" );
138
+ if (0 == dimension ) {
139
+ throw new Exception ("RdSpanningStateSpaceScan ctr: Invalid Input" );
140
+ }
119
141
120
- for (int i = 0 ; i < iDimension ; ++i ) {
121
- if (0 >= (_aiTerminalStateIndex [i ] = aiTerminalStateIndex [i ]))
122
- throw new java .lang .Exception ("RdSpanningStateSpaceScan ctr: Invalid Input" );
142
+ for (int i = 0 ; i < dimension ; ++i ) {
143
+ if (0 >= (_terminalStateIndexArray [i ] = terminalStateIndexArray [i ])) {
144
+ throw new Exception ("RdSpanningStateSpaceScan ctr: Invalid Input" );
145
+ }
123
146
124
- _aiStateIndexCursor [i ] = 0 ;
147
+ _stateIndexCursorArray [i ] = 0 ;
125
148
}
126
149
}
127
150
128
151
protected boolean setStateIndexCursor (
129
- final int [] aiStateIndexCursor )
152
+ final int [] stateIndexCursorArray )
130
153
{
131
- if (null == _aiStateIndexCursor || _aiStateIndexCursor .length != _aiTerminalStateIndex .length )
154
+ if (null == _stateIndexCursorArray ||
155
+ _stateIndexCursorArray .length != _terminalStateIndexArray .length )
156
+ {
132
157
return false ;
158
+ }
133
159
134
- _aiStateIndexCursor = aiStateIndexCursor ;
160
+ _stateIndexCursorArray = stateIndexCursorArray ;
135
161
return true ;
136
162
}
137
163
@@ -143,7 +169,7 @@ protected boolean setStateIndexCursor (
143
169
144
170
public int [] terminalStateIndex ()
145
171
{
146
- return _aiTerminalStateIndex ;
172
+ return _terminalStateIndexArray ;
147
173
}
148
174
149
175
/**
@@ -154,7 +180,7 @@ public int[] terminalStateIndex()
154
180
155
181
public int dimension ()
156
182
{
157
- return _aiTerminalStateIndex .length ;
183
+ return _terminalStateIndexArray .length ;
158
184
}
159
185
160
186
/**
@@ -165,7 +191,7 @@ public int dimension()
165
191
166
192
public int [] stateIndexCursor ()
167
193
{
168
- return _aiStateIndexCursor ;
194
+ return _stateIndexCursorArray ;
169
195
}
170
196
171
197
/**
@@ -176,7 +202,7 @@ public int[] stateIndexCursor()
176
202
177
203
public boolean cyclicalScan ()
178
204
{
179
- return _bCyclicalScan ;
205
+ return _cyclicalScan ;
180
206
}
181
207
182
208
/**
0 commit comments