<commit_before>package cs499blue.algorithms;

import cs499blue.models.Edge;
import cs499blue.models.Vertex;

/**
 * author: vwilson
 * date: 4/1/14
 */

public class Distance {

    //returns the distance from a to b
    public static Double distanceFrom(Vertex a, Vertex b) {
        throw new UnsupportedOperationException("Not Yet Implemented");
    }

    //returns the length of e
    public static Double lengthOf(Edge e) {
        throw new UnsupportedOperationException("Not Yet Implemented");
    }
}<commit_msg>Update Distance.java<commit_after>package cs499blue.algorithms;

import cs499blue.models.Edge;
import cs499blue.models.Vertex;

/**
 * author: vwilson
 * date: 4/1/14
 */

public class Distance {

    //returns the distance from a to b
    public static Double distanceFrom(Vertex a, Vertex b) {
        
        return Math.sqrt(Math.pow((a.getX()-b.getX()),2) + Math.pow((a.getY() - b.getY()),2));
    }
    

    //returns the length of e
    public static Double lengthOf(Edge e) {
        return distanceFrom(e.getA(), e.getB());
    }
}
{'fraction_non_alphanumeric': 0.11853245531514581, 'fraction_numerical': 0.02634054562558796, 'mean_word_length': 3.0766283524904217, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3222562', 'n_tokens_mistral': 355, 'n_tokens_neox': 328, 'n_words': 92}