Skip to content
This repository was archived by the owner on May 8, 2024. It is now read-only.

Commit 9ff4833

Browse files
committed
Fixed error
1 parent 634af5d commit 9ff4833

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/nmc.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,15 +278,21 @@ void NMC::generate_internal_paths(const Matrix &external_paths, Matrix &paths) c
278278
std::cout << "Generating internal paths on thread " << std::this_thread::get_id() << std::endl;
279279

280280
#ifdef DEBUG
281-
std::cout << "External paths size:" << external_paths.size() << std::endl;
282-
std::cout << "First path size:" << external_paths[0].size() << std::endl;
281+
std::cout << "External paths size: " << external_paths.size() << std::endl;
282+
std::cout << "First path size: " << external_paths[0].size() << std::endl;
283283
#endif
284284

285+
paths.resize(m1);
286+
285287
for (size_t i = 0; i < nb_points; i++)
286288
{
287289
paths[0].push_back(external_paths[0][i]);
288290
}
289291

292+
#ifdef DEBUG
293+
std::cout << "First path generated" << std::endl;
294+
#endif
295+
290296
std::random_device rd;
291297
std::mt19937 gen(rd());
292298

@@ -295,7 +301,7 @@ void NMC::generate_internal_paths(const Matrix &external_paths, Matrix &paths) c
295301

296302
double dt = T / double(nb_points);
297303

298-
for (size_t i = 1; i < m1; i++)
304+
for (size_t i = 0; i < m1; i++)
299305
{
300306
for (size_t j = 1; j < nb_points; j++)
301307
{

0 commit comments

Comments
 (0)