binary_chromosome_to_numeric: Convert binary chromosome to numeric value

Description Usage Arguments Value Examples

View source: R/binary_chromosome.R

Description

Convert binary chromosome to numeric value.

Usage

1
binary_chromosome_to_numeric(chromosome, min = 0, max = 1)

Arguments

chromosome

Binary chromosome

min

Minimal value which chromosome can represent

max

Maximal value which chromosome can represent

Value

Numeric value within the range specified by min, max

Examples

1
2
3
4
# Generate a random 24 bit chromosome
chromosome <- sample(c(TRUE, FALSE), 24, TRUE)
Convert the chromosome to a numeric value within the range [-10, 10]
binary_chromosome_to_numeric(chromosome, -10, 10)

jiripetrlik/r-multiobjective-evolutionary-algorithms documentation built on April 27, 2020, 12:12 p.m.