Documentation of bindecod

Global Index (all files) (short | long) | Local contents | Local Index (files in subdir) (short | long)

Function Synopsis

Phen = bindecod(Chrom, FieldD, Coding)

Help text

 BINary DECODing to binary, integer or real numbers

 This function decodes binary chromosomes into vectors of binary,
 integer or real numbers. The chromosomes are seen as the concate-
 nation of binary strings and decoded into binary, integer or real
 numbers in a specified interval using either standard binary or 
 Gray decoding.
 Binary variables can be mixed with integer and real variables. A
 binary variable is an integer/real number decoded with one binary
 value and lower bound 0 and upper bound 1, both bounds included.
 For real numbers the variables are scaled between lower and upper
 bound using either arithmetic or logarithmic scaling. The inclusion
 of lower and upper bound can be defined as well.
 The real and integer variables are the discrete values between lower
 and upper bound. The number of intervals is defined by 2^the number
 of binary values. Thus, the bounds of the variables are ensured.
 (A second method can be switched on inside the function for integer
  variables. The variables can be decoded to direct integer numbers
  and the lower bound is added to this direct decoded numbers. A 
  check for upper bound is performed afterwards. Thus, every binary 
  string decodes to one and only one integer number and vice versa.)
 
 See examples for more information!

 Syntax:  Phen = bindecod(Chrom, FieldD, Coding)

 Input parameters:
    Chrom     - Matrix containing the chromosomes to decode. Each row
                corresponds to one individual's concatenated binary
                string representation. Leftmost bits are most significant
                and rightmost are least significant.
    FieldD   -  Matrix describing the length and how to decode
                each substring in the chromosome. It has the
                following structure:
                [ NumCols;
                  LowBound;
                  UppBound;
                  BinGray;
                  Scaling;
                  LowIncld;
                  UppIncld ]

                NumCols  - Vector containing number of columns in Chrom
                           decoding to one variable. sum(NumCols)
                           should equal the individual length.
                LowBound - Vector containing lower bound for each variable.
                UppBound - Vector containing upper bound for each variable. 
                BinGray  - Vector indicating coding of binary values.
                           0: standard binary coding
                           1: gray coding
                Scaling  - Vector indicating scaling for decoding of
                           variables.
                           0: arithmetic scaling
                           1: logarithmic scaling
                           always arithmetic scaling for integer variables
                LowIncld - Vector indicating inclusion of lower bound into
                           the representation range
                           0: exclude lower bound
                           1: include lower bound
                           always included for integer variables
                UppIncld - Vector indicating inclusion of upper bound into
                           the representation range
                           0: exclude upper bound
                           1: include upper bound
                           always included for integer variables

    Coding   - (optional) Scalar containing decoding method
               0: do not decode, real representation - real variables
               1: decode binary values to real numbers
               2: do not decode, integer representation - integer variables 
               3: decode binary values to integer numbers
               4: do not decode, binary representation - binary variables 
               5: do not decode, permutation representation - any variables 
               if omitted or NaN, 0 (do not decode) is assumed
               Coding is identical to GEAOpt.VariableFormat in geamain2

 Output parameter:
    Phen     - Matrix containing the phenotypes of the individuals
               of Chrom.

 See also: bin2int, bin2real, initbp, initip, initrp

Cross-Reference Information

This function is called by
GEATbx: Main page  Tutorial  Algorithms  M-functions  Parameter/Options  Example functions  www.geatbx.com 

This document is part of version 3.8 of the GEATbx: Genetic and Evolutionary Algorithm Toolbox for use with Matlab - www.geatbx.com.
The Genetic and Evolutionary Algorithm Toolbox is not public domain.
© 1994-2006 Hartmut Pohlheim, All Rights Reserved, (support@geatbx.com).