Ultra 0.9.4
Loading...
Searching...
No Matches
individual.h File Reference
#include "kernel/individual.h"
#include "kernel/decision_vector.h"
#include "kernel/problem.h"
#include "kernel/random.h"
#include "kernel/gp/gene.h"
#include "utility/matrix.h"
#include "utility/misc.h"
#include <iosfwd>
#include <iterator>
#include <set>
#include "kernel/gp/individual_exon_view.tcc"
#include "kernel/individual_format.h"

Go to the source code of this file.

Classes

class  ultra::gp::exon_view
class  ultra::gp::const_exon_view
struct  ultra::gp::decision_coordinate
class  ultra::gp::individual

Namespaces

namespace  ultra

Typedefs

using ultra::gp::decision_vector = ultra::decision_vector<decision_coordinate>
 GP-specific decision-vector type used for numerical optimisation.

Functions

unsigned ultra::gp::active_slots (const individual &)
individual ultra::gp::crossover (const problem &, const individual &, const individual &)
unsigned ultra::gp::distance (const individual &, const individual &)
decision_vector ultra::gp::extract_decision_vector (const individual &ind)
locus ultra::gp::random_locus (const individual &prg)

Detailed Description

Remarks
This file is part of ULTRA.
License

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/

Function Documentation

◆ extract_decision_vector()

decision_vector ultra::gp::extract_decision_vector ( const individual & ind)
nodiscard

Extracts the decision vector associated with an individual.

Returns
a valid decision vector

The returned decision_vector provides a flat, optimiser-friendly view of all tunable scalar parameters (currently D_DOUBLE and D_INT) appearing in the active portion of the genome.

Note
Only parameters in active genes (exons) are included. Inactive code is ignored.
Integer parameters are converted to double for optimisation. The original type information is preserved in decision_vector::coordinate::kind and restored when applying the vector.
The ordering of parameters is deterministic for a fixed individual and reflects the traversal order of its active genes. The returned vector is therefore compatible with apply_decision_vector() as long as the structure of the individual is unchanged.