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

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

Go to download

A library of composable components enabling simpler Computational Intelligence

There is a newer version: 0.8
Show 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;

/**
 * An implementation of the Elliptic function.
 * The number 10^6 is called condition number, which is used to transform
 * a Sphere function to an Elliptic function.
 *
 * Reference:
 * 
 * {@literal @}article{tang2010benchmark,
 * title={{Benchmark Functions for the CEC2010 Special Session and Competition on Large-Scale Global Optimization}},
 * author={Tang, K. and Li, X. and Suganthan, PN and Yang, Z. and Weise, T.},
 * year={2010}}
 * 
* */ public class Elliptic implements ContinuousFunction { /* * The condition number 10^6 is used to transform a sphere * to an elliptic function */ private static final double CONDITION_NUMBER = 1000000; @Override public Double apply(Vector input) { double sum = 0; for (int i = 0; i < input.size(); i++) { sum += Math.pow(CONDITION_NUMBER, i / (input.size() - 1)) * input.doubleValueOf(i) * input.doubleValueOf(i); } return sum; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy