Documentation of compdiv2


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


Function Synopsis

[OP1, OP2, OP3, OP4, OP5] = compdiv(WhatTask, P1, P2, P3, varargin);

Help text

 COMPute DIVerse things of GEA Toolbox

 This function computes diverse special results for the GEA Toolbox
 during computation used at different points of the toolbox.

 Syntax:  [OP1, OP2, OP3, OP4, OP5] = compdiv(WhatTask, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)

 Input parameters:
    WhatTask      - String containing the name of the needed computation
    P1 - P10  - Parameters needed for the specific computations

 Output parameter:
    OP1 - OP5 - Output parameters, specific for every computation

 Possible functions:
    WhatTask == 'fitness_distance_correlation' or 'fdc'
       Compute fitness distance correlation
       P1     - Vector containing Fitnesses (objective values for single
                objective functions), corresponds with ChromAll (P2)
       P2     - Matrix containing ChromAll, alle individuals for
                distance computation, every row in ChromAll corresponds
                the same value in Fitnesses(P1)
       P3     - Vector containing best individual or global solution
       OP1    - Scalar containing fitness distance correlation coefficient
       OP2    - Vector containing Fitnesses (same as P1)
       OP3    - Vector containing Distances computed from P2 and P3

    WhatTask == 'distance_chrom'
       Compute distance between individuals (used in resplot)
       P1     - Matrix containing individuals, the distance between all 
                individuals is computed
       OP1    - Vector containing all distances, similar to upper half
                of distance matrix

    WhatTask == 'distance_chrom_mat'
       Compute distance between individuals (used in resplot)
       P1     - Matrix containing individuals, the distance between all 
                individuals is computed
       OP1    - Matrix containing all distances

    WhatTask == 'possubpop'
       Sort/order subpopulations according objective values, return
          position of every subpopulation
       P1     - Matrix/vector containing (objective) values
       P2     - Vector containing number of individuals per subpopulation
       P3     - Vector containing previous filtered order of subpopulations
       OP1    - (row) Vector containing position of every subpopulation
                   subpopulation with best/minimal objective values gets 1,
                   worst subpopulation gets length(SUBPOP)
       OP2    - (row) Vector containing index to best values in every subpopulation,
                   thus, P1(OP2) = values of best individuals of
                   every subpopulation
       OP3    - (row) Vector containing filtered order of subpopulations

    WhatTask == 'checksubpop'
       Check variable SUBPOP against number of objective
          values/individuals and set correct values
       P1     - Vector/scalar containing number of individuals per subpopulation
       P2     - Scalar containing number of (objective) values
       OP1    - Vector containing checked number of individuals per subpopulation


    WhatTask == 'cutfillstring'
       Check length of CFString against NewLength, if longer - cut string, 
          if shorter, fill with white space
       P1     - String CFString 
       P2     - Scalar NewLength containing number of new length of string
       OP1    - String containing cutted or filled string

    WhatTask == 'phi_convergence'
       Calculate the Kappa vconvergence measure
       P1     - Matrix with individuals of population (Chrom)
       P2     - Matrix with boundaries of variables (VLUB)
       OP1    - Scalar with Phi value

    WhatTask == 'kappa_convergence'
       Calculate the Kappa vconvergence measure
       P1     - Matrix with individuals of population (Chrom)
       P2     - Matrix with boundaries of variables (VLUB)
       OP1    - Scalar with Kappa value

    WhatTask == 'diff_num'
       Check for diff of numbers in array and return all numbers, when
       difference between numbers or just first, when all numbers are identical
       Used for output of multiple numbers (just one number printed, when all same)
       P1     - Vektor or arrayof numbers
       OP1    - One number or all

    WhatTask == 'diff_str'
       Check for diff of strings in char array and return all strings, 
       when difference between strings or first, when all strings are identical
       Used for output of multiple strings (just one stringprinted, when all same)
       P1     - Char array or cell array of strings
       OP1    - One string or all in the same format as P1

    WhatTask == 'fieldnames_full'
       Create cell array with all full fieldnames of given structure
       Used for checking of existence of a field in a structure
       P1     - Structure
       OP1    - cell array with strings containing the full 
                fieldnames of the structure P1

 See also: geamain, resplot

Cross-Reference Information

This function calls This function is called by

GEATbx: Main page  Tutorial  Algorithms  M-functions  Parameter/Options  Example functions 

This document is part of version 3.3 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-2000 Hartmut Pohlheim, All Rights Reserved, (support@geatbx.com).