33 #ifndef DART_OPTIMIZER_POPULATION_HPP_
34 #define DART_OPTIMIZER_POPULATION_HPP_
40 #include <Eigen/Dense>
47 class MultiObjectiveProblem;
56 std::shared_ptr<MultiObjectiveProblem> problem,
57 std::size_t populationSize = 0u);
67 void pushBack(
const Eigen::VectorXd& x);
71 void pushBack(
const Eigen::VectorXd& x,
const Eigen::VectorXd& f);
75 void set(std::size_t
index,
const Eigen::VectorXd& x);
79 std::size_t
index,
const Eigen::VectorXd& x,
const Eigen::VectorXd& f);
91 std::ostream&
print(std::ostream& os)
const;
96 std::shared_ptr<MultiObjectiveProblem>
mProblem;
std::size_t index
Definition: SkelParser.cpp:1672
Definition: MultiObjectiveProblem.hpp:47
Definition: Population.hpp:50
std::shared_ptr< MultiObjectiveProblem > mProblem
Multi-objective problem that this population is accosiated with.
Definition: Population.hpp:96
MultiObjectiveProblem * getProblem()
Returns the associated problem, which is always not null.
Definition: Population.cpp:98
Eigen::MatrixXd mPopulation
Decision vectors. A column represents a decision vector.
Definition: Population.hpp:99
std::size_t getSize() const
Returns the size of this population.
Definition: Population.cpp:158
Eigen::MatrixXd mFitness
Fitness vectors. A column represents a fitness vector.
Definition: Population.hpp:102
void pushBack(const Eigen::VectorXd &x)
Adds the decision vector at the back of the population.
Definition: Population.cpp:110
Population(std::shared_ptr< MultiObjectiveProblem > problem, std::size_t populationSize=0u)
Constructor.
Definition: Population.cpp:74
Eigen::VectorXd getDecisionVector(std::size_t index) const
Returns a decision vectors at index.
Definition: Population.cpp:165
void set(std::size_t index, const Eigen::VectorXd &x)
Sets the decision vector.
Definition: Population.cpp:136
std::ostream & print(std::ostream &os) const
Prints information of this class to a stream.
Definition: Population.cpp:177
Eigen::VectorXd getFitnessVector(std::size_t index) const
Returns a fitness vectors at index.
Definition: Population.cpp:171
Definition: BulletCollisionDetector.cpp:65