bisection: Bisection Algorithm

View source: R/bisection.R

bisectionR Documentation

Bisection Algorithm

Description

Given an increasing step function f(x), locate the point where the step occurs.

Usage

bisection(x_lo, x_hi, f, mid, dist, tol)

Arguments

x_lo

A finite lower bound for x which should occur before the step.

x_hi

A finite upper bound for x which should occur after the step.

f

The function f(x).

mid

A midpoint function which operates on two points (x,y) where x <= y.

dist

A distance function which operates on two points (x,y) where x <= y.

tol

Stop when dist(x_lo, x_hi) < tol.


andrewraim/DirectSampling documentation built on June 5, 2024, 4:36 p.m.