Skip to content

Commit c3f8f60

Browse files
v1.9.3 CCM Tp < -1 validation.
1 parent 13049f1 commit c3f8f60

2 files changed

Lines changed: 14 additions & 16 deletions

File tree

src/CCM.cc

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -137,18 +137,17 @@ void CrossMap( SimplexClass & S,
137137
}
138138

139139
// Note that the embedding has NPartial invalid rows
140-
// since the partial data vectors were not removed.
141-
// Set library index limits for RNG
142-
size_t N_row = S.embedding.NRows() - NPartial;
143-
int RNGStart = 0;
144-
int RNGStop;
145-
146-
if ( S.parameters.tau > 0 ) {
147-
RNGStop = *( end( S.allLibRows.Row( 0 ) ) - 1 );
148-
}
149-
else {
150-
RNGStop = S.embedding.NRows() - NPartial - 1;
151-
}
140+
// since partial data vectors were not removed.
141+
size_t N_row = S.embedding.NRows() - NPartial;
142+
143+
// Set index limits for RNG random library samples.
144+
// Note that allLibRows is a vector of lib indices into the embedding.
145+
// allLibRows defines the library. These indices will not start
146+
// at 0 and end at N_row - 1 if tau is non zero.
147+
// In CCM, the library is the entire lib domain allowed by tau and Tp.
148+
// Random library samples are selected from allLibRows.
149+
int RNGStart = 0;
150+
int RNGStop = (int) S.allLibRows.NColumns() - 1;
152151

153152
//-----------------------------------------------------------------
154153
// Set number of samples
@@ -191,9 +190,8 @@ void CrossMap( SimplexClass & S,
191190

192191
size_t libSize = S.parameters.librarySizes[ libSize_i ];
193192

194-
// Create RNG sampler for this libSize out of N_row
195-
std::uniform_int_distribution< size_t >
196-
distribution( RNGStart, RNGStop );
193+
// Create RNG sampler into allLibRows for this libSize
194+
std::uniform_int_distribution< size_t > distribution(RNGStart, RNGStop);
197195

198196
#ifdef DEBUG_ALL
199197
{

src/Parameter.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Parameters::Parameters(
8989

9090
// Set validated flag and instantiate Version
9191
validated ( false ),
92-
version ( 1, 9, 2, "2021-09-17" )
92+
version ( 1, 9, 3, "2021-09-25" )
9393
{
9494
// Constructor code
9595
if ( method != Method::None ) {

0 commit comments

Comments
 (0)