Home > Mateda2.0 > functions > decomposable > evalfuncdec3.m

# evalfuncdec3

## PURPOSE

[val] = evalfuncdec3(vector)

## SYNOPSIS

function[val] = evalfuncdec3(vector)

## DESCRIPTION

     [val] = evalfuncdec3(vector)
     Deceptive3: Non-overlapping deceptive3 function introduced by Goldberg
                 f(x) = f_d(x_1,x_2,x_3) + f_d(x_4,x_5,x_6) + ...+  f_d(x_{3m-2},x_{3m-1},x_{3m})
     INPUTS
     vector: set of a multiple of 3 sized set of variables
     OUTPUTS
     val: Evaluation of the deceptive function

     Last version 11/10/2008. Roberto Santana (rsantana@si.ehu.es)

## CROSS-REFERENCE INFORMATION

This function calls:

- Deceptive3 [val]=Deceptive3(vector)

This function is called by:

## SOURCE CODE

    0001 function[val] = evalfuncdec3(vector)
    0002 % [val] = evalfuncdec3(vector)
    0003 % Deceptive3: Non-overlapping deceptive3 function introduced by Goldberg
    0004 %             f(x) = f_d(x_1,x_2,x_3) + f_d(x_4,x_5,x_6) + ...+  f_d(x_{3m-2},x_{3m-1},x_{3m})
    0005 % INPUTS
    0006 % vector: set of a multiple of 3 sized set of variables
    0007 % OUTPUTS
    0008 % val: Evaluation of the deceptive function
    0009 %
    0010 % Last version 11/10/2008. Roberto Santana (rsantana@si.ehu.es)
    0011
    0012 NumbVar = size(vector,2);
    0013
    0014 val = 0;
    0015
    0016 for i=1:3:NumbVar
    0017    val = val+Deceptive3(vector(i:i+2));
    0018 end
    0019