<commit_before>/*libs Jquery, graphics is needed.*/
/// <reference path="../../../lib/jquery.d.ts" />
/// <reference path="../../../lib/arbor.d.ts" />
/// <reference path="renderer.ts" />

$(document).ready(function(){
    var graph = new Graph(<Branch>{nodes:{foo:{label:'foo'}}, edges:{foo: {foo: {label: 'baz'}}, '1':{'foo':{label:'test'}}}});
    graph.init()
})

class Graph {
    private sys : ParticleSystem;
    private renderer : Renderer;
    private nodes : Object; 
    private edges : Object;
    constructor(graphDefinition? : Branch) {
        this.sys = arbor.ParticleSystem(500, 3000, 0.95);
        this.sys.parameters({gravity:true});
        this.renderer = new Renderer("#viewport");
        this.sys.renderer = this.renderer
    }

    init() : void{
        var one  = this.renderer.addNodeToGraph('-1', {label: 'Node one'}); 
        var two = this.renderer.addNodeToGraph('0', {label: 'Node two'});

        this.renderer.addEdgeToGraph(one, two, {label: 'one'});
        this.renderer.addEdgeToGraph(one, two, {label: 'two'});


    }


}<commit_msg>added bending edges test to graph.ts<commit_after>/*libs Jquery, graphics is needed.*/
/// <reference path="../../../lib/jquery.d.ts" />
/// <reference path="../../../lib/arbor.d.ts" />
/// <reference path="renderer.ts" />

$(document).ready(function(){
    var graph = new Graph(<Branch>{nodes:{foo:{label:'foo'}}, edges:{foo: {foo: {label: 'baz'}}, '1':{'foo':{label:'test'}}}});
    graph.init()
})

class Graph {
    private sys : ParticleSystem;
    private renderer : Renderer;
    private nodes : Object; 
    private edges : Object;
    constructor(graphDefinition? : Branch) {
        this.sys = arbor.ParticleSystem(500, 3000, 0.95);
        this.sys.parameters({gravity:true});
        this.renderer = new Renderer("#viewport");
        this.sys.renderer = this.renderer
    }

    init() : void{
        var one  = this.renderer.addNodeToGraph('-1', {label: 'Node one'}); 
        var two = this.renderer.addNodeToGraph('0', {label: 'Node two'});

        this.renderer.addEdgeToGraph(one, two, {label: 'one'});
        this.renderer.addEdgeToGraph(one, two, {label: 'two'});
        this.renderer.addEdgeToGraph(two, one, {label: 'test'});


    }


}
{'fraction_non_alphanumeric': 0.203125, 'fraction_numerical': 0.011607142857142858, 'mean_word_length': 3.023339317773788, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '6474724', 'n_tokens_mistral': 751, 'n_tokens_neox': 723, 'n_words': 149}