get_IndividualToBeMutated | R Documentation |
This function identifies and returns the indices of individuals in the population who are marked for mutation, as indicated by the 'toBeMutated' attribute.
get_IndividualToBeMutated(pop)
pop |
A list representing the population, where each individual has a 'toBeMutated' attribute indicating if they are marked for mutation. |
The function uses 'populationGet_X' to retrieve individuals with the 'toBeMutated' attribute set to 'TRUE'. It returns the indices of these individuals, allowing them to be processed for mutation in subsequent evolutionary steps.
A vector of indices corresponding to individuals in the population who are marked for mutation.
## Not run:
pop <- list(
list(fit_ = 0.9, toBeMutated = TRUE),
list(fit_ = 0.8, toBeMutated = FALSE),
list(fit_ = 0.7, toBeMutated = TRUE)
)
toBeMutated <- get_IndividualToBeMutated(pop)
print(toBeMutated) # Should return indices of individuals marked for mutation
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.