12 std::filesystem::path weights_file_path_;
13 size_t number_of_active_years_;
14 std::shared_ptr<ProblemGenerationLog::ProblemGenerationLogger> logger_;
15 bool null_weights =
true;
16 std::vector<double> weights_list_;
18 int CountValues()
const;
19 bool AreAllWeightsNull()
const;
20 double GetWeightFromLine(
const std::string& line,
int idx)
const;
21 void CheckValue(
const double line,
int idx);
22 void CheckFileIsNotEmpty(std::ifstream& file)
const;
26 const std::filesystem::path& weights_file_path,
27 const size_t number_of_active_years,
28 std::shared_ptr<ProblemGenerationLog::ProblemGenerationLogger> logger)
29 : weights_file_path_(weights_file_path),
30 number_of_active_years_(number_of_active_years),
33 using LogUtils::XpansionError<std::runtime_error>::XpansionError;
36 using WeightsFileError::WeightsFileError;
39 using WeightsFileError::WeightsFileError;
42 using WeightsFileError::WeightsFileError;
45 using WeightsFileError::WeightsFileError;
48 using WeightsFileError::WeightsFileError;
58 std::vector<double> WeightsList()
const {
return weights_list_; }