Null-filtor that does not perform filtering. Its needed_input()
is always the output_size
, and operate()
selects the first n_filter
values from its input.
Useful in particular with operator-wrappers such as FiltorProxy
, and to make filtering optional.
This operator has no configuration parameters.
This Filtor
can be created with the short access form ftr()
(ftrs()
to get a list), or through the the dictionary
dict_filtors
in the following way:
Other filtors:
Filtor
,
FiltorSurrogate
,
dict_filtors_maybe
,
dict_filtors_proxy
,
dict_filtors_surprog
,
dict_filtors_surtour
miesmuschel::MiesOperator
-> miesmuschel::Filtor
-> FiltorNull
fn = ftr("null")
p = ps(x = p_dbl(-5, 5))
known_data = data.frame(x = 1:5)
fitnesses = 1:5
new_data = data.frame(x = c(2.5, 4.5))
fn$prime(p)
fn$needed_input(1)
#> [1] 1
fn$operate(new_data, known_data, fitnesses, 1)
#> [1] 1