bm_shift: Mapper for element-wise shifting

View source: R/mappers.R

bm_shiftR Documentation

Mapper for element-wise shifting

Description

Create a standalone shift mapper that can be used as part of a bm_pipe. If mapper is non-null, the bm_shift() constructor returns bm_pipe(list(mapper = mapper, shift = bm_shift()))

Usage

bm_shift(mapper = NULL)

bru_mapper_shift(...)

## S3 method for class 'bm_shift'
ibm_n(mapper, ..., state = NULL, n_state = NULL)

## S3 method for class 'bm_shift'
ibm_n_output(mapper, input, state = NULL, ..., n_state = NULL)

## S3 method for class 'bm_shift'
ibm_values(mapper, ..., state = NULL, n_state = NULL)

## S3 method for class 'bm_shift'
ibm_jacobian(mapper, input, state = NULL, ..., sub_lin = NULL)

## S3 method for class 'bm_shift'
ibm_eval(mapper, input, state = NULL, ..., sub_lin = NULL)

Arguments

mapper

A mapper S3 object, inheriting from bru_mapper.

...

Arguments passed on to other methods

state

A vector of latent state values for the mapping, of length ibm_n(mapper, inla_f = FALSE)

n_state

integer giving the length of the state vector for mappers that have state dependent output size.

input

Data input for the mapper.

sub_lin

Internal, optional pre-computed sub-mapper information

Methods (by generic)

  • ibm_jacobian(bm_shift): input NULL values are interpreted as no shift.

See Also

bru_mapper, bru_mapper_generics

Other mappers: bm_aggregate(), bm_collect(), bm_const(), bm_factor(), bm_fmesher(), bm_harmonics(), bm_index(), bm_linear(), bm_logsumexp(), bm_marginal(), bm_matrix(), bm_mesh_B(), bm_multi(), bm_pipe(), bm_repeat(), bm_scale(), bm_sum(), bm_taylor(), bru_get_mapper(), bru_mapper(), bru_mapper.fm_mesh_1d(), bru_mapper.fm_mesh_2d(), bru_mapper_generics

Examples

m <- bm_shift()
ibm_eval2(m, c(1, 2, 1, 2), 1:4)


inlabru-org/inlabru documentation built on July 17, 2025, 2:11 a.m.