<commit_before>#include <iostream>
#include "api/graph.hpp"

typedef struct global_parameters {
    int nshards;
    int membudget;
} params;

using namespace std;

int main(int argc, char** argv){
    /* keep global program parameters in par */
    params par;

    // Sample graph
    graph_t<int> g;

    //add vertices
    g.add_vertex();
    g.add_vertex();
    g.add_vertex();
    g.add_vertex();
    g.add_vertex();

    //add edges
    g.add_edge(0,1);
    g.add_edge(2,1);
    g.add_edge(3,0);
    g.add_edge(4,0);
    g.add_edge(4,1);
    g.add_edge(5,1);

    g.add_edge(0,2);
    g.add_edge(1,2);
    g.add_edge(2,3);
    g.add_edge(4,2);
    g.add_edge(5,3);

    g.add_edge(1,4);
    g.add_edge(2,4);
    g.add_edge(2,5);
    g.add_edge(3,4);
    g.add_edge(4,5);

    //print all edges of all vertices
    for(int i = 0; i < g.get_num_nodes(); i++){
        cout << "Edges of node " << i << " :" <<endl;
        for(auto it = g.edges[i]->begin(); it != g.edges[i]->end(); ++it){
            cout << "\t" << i << " -> " << *it << endl;
        }
        cout << endl;
    }

    return 0;
}
<commit_msg>printing edges is moved to graph.hpp<commit_after>#include <iostream>
#include "api/graph.hpp"
#include "preprocessing/sharding.hpp"

typedef struct global_parameters {
    int nshards;
    int membudget;
} params;

using namespace std;

//template<class T>
//void print_edges(graph_t<T>& g){
    ////print all edges of all vertices
    //for(auto it = g.edges.begin(); it != g.edges.end(); ++it){
        //cout << "Edges of node " << (*it).first << " :" <<endl;

        //for(auto it2 = it->second->begin(); it2 != it->second->end(); ++it2){
            //cout << "\t" << (*it).first << " -> " << *it2 << endl;
        //}

        //cout << endl;
    //}
//}

int main(int argc, char** argv){
    /* keep global program parameters in par */
    params par;

    // Sample graph
    graph_t<int> g;

    //add vertices
    g.add_vertex();
    g.add_vertex();
    g.add_vertex();
    g.add_vertex();
    g.add_vertex();

    //add edges
    g.add_edge(0,1);
    g.add_edge(2,1);
    g.add_edge(3,0);
    g.add_edge(4,0);
    g.add_edge(4,1);
    g.add_edge(5,1);

    g.add_edge(0,2);
    g.add_edge(1,2);
    g.add_edge(2,3);
    g.add_edge(4,2);
    g.add_edge(5,3);

    g.add_edge(1,4);
    g.add_edge(2,4);
    g.add_edge(2,5);
    g.add_edge(3,4);
    g.add_edge(4,5);

    g.print_edges();

    foo("kucuk.txt");

    return 0;
}

{'fraction_non_alphanumeric': 0.1991042345276873, 'fraction_numerical': 0.028908794788273615, 'mean_word_length': 2.2935656836461127, 'pattern_counts': {'":': 0, '<': 50, '<?xml version=': 0, '>': 17, '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': '840484', 'n_tokens_mistral': 1018, 'n_tokens_neox': 992, 'n_words': 194}