|
GALib-Parallel
Header-only C++ library for parallel evolutionary algorithms
|
A computationally intensive trigonometric benchmark function. More...
#include <HeavyTrigFunction.h>
Public Member Functions | |
| HeavyTrigFunction (std::size_t dimensions, GeneType lower_bound, GeneType upper_bound, std::size_t repeat_count=64) | |
| Constructs the benchmark. | |
| double | evaluate (const std::vector< GeneType > &phenotype) const override |
| Evaluates the heavy trigonometric sum. | |
| std::size_t | size () const override |
| Returns the dimensionality of the optimization problem. | |
| std::string | name () const override |
| Short identifier used to select a GPU evaluation kernel. | |
| GeneType | getLowerBound (std::size_t) const override |
| Gets the lower bound for a specific dimension. | |
| GeneType | getUpperBound (std::size_t) const override |
| Gets the upper bound for a specific dimension. | |
Public Member Functions inherited from galib::FitnessFunction< GeneType > | |
| virtual | ~FitnessFunction ()=default |
| GeneType | getLowerBound () const |
| Convenience method to get the lower bound of the first dimension. | |
| GeneType | getUpperBound () const |
| Convenience method to get the upper bound of the first dimension. | |
A computationally intensive trigonometric benchmark function.
Designed to test the library's parallel scaling capabilities by introducing a heavy workload in the fitness evaluation via repeated sine/cosine iterations.
| GeneType | The numeric type of the genes. |
Definition at line 25 of file HeavyTrigFunction.h.
|
inlineexplicit |
Constructs the benchmark.
| dimensions | Number of dimensions. |
| lower_bound | Uniform lower bound. |
| upper_bound | Uniform upper bound. |
| repeat_count | Number of internal iterations per dimension (default: 64). |
Definition at line 40 of file HeavyTrigFunction.h.
|
inlineoverridevirtual |
Evaluates the heavy trigonometric sum.
| phenotype | Input vector. |
Implements galib::FitnessFunction< GeneType >.
Definition at line 54 of file HeavyTrigFunction.h.
|
inlineoverridevirtual |
Gets the lower bound for a specific dimension.
| dimension | Index of the dimension. |
Implements galib::FitnessFunction< GeneType >.
Definition at line 82 of file HeavyTrigFunction.h.
|
inlineoverridevirtual |
Gets the upper bound for a specific dimension.
| dimension | Index of the dimension. |
Implements galib::FitnessFunction< GeneType >.
Definition at line 86 of file HeavyTrigFunction.h.
|
inlineoverridevirtual |
Short identifier used to select a GPU evaluation kernel.
Override in benchmark subclasses to enable GPU-side evaluation ("Sphere", "Rastrigin", "HeavyTrig"). Return empty string (default) to use the CPU callback path.
Reimplemented from galib::FitnessFunction< GeneType >.
Definition at line 80 of file HeavyTrigFunction.h.
|
inlineoverridevirtual |
Returns the dimensionality of the optimization problem.
Implements galib::FitnessFunction< GeneType >.
Definition at line 79 of file HeavyTrigFunction.h.