Skip to contents

With a surrogate root model, returns the tabulated root when the query falls exactly on the grid of CylinderRoots and the surrogate prediction otherwise; with the "exact" method, solves the characteristic relation of Dakoulas and Gazetas (1985) for every query (see buildRootModel()). The diagnostics tell a consumer where each value comes from.

Usage

evaluateRoot(rootModel, mo, lo)

Arguments

rootModel

The root model that buildRootModel() returns.

mo

Inhomogeneity exponents, aligned with lo; below 2 for "exact".

lo

Truncation ratios \(\lambda = b / (2 H_s s + b)\), aligned; in \([0, 1)\) for "exact".

Value

A data.table with mo, lo, an (the root), exact (TRUE when read from the table or solved from the relation) and withinSupport (FALSE when lo or mo lies outside the tabulated range of a surrogate, below its minimum or above its maximum, so the value is an extrapolation; both minima are 0 in CylinderRoots). A surrogate root is a numerical interpolation whose error is not characterized; an "exact" root is converged to \(10^{-10}\).

Examples

RootModel <- buildRootModel(mode = 1, method = "nlm")
# A node of CylinderRoots, a query between its nodes and one beyond its largest m.
Query <- data.frame(mo = c(0, 0.148, 1.5), lo = c(0, 0.351, 0.351))
evaluateRoot(RootModel, mo = Query$mo, lo = Query$lo)
#>       mo    lo       an  exact withinSupport
#>    <num> <num>    <num> <lgcl>        <lgcl>
#> 1: 0.000 0.000 2.404826   TRUE          TRUE
#> 2: 0.148 0.351 3.117120  FALSE          TRUE
#> 3: 1.500 0.351 7.151753  FALSE         FALSE
# The exact method solves the characteristic relation at the same queries.
evaluateRoot(buildRootModel(mode = 1, method = "exact"), mo = Query$mo, lo = Query$lo)
#>       mo    lo       an  exact withinSupport
#>    <num> <num>    <num> <lgcl>        <lgcl>
#> 1: 0.000 0.000 2.404826   TRUE          TRUE
#> 2: 0.148 0.351 3.111907   TRUE          TRUE
#> 3: 1.500 0.351 9.543948   TRUE          TRUE