// Path: src/main/java/unsw/curation/api/domain/ExtractNumberSimilarity.java
// public class ExtractNumberSimilarity {
// 
// 	private String vector1;
// 	private String vector2;
// 	private double score;
// 	
// 	public ExtractNumberSimilarity(){}
// 	
// 	public ExtractNumberSimilarity(String vector1,String vector2,double score)
// 	{
// 		this.vector1=vector1;
// 		this.vector2=vector2;
// 		this.score=score;
// 	}
// 	
// 	public void setVector1(String vector1)
// 	{
// 		this.vector1=vector1;
// 	}
// 	public String getVector1()
// 	{
// 		return this.vector1;
// 	}
// 	
// 	public void setVecor2(String vector2)
// 	{
// 		this.vector2=vector2;
// 	}
// 	public String getVector2()
// 	{
// 		return this.vector2;
// 	}
// 	public void setScore(double score)
// 	{
// 		this.score=score;
// 	}
// 	public double getScore()
// 	{
// 		return this.score;
// 	}
// }
// 
// Path: src/main/java/unsw/curation/api/domain/abstraction/INumberEuclideanSimilarity.java
// public interface INumberEuclideanSimilarity {
// 
// 	double Euclidean_Vector_Vector(double [] number1,double [] number2);
// 	List<ExtractNumberSimilarity> Euclidean_Vector_VectorS(String filePath) throws IOException;
// 	List<ExtractNumberSimilarity> Euclidean_Vector_VectorS(double [] vector,String filePath) throws IOException;
// }


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
import unsw.curation.api.domain.ExtractNumberSimilarity;
import unsw.curation.api.domain.abstraction.INumberEuclideanSimilarity;

package unsw.curation.api.extractsimilarity;




public class ExtractNumberEuclideanSimilarity implements INumberEuclideanSimilarity{
	
	@Override
	public double Euclidean_Vector_Vector(double [] vector1,double [] vector2)
    {
        if(vector1.length==vector2.length)
        {
            double sum=0.0;
           for(int i=0;i<vector1.length;i++)
           {
              double tempValue= vector2[i]-vector1[i];
              tempValue=Math.pow(tempValue, 2);
              sum+=tempValue;
           }
           double EclideanDistance=Math.sqrt(sum);
           return EclideanDistance;
        }
        else
        {
            System.err.println("Error in Vectors length...");
            return 0.0;
        }
    }
	@Override

// Path: src/main/java/unsw/curation/api/domain/ExtractNumberSimilarity.java
// public class ExtractNumberSimilarity {
// 
// 	private String vector1;
// 	private String vector2;
// 	private double score;
// 	
// 	public ExtractNumberSimilarity(){}
// 	
// 	public ExtractNumberSimilarity(String vector1,String vector2,double score)
// 	{
// 		this.vector1=vector1;
// 		this.vector2=vector2;
// 		this.score=score;
// 	}
// 	
// 	public void setVector1(String vector1)
// 	{
// 		this.vector1=vector1;
// 	}
// 	public String getVector1()
// 	{
// 		return this.vector1;
// 	}
// 	
// 	public void setVecor2(String vector2)
// 	{
// 		this.vector2=vector2;
// 	}
// 	public String getVector2()
// 	{
// 		return this.vector2;
// 	}
// 	public void setScore(double score)
// 	{
// 		this.score=score;
// 	}
// 	public double getScore()
// 	{
// 		return this.score;
// 	}
// }
// 
// Path: src/main/java/unsw/curation/api/domain/abstraction/INumberEuclideanSimilarity.java
// public interface INumberEuclideanSimilarity {
// 
// 	double Euclidean_Vector_Vector(double [] number1,double [] number2);
// 	List<ExtractNumberSimilarity> Euclidean_Vector_VectorS(String filePath) throws IOException;
// 	List<ExtractNumberSimilarity> Euclidean_Vector_VectorS(double [] vector,String filePath) throws IOException;
// }


// Path: src/main/java/unsw/curation/api/extractsimilarity/ExtractNumberEuclideanSimilarity.java
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
import unsw.curation.api.domain.ExtractNumberSimilarity;
import unsw.curation.api.domain.abstraction.INumberEuclideanSimilarity;

package unsw.curation.api.extractsimilarity;




public class ExtractNumberEuclideanSimilarity implements INumberEuclideanSimilarity{
	
	@Override
	public double Euclidean_Vector_Vector(double [] vector1,double [] vector2)
    {
        if(vector1.length==vector2.length)
        {
            double sum=0.0;
           for(int i=0;i<vector1.length;i++)
           {
              double tempValue= vector2[i]-vector1[i];
              tempValue=Math.pow(tempValue, 2);
              sum+=tempValue;
           }
           double EclideanDistance=Math.sqrt(sum);
           return EclideanDistance;
        }
        else
        {
            System.err.println("Error in Vectors length...");
            return 0.0;
        }
    }
	@Override

	public List<ExtractNumberSimilarity> Euclidean_Vector_VectorS(String filePath) throws IOException
