minmax {LaMa} | R Documentation |
AD-compatible minimum and maximum functions
Description
These functions compute the parallel minimum/ maximum of two vector-valued inputs and are compatible with automatic differentiation using RTMB
.
Usage
min2(x, y)
max2(x, y)
Arguments
x |
first vector |
y |
second vector |
Value
min2
returns the parallel minimum and max2
the parallel maximum of x
and y
Examples
x <- c(1, 4, 8, 2)
y <- c(2, 5, 3, 7)
min2(x, y)
max2(x, y)
[Package LaMa version 2.0.5 Index]