| dict_recombinators_null {miesmuschel} | R Documentation |
Null-Recombinator
Description
Null-recombinator that does not perform any operation on its input. Useful in particular with operator-wrappers such as RecombinatorMaybe or
RecombinatorCombination.
n_indivs_in and n_indivs_out can be set during construction, where n_indivs_out must be less or equal n_indivs_in. If it is strictly less,
then the operation returns only the first n_indivs_out individuals out of each n_indivs_in sized group.
Configuration Parameters
This operator has no configuration parameters.
Supported Operand Types
Supported Domain classes are: p_lgl ('ParamLgl'), p_int ('ParamInt'), p_dbl ('ParamDbl'), p_fct ('ParamFct')
Dictionary
This Recombinator can be created with the short access form rec()
(recs() to get a list), or through the the dictionary
dict_recombinators in the following way:
# preferred:
rec("null")
recs("null") # takes vector IDs, returns list of Recombinators
# long form:
dict_recombinators$get("null")
Super classes
miesmuschel::MiesOperator -> miesmuschel::Recombinator -> RecombinatorNull
Methods
Public methods
Inherited methods
Method new()
Initialize base class components of the Recombinator.
Usage
RecombinatorNull$new(n_indivs_in = 1, n_indivs_out = n_indivs_in)
Arguments
n_indivs_in(
integer(1))
Number of individuals to consider at the same time. When operating, the number of input individuals must be divisible by this number. Setting this number to a number unequal 1 is mostly useful when incorporating this operator in wrappers such asRecombinatorMaybeorRecombinatorCombination. Default 1.
The$n_indivs_infield will reflect this value.n_indivs_out(
integer(1))
Number of individuals that result for eachn_indivs_inlines of input. Must be at mostn_indivs_in. If this is less thann_indivs_in, then only the firstn_indivs_outindividuals out of eachn_indivs_insized group are returned by an operation. Setting this number to a number unequal 1 is mostly useful when incorporating this operator in wrappers such asRecombinatorMaybeorRecombinatorCombination. Default equal ton_indivs_in.
The$n_indivs_outfield will reflect this value.
Method clone()
The objects of this class are cloneable with this method.
Usage
RecombinatorNull$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
See Also
Other recombinators:
OperatorCombination,
Recombinator,
RecombinatorPair,
dict_recombinators_cmpmaybe,
dict_recombinators_convex,
dict_recombinators_cvxpair,
dict_recombinators_maybe,
dict_recombinators_proxy,
dict_recombinators_sbx,
dict_recombinators_sequential,
dict_recombinators_swap,
dict_recombinators_xonary,
dict_recombinators_xounif
Examples
rn = rec("null")
p = ps(x = p_int(-5, 5), y = p_dbl(-5, 5), z = p_lgl())
data = data.frame(x = 1:4, y = 0:3, z = rep(TRUE, 4))
rn$prime(p)
rn$operate(data)
rn_half = rec("null", n_indivs_in = 2, n_indivs_out = 1)
rn_half$prime(p)
rn_half$operate(data)