All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sourceforge.cilib.functions.continuous.unconstrained.Zakharov Maven / Gradle / Ivy

/**           __  __
 *    _____ _/ /_/ /_    Computational Intelligence Library (CIlib)
 *   / ___/ / / / __ \   (c) CIRG @ UP
 *  / /__/ / / / /_/ /   http://cilib.net
 *  \___/_/_/_/_.___/
 */
package net.sourceforge.cilib.functions.continuous.unconstrained;

import net.sourceforge.cilib.functions.ContinuousFunction;
import net.sourceforge.cilib.type.types.container.Vector;

/**
 * 

The Zakharov Function.

* *

Reference: M. Laguna, R. Martı´ Experimental testing of advanced scatter search designs for global optimization of multimodal functions, * Journal of Global Optimization, 2005

* *

Minimum: *

    *
  • ƒ(x*) = 0
  • *
  • x* = (0, 0, ...., 0)
  • *
  • for xi in [-5, 10]
  • *
*

* *

Characteristics: *

    *
*

* * R(-5, 10)^30 * */ public class Zakharov extends ContinuousFunction { private static final long serialVersionUID = -635648546100966058L; /** * {@inheritDoc} */ @Override public Double f(Vector input) { double sum1 = 0; double sum2 = 0; for(int i = 0; i < input.size(); ++i){ sum1 += input.doubleValueOf(i) * input.doubleValueOf(i); sum2 += 0.5 * (i + 1) * input.doubleValueOf(i); } return sum1 + (sum2 * sum2) + (sum2 * sum2 * sum2 * sum2); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy