Learn R Programming

CEGO (version 2.4.3)

solutionFunctionGeneratorString: String Generator Function

Description

Returns a function that generates random strings of length N, with given letters. Can be used to generate individual solutions for permutation problems, e.g., Travelling Salesperson Problem

Usage

solutionFunctionGeneratorString(N, lts = c("A", "C", "G", "T"))

Value

returns a function, without any arguments

Arguments

N

length of the permutations returned

lts

letters allowed in the string

Examples

Run this code
fun <- solutionFunctionGeneratorString(10,c("A","C","G","T"))
fun()
fun()
fun()

Run the code above in your browser using DataLab