<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using Fireworks.Model;
using MathNet.Numerics;

namespace Fireworks.Distances
{
	public class EuclideanDistance : IDistance
	{
		private readonly IEnumerable<Dimension> dimensions;

		public EuclideanDistance(IEnumerable<Dimension> dimensions)
		{
			if (dimensions == null)
			{
				throw new ArgumentNullException("dimensions");
			}

			this.dimensions = dimensions;
		}

		public double Calculate(Double[] first, Double[] second)
		{
			return Distance.Euclidean(first, second);
		}

		public double Calculate(Firework first, Firework second)
		{
			// TODO: Move this method to base abstract class
			double[] firstCoords = new double[dimensions.Count()];
			double[] secondCoords = new double[dimensions.Count()];
<commit_msg>Minor addition to EuclideanDistance.Calculate method<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using Fireworks.Model;
using MathNet.Numerics;

namespace Fireworks.Distances
{
	public class EuclideanDistance : IDistance
	{
		private readonly IEnumerable<Dimension> dimensions;

		public EuclideanDistance(IEnumerable<Dimension> dimensions)
		{
			if (dimensions == null)
			{
				throw new ArgumentNullException("dimensions");
			}

			this.dimensions = dimensions;
		}

		public Double Calculate(Double[] first, Double[] second)
		{
			return Distance.Euclidean(first, second);
		}

		public Double Calculate(Firework first, Firework second)
		{
			if (first == second)
			{
				return 0.0;
			}

			// TODO: Move this method to base abstract class
			double[] firstCoords = new double[dimensions.Count()];
			double[] secondCoords = new double[dimensions.Count()];

{'fraction_non_alphanumeric': 0.09825581395348837, 'fraction_numerical': 0.0011627906976744186, 'mean_word_length': 4.498402555910543, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2002348', 'n_tokens_mistral': 583, 'n_tokens_neox': 483, 'n_words': 133}