Companion

object Companion

Properties

Link copied to clipboard
const val numIterations: Int = 50

Used in the methods for finding intervals

Link copied to clipboard
const val searchFactor: Double = 1.6

used in the methods for finding intervals

Functions

Link copied to clipboard
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

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

Link copied to clipboard
fun hasRoot(func: FunctionIfc, interval: Interval): Boolean
fun hasRoot(func: FunctionIfc, xLower: Double, xUpper: Double): Boolean

Returns true if the supplied interval contains a root