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