mut: MUTATion low-level function

Description Usage Arguments Value Author(s) Examples

View source: R/mut.R

Description

This function takes the representation of the current population, mutates each element with given probability and returns the resulting population.

Usage

1
mut(OldChrom,Pm=NULL,BaseV=NULL)

Arguments

OldChrom

a matrix containing the chromosomes of the current population. Each row corresponds to an individuals string representation.

Pm

a value indicating mutation probability. Default value of Pm = 0.7/Lind, where Lind is the chromosome length.

BaseV

an optional vector of the same length as the chromosome structure defining the base of the individual elements of the chromosome. Default is set to binary representation.

Value

a matrix containing a mutated version of OldChrom.

Author(s)

The original matlab implementation of mutate was written by Andrew Chipperfield. The R implementation was written by David Zhao.

Examples

1
2
3
Chrom = crtbp(40,10)$Chrom

NewChrom = mut(OldChrom=Chrom)

drizztxx/gatbxr documentation built on Dec. 27, 2021, 2:26 a.m.