scale_numeric_chromosome: Scale values of numeric chromosome to the specified range

Description Usage Arguments Value Examples

View source: R/numeric_chromosome.R

Description

Scale values of numeric chromosome to the specified range. Numeric chromosome is a numeric vector with values within [0, 1].

Usage

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

Arguments

chromosome

Numeric chromosome

min

Minimal value(s) which item in chromosome can represent

max

Maximal value(s) which item in chromosome can represent

Value

Numeric vector with converted chromosme values

Examples

1
2
3
4
# Generate numeric chromosome with 10 items
chromosome <- runif(10)
# Scale values of numeric chromosome to [-5, 5]
scale_numeric_chromosome(chromosome, -5, 5)

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