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

com.github.chen0040.gp.services.Tutorials Maven / Gradle / Ivy

There is a newer version: 1.0.14
Show newest version
package com.github.chen0040.gp.services;


import com.github.chen0040.gp.commons.BasicObservation;
import com.github.chen0040.gp.commons.Observation;

import java.util.ArrayList;
import java.util.List;
import java.util.function.BiFunction;


/**
 * Created by xschen on 20/6/2017.
 */
public class Tutorials {
   public static List mexican_hat(){
      List result = new ArrayList<>();

      BiFunction mexican_hat_func = (x1, x2) -> (1 - x1 * x1 / 4 - x2 * x2 / 4) * Math.exp(- x1 * x2 / 8 - x2 * x2 / 8);

      double lower_bound=-4;
      double upper_bound=4;
      int period=16;

      double interval=(upper_bound - lower_bound) / period;

      for(int i=0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy