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

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

Go to download

A library of composable components enabling simpler Computational Intelligence

The newest version!
/**           __  __
 *    _____ _/ /_/ /_    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 Quartic function.

*

Source: Evolutionary Programming Made Faster (Xin Yao)

* *

* Minimum: *

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

* *

* Characteristics: *

    *
  • Unimodal
  • *
  • Continuous
  • *
*

* * R(-1.28, 1.28)^30 * */ public class Quartic extends ContinuousFunction { private static final long serialVersionUID = 1830591489569513511L; /** * {@inheritDoc} */ @Override public Double f(Vector input) { double result = 0.0; for (int i = 0; i < input.size(); i++) { double square = input.doubleValueOf(i) * input.doubleValueOf(i); double square2 = square * square; result += (i + 1) * square2; } return result; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy