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

net.sourceforge.cilib.functions.continuous.unconstrained.AbsoluteValue 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 Absolute Value Function.

* *

Minimum: *

    *
  • f(x*) = 0
  • *
  • x* = (0, 0, ...., 0)
  • *
  • for x_i in [-100,100]
  • *
*

* *

Characteristics: *

    *
  • Unimodal
  • *
  • Seperable
  • *
  • Regular
  • *
*

* * R(-100, 100)^30 * */ public class AbsoluteValue extends ContinuousFunction { private static final long serialVersionUID = 1662988096338786773L; /** * {@inheritDoc} */ @Override public Double f(Vector input) { double tmp = 0.0; for (int i = 0; i < input.size(); ++i) { tmp += Math.abs(input.doubleValueOf(i)); } return tmp; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy