mirror of
https://git.gfz-potsdam.de/naaice/poet.git
synced 2025-12-15 20:38:23 +01:00
feat: implement NamedVector based on Rcpp::NumericVector feat: remove hard coded checks and substitute by R hook functions, defined in the input script refactor: modify API of DHT_Wrapper/InterpolationModule to expect a work package structure, where input/output values are stored as 2D vectors test: add tests for NamedVector test: extend tests for Field
23 lines
384 B
R
23 lines
384 B
R
simple_named_vec <- function(input) {
|
|
input["Ca"] <- 0
|
|
|
|
return(input)
|
|
}
|
|
|
|
extended_named_vec <- function(input, additional) {
|
|
return(input["H"] + additional["H"])
|
|
}
|
|
|
|
bool_named_vec <- function(input) {
|
|
return(input["H"] == 0)
|
|
}
|
|
|
|
simple_field <- function(field) {
|
|
field$Na <- 0
|
|
return(field)
|
|
}
|
|
|
|
extended_field <- function(field, additional) {
|
|
return(field + additional)
|
|
}
|