View source: R/vector_fields.R
| vc_divergence | R Documentation |
Estimate the divergence of a square vector field
vc_divergence(
f,
point,
method = "central",
h = NULL,
atol = 1e-08,
rtol = 1e-04,
warn = TRUE
)
f |
Function of a Cartesian vector returning the same number of finite real components as the input. |
point |
Nonempty finite real coordinate vector. Optional names must be unique and nonempty and are passed to f. |
method |
One difference method, or one per coordinate. Explicit one-sided methods can be used at known coordinate-domain boundaries. |
h |
NULL for per-coordinate vc_derivative heuristics, one positive finite step for all coordinates, or a positive finite vector of that dimension. No recycling of shorter vectors is allowed. |
atol |
Nonnegative finite absolute tolerance for sensitivity comparisons. |
rtol |
Nonnegative finite relative tolerance for sensitivity comparisons. |
warn |
Logical scalar; warn when sensitivity diagnostics fail. |
The estimate is the trace of the Jacobian. Reliability summarizes only the diagonal entries. Numerical sensitivity does not certify differentiability or bound the divergence error.
List with estimate, refinements, reliable and the full Jacobian.
vc_divergence(function(p)c(p[1],2*p[2]),c(1,2))$estimate
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.