DIPlib Documentation - ©1995-2009 Quantitative Imaging Group, Delft University of Technology.

# OneDimensionalSearch

Numerical algorithm

## SYNOPSIS

`#include "dip_numerical.h"`

dip_Error dip_OneDimensionalSearch ( result, min, max, tol, func, dfunc, data, searchfor )

## FUNCTION

This function implements a numerical line-search for either the minimum or zero-crossing of a function. The obejctive is searched for in the range specified by `min` and `man` with a tolerance of `tol`. The search methods are based on Brent's algorithm. The `dfunc` parameter is preparation for support of search algorithms using derivative information. This is not supported in the current implementation, and `dfunc` should be set to zero.

## ARGUMENTS

Data type | Name | Description
`dip_float *` | `result` | Result value
`dip_float` | `min` | Minimum value of search domain
`dip_float` | `max` | Maximum value of search domain
`dip_float` | `tol` | Tolerance
`dip_OneDimensionalSearchFunction` | `func` | Function
`dip_OneDimensionalSearchFunction` | `dfunc` | Derivative function
`void *` | `data` | User-supplied Data passed to `func` and `dfunc`
`dipf_OneDimensionSearch` | `searchfor` | Search for minimum of zero-crossing

DIPlib on-line documentation | Function reference | Global function index