<commit_before>/*global window:true, document*/
;(function($){
    'use strict';

    var extend = $.extend = function extend(){
        var result = {};
        Array.prototype.slice.call(arguments, 0).forEach(function(argument){
            for (var key in argument) {
                if (!result[key]) {
                    result[key] = argument[key];
                }
                if (typeof result[key] === 'object') {
                    result[key] = extend(result[key], argument[key]);
                }
            }
        });
        return result;
    };

    function between(u, v, t){
        return {
            'x': (1 - t) * u.x + t * v.x,
            'y': (1 - t) * u.y + t * v.y
        };
    }

    function contains(collection, target) {
        return collection.reduce(function(found, element){ return found || element === target; }, false);
    }

    var Vertex = function(x, y, id, radius){
        this.x = x;
        this.y = y;
        this.id = id;
        this.radius = radius || 20;
    };
    Vertex.prototype.setRadius = function(radius){
        this.radius = radius || 20;
    };

    var Edge = function(u, v, id){
        this.tail = u;
        this.head = v;
        this.id = id;
    };
    Edge.prototype.incidentTo = function(v){
        return this.tail === v || this.head === v;
    };
    Edge.prototype.neighbour = function(v){
        if (!this.incidentTo(v)) { throw new Error('vertex not incident to edge'); }
        return this.head === v ? this.tail: this.head;
    };

    var Graph = $.Graph = function(options){
        this.options = extend(options || {},
                              { vertex: { speed: 1, drift: { x: -0.5, y: 0 } } });
        this.vertexId = 0;
        this.vertices = [];
        this.edgeId = 0;
        this.edges = [];
    };
    Graph.prototype.addVertex = function(x, y) {
        var v = new Vertex(x, y, this.vertexId++);
        v.motion = $.brownianMotion(this.options.vertex.speed, this.options.vertex.drift);
        this.vertices.push(v);
        return v;
    };<commit_msg>Increase speed and drift<commit_after>/*global window:true, document*/
;(function($){
    'use strict';

    var extend = $.extend = function extend(){
        var result = {};
        Array.prototype.slice.call(arguments, 0).forEach(function(argument){
            for (var key in argument) {
                if (!result[key]) {
                    result[key] = argument[key];
                }
                if (typeof result[key] === 'object') {
                    result[key] = extend(result[key], argument[key]);
                }
            }
        });
        return result;
    };

    function between(u, v, t){
        return {
            'x': (1 - t) * u.x + t * v.x,
            'y': (1 - t) * u.y + t * v.y
        };
    }

    function contains(collection, target) {
        return collection.reduce(function(found, element){ return found || element === target; }, false);
    }

    var Vertex = function(x, y, id, radius){
        this.x = x;
        this.y = y;
        this.id = id;
        this.radius = radius || 20;
    };
    Vertex.prototype.setRadius = function(radius){
        this.radius = radius || 20;
    };

    var Edge = function(u, v, id){
        this.tail = u;
        this.head = v;
        this.id = id;
    };
    Edge.prototype.incidentTo = function(v){
        return this.tail === v || this.head === v;
    };
    Edge.prototype.neighbour = function(v){
        if (!this.incidentTo(v)) { throw new Error('vertex not incident to edge'); }
        return this.head === v ? this.tail: this.head;
    };

    var Graph = $.Graph = function(options){
        this.options = extend(options || {},
                              { vertex: { speed: 2, drift: { x: -1, y: 0 } } });
        this.vertexId = 0;
        this.vertices = [];
        this.edgeId = 0;
        this.edges = [];
    };
    Graph.prototype.addVertex = function(x, y) {
        var v = new Vertex(x, y, this.vertexId++);
        v.motion = $.brownianMotion(this.options.vertex.speed, this.options.vertex.drift);
        this.vertices.push(v);
        return v;
    };
{'fraction_non_alphanumeric': 0.15764139590854392, 'fraction_numerical': 0.006016847172081829, 'mean_word_length': 1.68302130406714, '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': '2712783', 'n_tokens_mistral': 1296, 'n_tokens_neox': 1244, 'n_words': 303}