60 const std::vector<double> &upper_bounds)
const;
78 const std::vector<double> &b)
const;
88 const std::vector<double> &b)
const;
175 const std::function<
double(
const std::vector<double> &)> &func,
176 const std::vector<double> &lower_bounds,
177 const std::vector<double> &upper_bounds,
190 const std::function<
double(
const std::vector<double> &)> &func,
191 const std::vector<double> &lower_bounds,
192 const std::vector<double> &upper_bounds,
193 size_t max_iterations);
202 std::vector<double>
fit_linear(
const std::vector<double> &x,
203 const std::vector<double> &y);
215 const std::function<
double(
const std::vector<double> &)> &func,
216 const std::vector<double> &lower_bounds,
217 const std::vector<double> &upper_bounds,
218 size_t max_iterations);
230 const std::function<
double(
const std::vector<double> &)> &func,
231 const std::vector<double> &lower_bounds,
232 const std::vector<double> &upper_bounds,
233 size_t max_iterations)
const;
245 const std::function<
double(
const std::vector<double> &)> &func,
248 size_t max_iterations);
260 const std::function<
double(
const std::vector<double> &)> &func,
261 const std::function<
double(
const std::vector<double> &)> &derivative,
262 double initial_guess,
263 size_t max_iterations);
276 regula_falsi(
const std::function<
double(
const std::vector<double> &)> &func,
279 size_t max_iterations);
288 std::vector<double>
cubic_fit(
const std::vector<double> &x,
289 const std::vector<double> &y);
304 nelder_mead(
const std::function<
double(
const std::vector<double> &)> &func,
305 std::vector<double> initial_point,
307 size_t max_iterations);
318 size_t exclude_index);
328 std::vector<double>
reflect(
const std::vector<double> &point,
329 const std::vector<double> ¢roid,
330 double reflection_coefficient);
387 const std::function<
double(
const std::vector<double> &)> &func,
388 const std::vector<double> &lower_bounds,
389 const std::vector<double> &upper_bounds,
391 const std::vector<double> &x1,
392 const std::vector<double> &x2);
A class containing various utility functions and optimization methods.
double cubic_interpolation(double x, double x0, double x1, double y0, double y1, double y0_prime, double y1_prime)
Interpolates a univariate function using cubic interpolation.
double fibonacci_search(const std::function< double(const std::vector< double > &)> &func, const std::vector< double > &lower_bounds, const std::vector< double > &upper_bounds, size_t max_iterations)
Performs Fibonacci search for function optimization.
std::vector< double > regula_falsi(const std::function< double(const std::vector< double > &)> &func, double lower_bound, double upper_bound, size_t max_iterations)
Performs Regula Falsi (False Position) method for function optimization.
std::vector< double > generate_random_point(const std::vector< double > &lower_bounds, const std::vector< double > &upper_bounds) const
Generates a random point within specified bounds.
double random_search(const std::function< double(const std::vector< double > &)> &func, const std::vector< double > &lower_bounds, const std::vector< double > &upper_bounds, size_t max_iterations)
Performs random search for function optimization.
std::vector< double > bisection_method(const std::function< double(const std::vector< double > &)> &func, double lower_bound, double upper_bound, size_t max_iterations)
Performs the bisection method for function optimization.
std::vector< double > vector_subtraction(const std::vector< double > &a, const std::vector< double > &b) const
Performs vector subtraction.
std::vector< double > fit_linear(const std::vector< double > &x, const std::vector< double > &y)
Fits a linear function to given data points.
std::vector< double > reflect(const std::vector< double > &point, const std::vector< double > ¢roid, double reflection_coefficient)
Reflects a point with respect to a centroid.
double ternary_search(const std::function< double(const std::vector< double > &)> &func, const std::vector< double > &lower_bounds, const std::vector< double > &upper_bounds, size_t max_iterations) const
Performs ternary search for function optimization.
std::vector< double > cubic_fit(const std::vector< double > &x, const std::vector< double > &y)
Fits a cubic function to given data points.
std::vector< double > golden_section_search_minimize_multivariate(const std::function< double(const std::vector< double > &)> &func, const std::vector< double > &lower_bounds, const std::vector< double > &upper_bounds, double tol, const std::vector< double > &x1, const std::vector< double > &x2)
Finds the minimum of a multivariate function using Golden-section search (Internal helper function)
std::vector< double > newton_method(const std::function< double(const std::vector< double > &)> &func, const std::function< double(const std::vector< double > &)> &derivative, double initial_guess, size_t max_iterations)
Performs Newton's method for function optimization.
double calculate_midpoint(double a, double b, double fraction) const
Calculates the midpoint between two values.
std::vector< double > nelder_mead(const std::function< double(const std::vector< double > &)> &func, std::vector< double > initial_point, double tolerance, size_t max_iterations)
Finds the minimum of a multivariate function using the Nelder–Mead method.
double calculate_range(const std::vector< double > &values)
Calculates the range of values.
bool is_valid_interval(double a, double b)
Checks if a given interval is valid (lower bound < upper bound)
double golden_section_search(const std::function< double(double)> &func, double a, double b, double tol)
Finds the minimum of a univariate function using Golden-section search.
double linear_interpolation(double x, double x0, double x1, double y0, double y1)
Interpolates a univariate function using linear interpolation.
std::vector< double > vector_scalar_multiply(double scalar, const std::vector< double > &vec) const
Performs vector scalar multiplication.
std::vector< double > calculate_centroid(const std::vector< std::vector< double >> &simplex, size_t exclude_index)
Calculates the centroid of a simplex excluding a specific point.
double golden_section_search_minimize(const std::function< double(double)> &func, double a, double b, double tol, double x1, double x2)
Finds the minimum of a univariate function using Golden-section search (Internal helper function)
std::vector< double > vector_addition(const std::vector< double > &a, const std::vector< double > &b) const
Performs vector addition.
std::vector< double > generate_fibonacci_sequence(size_t length) const
Generates a Fibonacci sequence up to a specified length.
std::vector< double > golden_section_search_multivariate(const std::function< double(const std::vector< double > &)> &func, const std::vector< double > &lower_bounds, const std::vector< double > &upper_bounds, double tol)
Finds the minimum of a multivariate function using Golden-section search.
The source C++ openGPMP namespace.