create_linearmap_map: Create a generic linear mapping

View source: R/map_linearmap.R

create_linearmap_mapR Documentation

Create a generic linear mapping

Description

Create a linear mapping between the variables at the source indices to the variables at the target indices, which is of the form \mjsdeqn \vecy = \vecy_\textrmref + S (\vecp - \vecp_\textrmref)

Usage

create_linearmap_map()

Details

The following fields are required in the parameter list to initialize the mapping:

mapname Name of the mapping
maptype Must be "linearmap_map"
src_idx Vector of source indices
tar_idx Vector of target indices.
yref The vector \mjseqn\vecy_\textrmref given in the formula.
pref The vector \mjseqn\vecp_\textrmref given in the formula.
S The matrix S given in the formula.
\loadmathjax

Value

Returns a list of functions to operate with the mapping, see create_maptype_map.

See Also

Other mappings: create_compound_map(), create_convolution_with_xtrafo_map(), create_derivative2nd_map(), create_derivative_map(), create_linearinterpol_map(), create_linearinterpol_with_xtrafo_map(), create_maptype_map(), create_map(), create_nonlinear_map(), create_normerr_map(), create_product_map()

Examples

params <- list(
  mapname = "mylinearmap",
  maptype = "linearmap_map",
  src_idx = 1:2,
  tar_idx = 3:5,
  yref = rep(10, 3),
  pref = c(2, 4),
  S = matrix(c(1, 2, 3, 4, 5, 6), nrow=3, ncol=2)
)
mymap <- create_linearmap_map()
mymap$setup(params)
x <- c(1,-2,0,0,0)
mymap$propagate(x)
mymap$jacobian(x)


gschnabel/nucdataBaynet documentation built on Feb. 3, 2023, 4:13 a.m.