Skip to contents

Create a pipe mapper, where mappers is a list of mappers, and the evaluated output of each mapper is handed as the state to the next mapper. The input format for the ibm_eval and ibm_jacobian methods is a list of inputs, one for each mapper.

Usage

bm_pipe(mappers)

bru_mapper_pipe(...)

Arguments

mappers

A list of bru_mapper objects

...

Arguments passed on to bm_pipe()

Examples

m <- bm_pipe(list(
  scale = bm_scale(),
  shift = bm_shift()
))
ibm_eval2(m, input = list(scale = 2, shift = 1:4), state = 1:4)
#> $offset
#> [1]  3  6  9 12
#> 
#> $jacobian
#> 4 x 4 diagonal matrix of class "ddiMatrix"
#>      [,1] [,2] [,3] [,4]
#> [1,]    2    .    .    .
#> [2,]    .    2    .    .
#> [3,]    .    .    2    .
#> [4,]    .    .    .    2
#>