add_zoom: add_zoom: Zoom in on region of another function. Allows you...

View source: R/add_zoom.R

add_zoomR Documentation

add_zoom: Zoom in on region of another function. Allows you to easily change an existing function so that [0,1]^n refers to a subregion of the original function

Description

add_zoom: Zoom in on region of another function. Allows you to easily change an existing function so that [0,1]^n refers to a subregion of the original function

Usage

add_zoom(func, scale_low, scale_high)

Arguments

func

Function to add linear terms to

scale_low

Vector of low end of scale values for each dimension

scale_high

Vector of high end of scale values for each dimension

Value

Function with added linear terms

Examples

banana(c(.5,.85))
add_zoom(banana, c(0,.5), c(1,1))(c(.5,.7))
add_zoom(banana, c(.2,.5), c(.8,1))(matrix(c(.5,.7),ncol=2))
ContourFunctions::cf(banana)
ContourFunctions::cf(add_zoom(banana, c(0,.5), c(1,1)))
ContourFunctions::cf(add_zoom(banana, c(.2,.5), c(.8,1)))

TestFunctions documentation built on Sept. 30, 2024, 9:31 a.m.