Skip to contents

Function to evaluate fitness using genomic data

Usage

evaluate_fitness_cpp(genomic_data, population)

Arguments

genomic_data

Numeric matrix of genomic data where rows represent genes/features and columns represent samples.

population

Numeric matrix representing the population of individuals.

Value

Numeric vector of fitness scores for each individual.

Examples

# example of usage
genomic_data <- matrix(rnorm(100), nrow = 10, ncol = 10)
population <- BioGA::initialize_population_cpp(genomic_data,
                population_size = 5)
BioGA::evaluate_fitness_cpp(genomic_data, population)
#> [1] 139.2861 139.2861 139.2861 139.2861 139.2861