DART
6.7.3
|
#include <Population.hpp>
Public Member Functions | |
Population (std::shared_ptr< MultiObjectiveProblem > problem, std::size_t populationSize=0u) | |
Constructor. More... | |
MultiObjectiveProblem * | getProblem () |
Returns the associated problem, which is always not null. More... | |
const MultiObjectiveProblem * | getProblem () const |
Returns the associated problem, which is always not null. More... | |
void | pushBack (const Eigen::VectorXd &x) |
Adds the decision vector at the back of the population. More... | |
void | pushBack (const Eigen::VectorXd &x, const Eigen::VectorXd &f) |
Adds the decision vector and the fitness vector at the back of the population. More... | |
void | set (std::size_t index, const Eigen::VectorXd &x) |
Sets the decision vector. More... | |
void | set (std::size_t index, const Eigen::VectorXd &x, const Eigen::VectorXd &f) |
Sets the decision vector and fitness vector at index in the population. More... | |
std::size_t | getSize () const |
Returns the size of this population. More... | |
Eigen::VectorXd | getDecisionVector (std::size_t index) const |
Returns a decision vectors at index . More... | |
Eigen::VectorXd | getFitnessVector (std::size_t index) const |
Returns a fitness vectors at index . More... | |
std::ostream & | print (std::ostream &os) const |
Prints information of this class to a stream. More... | |
Protected Attributes | |
std::shared_ptr< MultiObjectiveProblem > | mProblem |
Multi-objective problem that this population is accosiated with. More... | |
Eigen::MatrixXd | mPopulation |
Decision vectors. A column represents a decision vector. More... | |
Eigen::MatrixXd | mFitness |
Fitness vectors. A column represents a fitness vector. More... | |
dart::optimizer::Population::Population | ( | std::shared_ptr< MultiObjectiveProblem > | problem, |
std::size_t | populationSize = 0u |
||
) |
Constructor.
Population stores a clone of a problem
.
Eigen::VectorXd dart::optimizer::Population::getDecisionVector | ( | std::size_t | index | ) | const |
Returns a decision vectors at index
.
Eigen::VectorXd dart::optimizer::Population::getFitnessVector | ( | std::size_t | index | ) | const |
Returns a fitness vectors at index
.
MultiObjectiveProblem * dart::optimizer::Population::getProblem | ( | ) |
Returns the associated problem, which is always not null.
const MultiObjectiveProblem * dart::optimizer::Population::getProblem | ( | ) | const |
Returns the associated problem, which is always not null.
std::size_t dart::optimizer::Population::getSize | ( | ) | const |
Returns the size of this population.
std::ostream & dart::optimizer::Population::print | ( | std::ostream & | os | ) | const |
Prints information of this class to a stream.
void dart::optimizer::Population::pushBack | ( | const Eigen::VectorXd & | x | ) |
Adds the decision vector at the back of the population.
The corresponding fitness vector will be evaulated and set.
void dart::optimizer::Population::pushBack | ( | const Eigen::VectorXd & | x, |
const Eigen::VectorXd & | f | ||
) |
Adds the decision vector and the fitness vector at the back of the population.
void dart::optimizer::Population::set | ( | std::size_t | index, |
const Eigen::VectorXd & | x | ||
) |
Sets the decision vector.
The corresponding fitness vector will be evaulated and set.
void dart::optimizer::Population::set | ( | std::size_t | index, |
const Eigen::VectorXd & | x, | ||
const Eigen::VectorXd & | f | ||
) |
Sets the decision vector and fitness vector at index
in the population.
|
protected |
Fitness vectors. A column represents a fitness vector.
|
protected |
Decision vectors. A column represents a decision vector.
|
protected |
Multi-objective problem that this population is accosiated with.
This is always not null.