#include<stk.h>
#include<LINK/stkWrapper/LINK_STk.h>
#include<LINK/stkWrapper/Wrapper.h>
#include<LINK/algorithm/Algorithms.h>
#include<LINK/graph/Graph.h>

#include <stdio.h>
#include <stdlib.h>

static PRIMITIVE GirthCmd(SCM g)
{
        Graph *gr;
        if (!(gr = getGraph(g)))
                Err("bridges: bad arg 1, graph expected", g);
        int i = Girth(gr);

        return STk_makeinteger(i);
}

void gen_Girth_Wrapper()
{
        STk_add_new_cpp_primitive("girth", tc_subr_1,
                               (PRIMITIVE (*)(...))GirthCmd);
}
