![]() |
Ultra 0.9.4
|
Go to the source code of this file.
Functions | |
| template<Individual I, Fitness F> | |
| auto | operator<=> (const scored_individual< I, F > &lhs, const scored_individual< I, F > &rhs) noexcept |
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/
|
noexcept |
Orders two scored individuals by fitness.
| lhs | first scored individual |
| rhs | second scored individual |
The comparison is based only on the fitness value and is intended for ranking and selection purposes (e.g. best/worst individual).
As a consequence, scored_individual does not model a totally ordered type and cannot be used with default std::ranges::less. Algorithms requiring ordering should supply an explicit comparator or projection.