import java.io.*;
import javax.swing.*;
import javax.tools.*;
import java.util.*;
import java.lang.Integer;
import java.awt.*;
import java.awt.event.*;
import java.awt.font.*;
import java.awt.geom.*;
import java.awt.image.*;
import javax.swing.*;
import java.util.Locale;
import java.text.*;
import java.util.*;
import javax.swing.table.*;
//Function evaluation
class ce2T
{ 	 public double r[];
	
	 public ce2T(double x[]) 
	 {  f2D ff=new f2D();
        int n=x.length;;
        double y[]=new double[n];
        for(int i=0;i<n;i++)
        {y[i]=ff.func(x[i]);}
    r=y;	   
    }
   
   public ce2T(double xmin,double dx,double xmax)
   { double x[]=setX(xmin,dx,xmax);
	f2D ff=new f2D();
        int n=x.length;;
        double y[]=new double[n];
        for(int i=0;i<n;i++)
        {y[i]=ff.func(x[i]);}
    r=y;	   
    }
   
   
   public static double[] setX(double xmin,double dx,double xmax)
   {
    int n=(int)((xmax-xmin)/dx+0.00000000000001);
    double x[]=new double[n+1];
    for(int i=0;i<=n;i++)
    {x[i]=xmin+dx*i;}
    return x;	   
   }
    
   public static double[] setX(int xmin,int xmax)
   {
    int n=xmax-xmin;
    double x[]=new double[n+1];
    for(int i=0;i<=n;i++)
    {x[i]=xmin+i;}
    return x;	   
   }

}
