Skip to content

Commit ec152b3

Browse files
committed
Throw exception after printing parameters
1 parent 1113763 commit ec152b3

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/UtilitiesLib/InputData.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,6 @@ InputData::InputData(int argc, char **argv)
350350
throw pink::exception("Unknown execution path.");
351351
}
352352

353-
if (usePBC) throw pink::exception("Periodic boundary conditions are not supported in version 2.");
354-
355353
if (layout == Layout::HEXAGONAL) {
356354
if (usePBC) throw pink::exception("Periodic boundary conditions are not supported for hexagonal layout.");
357355
if ((som_width - 1) % 2) throw pink::exception("For hexagonal layout only odd dimension supported.");
@@ -399,8 +397,6 @@ InputData::InputData(int argc, char **argv)
399397
if (number_of_rotations != 1) euclidean_distance_dim *= std::sqrt(2.0) / 2.0;
400398
}
401399

402-
if (euclidean_distance_dim > neuron_dim) throw pink::exception("euclidean distance dimension must be equal or smaller than neuron dimension.");
403-
404400
neuron_size = neuron_dim * neuron_dim;
405401
som_total_size = som_size * neuron_size;
406402
number_of_spatial_transformations = use_flip ? 2 * number_of_rotations : number_of_rotations;
@@ -415,6 +411,8 @@ InputData::InputData(int argc, char **argv)
415411
if (file_type != 0) throw pink::exception("Please use file type 0 as data input.");
416412
if (data_type != 0) throw pink::exception("Only data_type = 0 (float, single precision) is supported.");
417413
if (number_of_data_entries <= 0) throw pink::exception("Number of data entries must be larger than 0.");
414+
if (euclidean_distance_dim > neuron_dim) throw pink::exception("euclidean distance dimension must be equal or smaller than neuron dimension.");
415+
if (usePBC) throw pink::exception("Periodic boundary conditions are not supported in version 2.");
418416
}
419417

420418
void InputData::print_header() const

0 commit comments

Comments
 (0)