poet/test/RInsidePOET_funcs.R
Max Luebke c5a991c4c9 feat: implement SEXP export of Field structure
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
2023-08-17 10:51:54 +02:00

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)
}