#include <search_space_constraint.hpp>


Public Member Functions | |
| search_space_constraint (const pass::problem &wrapped_problem, arma::uword segment, arma::uword total_segments) | |
| double | evaluate (const arma::vec &agent) const override |
Public Member Functions inherited from pass::problem | |
| arma::vec | bounds_range () const noexcept |
| arma::uword | dimension () const noexcept |
| problem (const arma::uword dimension, const double lower_bound, const double upper_bound, const std::string &name) | |
| problem (const arma::vec &lower_bounds, const arma::vec &upper_bounds, const std::string &name) | |
| double | evaluate_normalised (const arma::vec &normalised_agent) const |
| arma::mat | normalised_random_agents (const arma::uword count) const |
| arma::mat | normalised_hammersley_agents (const arma::uword count) const |
| arma::mat | initialise_normalised_agents (const arma::uword count) const |
Public Attributes | |
| const pass::problem & | wrapped_problem |
Public Attributes inherited from pass::problem | |
| const arma::vec | lower_bounds |
| const arma::vec | upper_bounds |
| const std::string | name |
Detailed Description
This helper class reduces the problem boundaries of a wrapped problem to 1/nth of its normal search space, where n can be specified as a constructor argument.
Constructor & Destructor Documentation
◆ search_space_constraint()
| pass::search_space_constraint::search_space_constraint | ( | const pass::problem & | wrapped_problem, |
| arma::uword | segment, | ||
| arma::uword | total_segments | ||
| ) |
Initializes the problem boundaries. All boundaries are copied from wrapped_problem, except for the dimension 1.
The dimension 1 boundary is modified to have a range of 1 / total_segments * original bounds range, and and offset of calculated range * segment.
Both parameters segment and total_segments are 1-based: If you want to divide the search space into four non-overlapping sections, pass the values 1, 2, 3, 4 as segment parameters, and 4 as total_segments parameter.
Member Function Documentation
◆ evaluate()
|
overridevirtual |
Evaluates this problem at agent, which must match the dimensions of this problem.
Implements pass::problem.
Member Data Documentation
◆ wrapped_problem
| const pass::problem& pass::search_space_constraint::wrapped_problem |
The internal problem to which evaluate calls are forwarded.
CAUTION: This variable is a reference type! Do not free or reuse the memory of wrapped_object until search_space_constraint is destroyed!
The documentation for this class was generated from the following files:
- /Users/romeo/Desktop/PASS/include/pass_bits/helper/search_space_constraint.hpp
- /Users/romeo/Desktop/PASS/src/helper/search_space_constraint.cpp
Public Member Functions inherited from