package multinomad.tools;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;

import cec2013.CEC2013;
import cec2013.Func;
import multinomad.config.Configuration;
import multinomad.individuals.Population;
import multinomad.individuals.DoubleIndividual;

public abstract class Function {
	protected int findex = -1;
	protected List<ClosedInterval.Double > bounds;
	protected int dimension;
	protected int noOptima;
	
	public Function() {
		// TODO Auto-generated constructor stub
	}
	
	public Function(int index) {
		findex = index;
	}
	

	public List<ClosedInterval.Double > getBounds() {
		return bounds;
	}
	
	public int getDimension(){
		return dimension;
	}
	
	public int getNoOptima() {
		return noOptima;
	}
	
	
	public abstract double evaluate(double[] x) ;
	
	public abstract double[] evaluateAPopulation(Population pop);	
	
	public abstract Seeds how_many_goptima(Population p, double accuracy);

}
