Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.1 - Français

Change language to:
English - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Aide de Scilab >> Algorithmes génétiques > Utilities > coding_ga_binary

coding_ga_binary

A function which performs conversion between binary and continuous representation

Syntax

pop_out = coding_ga_binary(pop_in,direction,param)

Arguments

pop_in

a list which contains all the individuals in the current population.

direction

'code' or 'decode'. If direction == 'code' then we perform a continuous to binary encoding. Else, we convert from binary to continuous.

param

a parameter list.

  • 'binary_length': the number of bits by variables. If binary_length = 8 and the variable X is of dimension 2 then the binary code will be 16 bits length.

  • 'minboun': a vector of minimum bounds for the variable X.

  • 'maxbound': a vector of maximum bounds for the variable X.

pop_out

the population coded to binary or decoded to continuous values.

Description

  • This function allows to code or decode a population of individuals from (resp. to) continuous variables to (resp. from) binary.

Examples

pop_in = list();
pop_in(1) = 2;

pop_out = coding_ga_binary(pop_in,'code',[])
// Will return 11111111

pop_in_2 = coding_ga_binary(pop_out,'decode',[])
// Should be 2

See also

Report an issue
<< Utilities Utilities coding_ga_identity >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Feb 12 19:15:31 CET 2018