Vita
Public Member Functions | List of all members
vita::de_problem Class Reference

Provides a DE-specific interface to the generic problem class. More...

#include <problem.h>

Inherits vita::problem.

Public Member Functions

 de_problem (const std::vector< range_t< double > > &)
 Sets up a DE problem for which a solution has the given number of (uniform but not same range) parameters. More...
 
 de_problem (std::size_t, const range_t< double > &)
 Sets up a DE problem for which a solution has the given number of (uniform, same range) parameters. More...
 
template<class... Args>
terminalinsert (Args &&... args)
 
template<class... Args>
terminalinsert (Args &&...)
 
- Public Member Functions inherited from vita::problem
template<class S , class ... Args>
symbolinsert (Args &&... args)
 Adds a symbol to the internal symbol set. More...
 
template<class S , class ... Args>
symbolinsert (Args &&...)
 
virtual bool is_valid () const
 
 problem ()
 A new problem. More...
 

Additional Inherited Members

- Public Attributes inherited from vita::problem
environment env
 
symbol_set sset
 

Detailed Description

Provides a DE-specific interface to the generic problem class.

The class is a facade that provides a simpler interface to represent DE-specific problems.

Examples
rastrigin.cc.

Definition at line 52 of file ga/problem.h.

Constructor & Destructor Documentation

◆ de_problem() [1/2]

vita::de_problem::de_problem ( std::size_t  parameters,
const range_t< double > &  range 
)

Sets up a DE problem for which a solution has the given number of (uniform, same range) parameters.

Parameters
[in]parametersnumber of parameters (aka genes in the chromosome)
[in]rangea half-open interval (the value of each parameter falls within this range)

The typical solution of a numerical optimization problem can often be represented as a sequence of real numbers in a given range (and this is the raison d'etre of this constructor).

Definition at line 70 of file ga/problem.cc.

◆ de_problem() [2/2]

vita::de_problem::de_problem ( const std::vector< range_t< double > > &  ranges)
explicit

Sets up a DE problem for which a solution has the given number of (uniform but not same range) parameters.

Parameters
[in]rangesa sequence of half-open intervals (one for each parameter)

This is a more flexible form of the other constructor. Each parameter has its own range.

Definition at line 89 of file ga/problem.cc.

Member Function Documentation

◆ insert()

template<class... Args>
terminal * vita::de_problem::insert ( Args &&...  args)

Definition at line 62 of file ga/problem.h.


The documentation for this class was generated from the following files: