-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmutation.Rd
More file actions
32 lines (29 loc) · 825 Bytes
/
mutation.Rd
File metadata and controls
32 lines (29 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/palette-fns.R
\name{mutation}
\alias{mutation}
\title{Mutation}
\usage{
mutation(parents, mutation_rate = 0.05, variation_parameter = 0.01)
}
\arguments{
\item{parents}{List of parents to apply the mutation step.}
\item{mutation_rate}{Mutation rate. Numeric value between 0-1 representing the probability of mutation of a single colour.}
\item{variation_parameter}{Numeric value between 0-1. Random variation applied to every gene.}
}
\value{
}
\description{
Applies the mutation step in the evolutionary algorithm
}
\examples{
\dontrun{
pal <- random_palette(5, 2)
original <- map(pal, ~show_palette(.x, "original"))
mutated <- pal \%>\%
mutation() \%>\%
map(~show_palette(.x, "mutated"))
c(original, mutated) \%>\%
wrap_plots
}
}