import java.util.Locale;
public class vector
 {	 
 public double V[];
 //kurucu metodlar
 public vector(double Vi[])
 { V=new double[Vi.length];
   input_vector(Vi); 
 }
 
 public vector(vector Vi)
 { V=new double[Vi.V.length];
   input_vector(Vi.V); 
 }
 
 public vector(int n)
 { V=new double[n];
   for(int i=0;i<n;i++)
	 { V[i]=0.0;}
 }  
 
 public void input_vector(double Vi[])
 {   for(int i=0;i<V.length;i++)
	   {V[i]=Vi[i];}
 }
 
 public static vector add(vector V1,vector V2)
 {
 // 
 int n=V1.V.length;
 vector V3=new vector(n);
  for(int i=0;i<n;i++)
	   {V3.V[i]=V1.V[i]+V2.V[i];}  
 return V3;	   
 }
 
 public static vector add(double[] V1,double[] V2)
 {
 //
 int n=V1.length;
 vector M=new vector(n);
  for(int i=0;i<n;i++)
	   {M.V[i]=V1[i]+V2[i];}  
 return M;	   
 }
 
 public void add(vector V1)
 {
 //	 
 int n=V.length;
  for(int i=0;i<n;i++)
	   {V[i]+=V1.V[i];}
 }  	   
 
 public void add(double [] B)
 {
 //	 
 int n=V.length;
  for(int i=0;i<n;i++)
	   {V[i]+=B[i];}  	   
 }
 
 public static String toString(vector M)
 { int n=M.V.length;
   String s="";
  for(int i=0;i<n;i++)
	   {s+=M.V[i]+" ";}
 s+="\n";
 return s;
 }
 
 public String toString()
 {  Locale tr=new Locale("TR");
	int n=V.length;
    String s1="";
    for(int i=0;i<n;i++)
    { s1+=String.format(tr," %10.5f ",V[i]);}
   s1+="\n";
 return s1;
 } //matriscikti metodunun sonu	 	 
 
 }//matris sınıfının sonu
