import javax.swing.*;
class Gbtest
{
public static void main(String arg[])
{
	     String iLK[]={ "co","o2","co2" };  	             
    	 int nn=iLK.length;
	     double n0[]=new double[nn];
		 n0[0]=1.0000E+00;                    
		 n0[1]=1.0000E+00; 
		 n0[2]=0.0;
		 double Te[]=new double[nn];	
		 Te[0]=3000;
		 Te[1]=3000;
		 Te[2]=3000;
		 	    
		 double T1=3000.0;
		 double P1=1.01325;
         Gb gg=new Gb(iLK,n0,Te,P1);
         double x[]=new double[nn+2];
         //for(int i=0;i<gg.NS;i++)
         //{x[i]=n0[i];}
         x[0]=0.3398;
         x[1]=0.6699;
         x[2]=0.66;
         x[3]=0.1;
         x[4]=0.1;
         double dx[]=new double[x.length];
         for(int i=0;i<x.length;i++) dx[i]=0.1;
         gg.Tgir(T1);
         System.out.println(gg.func(x));
         /*
         fxb f2 =new fxb(gg);
         double [] r1= FSCO5I.newtond(f2,x);
         String s2="Newton-Raphson kök bulma : ";
         String s=" kök değerleri  : \n"+Matrix.toStringT(r1);
         JOptionPane.showMessageDialog(null,s,s2,JOptionPane.PLAIN_MESSAGE);
         System.exit(0);
         */         
         double [] r1= OPO7B.nelder(gg,x,dx);
         String s=" çözüm seti  : \n";
         for(int i=0;i<x.length;i++) s+=r1[i]+"\n"; 
         System.out.println("s="+s);
}
}