Learn R Programming

pwlapprox2d (version 0.1.0)

find_global_optima: Global Optimization of Approximation Error

Description

This function computes the global minimum and maximum of the absolute error between the target function f and its piecewise linear (PWL) approximation across each linear segment.

Usage

find_global_optima(PWL, f, tol = 1e-06)

Value

A matrix with 4 columns: x_min (location of min error), min_error, x_max (location of max error), max_error.

Arguments

PWL

A matrix with 4 columns: slope, intercept, lower bound, upper bound.

f

The original function to approximate.

tol

Tolerance for optimizer convergence.