findInterval

fun findInterval(func: FunctionIfc, interval: Interval, numIter: Int = numIterations, searchFact: Double = searchFactor): Boolean

Using the supplied function and the initial interval provided, try to find a bracketing interval by expanding the interval outward

Return

true if one is found

Parameters

func

the function to evaluate

interval

the starting interval, which is mutated

numIter

the number of iterations outward

searchFact

the expansion factor


fun findInterval(func: FunctionIfc, interval: Interval, n: Int, nMax: Int): List<Interval>

Given a function and a starting interval, subdivide the interval into n subintervals and attempt to find nmax bracketing intervals that contain roots

Return

The list of bracketing intervals

Parameters

func

the function to evaluate

interval

the starting (main) interval

n

number of subdivisions of the main interval

nMax

max number of bracketing intervals