all files / lib/nodeo/ Ackley.js

100% Statements 6/6
100% Branches 0/0
100% Functions 2/2
100% Lines 6/6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28                                           
// Ackley function with Fitness function signature
 
//  * @license GPL v3
//  * @package nodeo
//  * @author J. J. Merelo <jjmerelo@gmail.com>
 
// To avoid uncomprehensible radix complaint at charAt
/*jshint -W065 */
/*jshint smarttabs:true */
 
var functions = require('./functions');
 
// making a function a class, MMDP style
function Ackley() {
    // Methods
    this.apply = apply;
}
 
// Applies trap function to chromosome using defaults
function apply( chromosome ){
//    console.log( "apply " + chromosome);
//    console.log( this);
    return functions.ackley(chromosome);
    
}
 
exports.Ackley = Ackley;