Fits a function that returns 0 for any given input value
Details
A function to pass on to the Endosymbiont model which can be used to nullify any process. The default output is 0, and therefore can be used to stand-in for any process that is modelled as a function accepting an input vector. However, the output can be changed to a different value (e.g., 1) if required, as long as the null process is supposed to return a constant value.
Examples
my_func <- EndoSim:::fit_null(0)
plot(seq(0, 50, by = 0.1), my_func(seq(0, 50, by = 0.1)), type = "l")
my_func <- EndoSim:::fit_null(1)
plot(seq(0, 50, by = 0.1), my_func(seq(0, 50, by = 0.1)), type = "l")
my_func <- EndoSim:::fit_null(0.5)
plot(seq(0, 50, by = 0.1), my_func(seq(0, 50, by = 0.1)), type = "l")