xegaGeInitGene: Initialize a binary gene

View source: R/xegaGeInitGene.R

xegaGeInitGeneR Documentation

Initialize a binary gene

Description

xegaGeInitGene() generates a random binary gene with a given length.

Usage

xegaGeInitGene(lF)

Arguments

lF

the local configuration of the genetic algorithm

Details

In the binary representation of package xegaGeGene, a gene is a list with

  1. $evaluated Boolean: TRUE if the fitness is known.

  2. $fit The fitness of the genotype of $gene1

  3. $gene1 a bit string (the genetopye).

Value

A binary gene (a named list):

  • $evaluated: FALSE. See package xegaSelectGene

  • $evalFail: FALSE. Set by the error handler(s) in package xegaSelectGene in the case of failure.

  • $fit: Fitness vector.

  • $gene1: Binary gene.

Examples

xegaGeInitGene(lFxegaGeGene)


xegaGeGene documentation built on June 8, 2025, 1:09 p.m.