OptiPy
Loading...
Searching...
No Matches
Rosenbrock Class Reference

Implements the Rosenbrock benchmark function. More...

#include <Rosenbrock.h>

Inheritance diagram for Rosenbrock:
Problem

Public Member Functions

double evaluate (const std::vector< double > &x) const override
 Evaluates the fitness of a candidate solution.
Public Member Functions inherited from Problem
 Problem (double lb, double ub, const std::string_view n)
 Constructs a Problem instance.
virtual ~Problem ()=default
 Virtual destructor for safe polymorphic cleanup.
double evaluateSolution (const std::vector< double > &solution)
void getInitialSolutions (std::vector< std::vector< double > > &population)
double getLowerBounds () const
double getUpperBounds () const
const std::string getName () const
unsigned long getSeed () const
void setSeed (unsigned long s)
void setDimensions (size_t dims)

Additional Inherited Members

Protected Attributes inherited from Problem
const double lowerBound
 Lower bound of the search space.
const double upperBound
 Upper bound of the search space.
const std::string name
 Name of the benchmark function.
size_t dimensions
unsigned long seed = 0

Detailed Description

Implements the Rosenbrock benchmark function.

Member Function Documentation

◆ evaluate()

double Rosenbrock::evaluate ( const std::vector< double > & x) const
inlineoverridevirtual

Evaluates the fitness of a candidate solution.

  • This is a pure virtual function that must be implemented by specific benchmark functions (e.g., Ackley, Rosenbrock).
  • Parameters
    xThe solution vector to evaluate.
    Returns
    The scalar fitness value (cost).

Implements Problem.


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