Skip to content

Commit

Permalink
Merge pull request #3 from KienTTran/main
Browse files Browse the repository at this point in the history
remove YAML namespace
  • Loading branch information
KienTTran authored Oct 14, 2024
2 parents 5686c8c + 16b6454 commit 68cf1d4
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 24 deletions.
10 changes: 5 additions & 5 deletions src/Configuration/EpidemiologicalParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ namespace YAML {

// GammaDistribution YAML conversion
template<>
struct YAML::convert<BitingLevelDistributionGamma> {
struct convert<BitingLevelDistributionGamma> {
static Node encode(const BitingLevelDistributionGamma& rhs) {
Node node;
node["mean"] = rhs.get_mean();
Expand All @@ -178,7 +178,7 @@ struct YAML::convert<BitingLevelDistributionGamma> {

// BitingLevelDistribution YAML conversion
template<>
struct YAML::convert<BitingLevelDistribution> {
struct convert<BitingLevelDistribution> {
static Node encode(const BitingLevelDistribution& rhs) {
Node node;
node["distribution"] = rhs.get_distribution();
Expand All @@ -198,7 +198,7 @@ struct YAML::convert<BitingLevelDistribution> {

// RelativeBitingInfo YAML conversion
template<>
struct YAML::convert<RelativeBitingInfo> {
struct convert<RelativeBitingInfo> {
static Node encode(const RelativeBitingInfo& rhs) {
Node node;
node["max_relative_biting_value"] = rhs.get_max_relative_biting_value();
Expand All @@ -223,7 +223,7 @@ struct YAML::convert<RelativeBitingInfo> {

// RelativeInfectivity YAML conversion
template<>
struct YAML::convert<RelativeInfectivity> {
struct convert<RelativeInfectivity> {
static Node encode(const RelativeInfectivity& rhs) {
Node node;
node["sigma"] = rhs.get_sigma();
Expand All @@ -245,7 +245,7 @@ struct YAML::convert<RelativeInfectivity> {

// EpidemiologicalParameters YAML conversion
template<>
struct YAML::convert<EpidemiologicalParameters> {
struct convert<EpidemiologicalParameters> {
static Node encode(const EpidemiologicalParameters& rhs) {
Node node;
node["number_of_tracking_days"] = rhs.get_number_of_tracking_days();
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/ImmuneSystemParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class ImmuneSystemParameters {
namespace YAML{
// ImmuneSystemParameters YAML conversion
template<>
struct YAML::convert<ImmuneSystemParameters> {
struct convert<ImmuneSystemParameters> {
static Node encode(const ImmuneSystemParameters& rhs) {
Node node;
node["b1"] = rhs.get_b1();
Expand Down
14 changes: 7 additions & 7 deletions src/Configuration/MovementSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class MovementSettings {
namespace YAML {
// BarabasiSettings YAML conversion
template<>
struct YAML::convert<BarabasiSettings> {
struct convert<BarabasiSettings> {
static Node encode(const BarabasiSettings& rhs) {
Node node;
node["r_g_0"] = rhs.get_r_g_0();
Expand All @@ -165,7 +165,7 @@ struct YAML::convert<BarabasiSettings> {

// WesolowskiSettings YAML conversion
template<>
struct YAML::convert<WesolowskiSettings> {
struct convert<WesolowskiSettings> {
static Node encode(const WesolowskiSettings& rhs) {
Node node;
node["kappa"] = rhs.get_kappa();
Expand All @@ -189,7 +189,7 @@ struct YAML::convert<WesolowskiSettings> {

// SpatialModel YAML conversion
template<>
struct YAML::convert<SpatialModel> {
struct convert<SpatialModel> {
static Node encode(const SpatialModel& rhs) {
Node node;
node["name"] = rhs.get_name();
Expand All @@ -211,7 +211,7 @@ struct YAML::convert<SpatialModel> {

// GammaDistribution YAML conversion
template<>
struct YAML::convert<MovingLevelDistributionGamma> {
struct convert<MovingLevelDistributionGamma> {
static Node encode(const MovingLevelDistributionGamma& rhs) {
Node node;
node["mean"] = rhs.get_mean();
Expand All @@ -231,7 +231,7 @@ struct YAML::convert<MovingLevelDistributionGamma> {

// MovingLevelDistribution YAML conversion
template<>
struct YAML::convert<MovingLevelDistribution> {
struct convert<MovingLevelDistribution> {
static Node encode(const MovingLevelDistribution& rhs) {
Node node;
node["distribution"] = rhs.get_distribution();
Expand All @@ -251,7 +251,7 @@ struct YAML::convert<MovingLevelDistribution> {

// CirculationInfo YAML conversion
template<>
struct YAML::convert<CirculationInfo> {
struct convert<CirculationInfo> {
static Node encode(const CirculationInfo& rhs) {
Node node;
node["max_relative_moving_value"] = rhs.get_max_relative_moving_value();
Expand Down Expand Up @@ -279,7 +279,7 @@ struct YAML::convert<CirculationInfo> {

// MovementSettings YAML conversion
template<>
struct YAML::convert<MovementSettings> {
struct convert<MovementSettings> {
static Node encode(const MovementSettings& rhs) {
Node node;
node["spatial_model"] = rhs.get_spatial_model();
Expand Down
6 changes: 3 additions & 3 deletions src/Configuration/ParasiteParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class ParasiteParameters {
namespace YAML {
// ParasiteDensityLevels YAML conversion
template<>
struct YAML::convert<ParasiteDensityLevels> {
struct convert<ParasiteDensityLevels> {
static Node encode(const ParasiteDensityLevels& rhs) {
Node node;
node["log_parasite_density_cured"] = rhs.get_log_parasite_density_cured();
Expand Down Expand Up @@ -112,7 +112,7 @@ struct YAML::convert<ParasiteDensityLevels> {

// RecombinationParameters YAML conversion
template<>
struct YAML::convert<RecombinationParameters> {
struct convert<RecombinationParameters> {
static Node encode(const RecombinationParameters& rhs) {
Node node;
node["within_chromosome_recombination_rate"] = rhs.get_within_chromosome_recombination_rate();
Expand All @@ -132,7 +132,7 @@ struct YAML::convert<RecombinationParameters> {

// ParasiteParameters YAML conversion
template<>
struct YAML::convert<ParasiteParameters> {
struct convert<ParasiteParameters> {
static Node encode(const ParasiteParameters& rhs) {
Node node;
node["parasite_density_levels"] = rhs.get_parasite_density_levels();
Expand Down
6 changes: 3 additions & 3 deletions src/Configuration/SeasonalitySettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class SeasonalitySettings {
namespace YAML {
// Convert specialization for RainfallSettings
template <>
struct YAML::convert<RainfallSettings> {
struct convert<RainfallSettings> {
static Node encode(const RainfallSettings &rhs) {
Node node;
node["filename"] = rhs.get_filename();
Expand All @@ -146,7 +146,7 @@ struct YAML::convert<RainfallSettings> {

// Convert specialization for SimpleSettings
template <>
struct YAML::convert<SimpleSettings> {
struct convert<SimpleSettings> {
static Node encode(const SimpleSettings &rhs) {
Node node;
node["a"] = rhs.get_a();
Expand All @@ -170,7 +170,7 @@ struct YAML::convert<SimpleSettings> {

// Convert specialization for SeasonalitySettings
template <>
struct YAML::convert<SeasonalitySettings> {
struct convert<SeasonalitySettings> {
static Node encode(const SeasonalitySettings &rhs) {
Node node;
node["enable"] = rhs.get_enable();
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/SimulationTimeFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ date::year_month_day parseDate(const std::string& date_str) {
return ymd;
}

// Specialization of YAML::convert for the SimulationTimeframe class
// Specialization of convert for the SimulationTimeframe class
namespace YAML {
template <>
struct convert<SimulationTimeframe> {
Expand Down
8 changes: 4 additions & 4 deletions src/Configuration/SpatialSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class SpatialSettings {
namespace YAML {
// Conversion for GridBased class
template <>
struct YAML::convert<GridBased> {
struct convert<GridBased> {
static Node encode(const GridBased &rhs) {
Node node;
node["population_raster"] = rhs.get_population_raster();
Expand Down Expand Up @@ -273,7 +273,7 @@ struct YAML::convert<GridBased> {

// Conversion for LocationInfo class
template <>
struct YAML::convert<LocationInfo> {
struct convert<LocationInfo> {
static Node encode(const LocationInfo &rhs) {
Node node;
node.push_back(rhs.get_id());
Expand All @@ -295,7 +295,7 @@ struct YAML::convert<LocationInfo> {

// Conversion for LocationBased class
template <>
struct YAML::convert<LocationBased> {
struct convert<LocationBased> {
static Node encode(const LocationBased &rhs) {
Node node;
node["location_info"] = rhs.get_location_info();
Expand Down Expand Up @@ -326,7 +326,7 @@ struct YAML::convert<LocationBased> {

// Conversion for SpatialSettings class
template <>
struct YAML::convert<SpatialSettings> {
struct convert<SpatialSettings> {
static Node encode(const SpatialSettings &rhs) {
Node node;
node["mode"] = rhs.get_mode();
Expand Down

0 comments on commit 68cf1d4

Please sign in to comment.