Skip to content

Commit

Permalink
make the data members of GaInfo private
Browse files Browse the repository at this point in the history
  • Loading branch information
KRM7 committed Mar 25, 2024
1 parent a2a0ab0 commit 1af9df9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
15 changes: 0 additions & 15 deletions src/core/ga_base.decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,21 +614,6 @@ namespace gapp
bool isValidEvaluatedPopulation(const Population<T>& pop) const;
bool isValidUnevaluatedPopulation(const Population<T>& pop) const;
bool fitnessMatrixIsSynced() const;


/* Make the protected members of GaInfo private. */
using GaInfo::fitness_matrix_;
using GaInfo::algorithm_;
using GaInfo::stop_condition_;
using GaInfo::metrics_;
using GaInfo::on_generation_end_;
using GaInfo::population_size_;
using GaInfo::max_gen_;
using GaInfo::num_objectives_;
using GaInfo::generation_cntr_;
using GaInfo::num_fitness_evals_;
using GaInfo::keep_all_optimal_sols_;
using GaInfo::use_default_algorithm_;
};

} // namespace gapp
Expand Down
5 changes: 4 additions & 1 deletion src/core/ga_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,14 @@ namespace gapp
/** Destructor. */
virtual ~GaInfo() noexcept;

protected:
private:

GaInfo(GaInfo&&) noexcept;
GaInfo& operator=(GaInfo&&) noexcept;

template<typename T>
friend class GA;

FitnessMatrix fitness_matrix_;

std::unique_ptr<algorithm::Algorithm> algorithm_;
Expand Down

0 comments on commit 1af9df9

Please sign in to comment.