#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 RadiusCmd(SCM g)
{
        Graph *gr;
        if (!(gr = getGraph(g)))
                Err("bridges: bad arg 1, graph expected", g);
        double d = Radius(gr);

        return STk_makenumber(d);
}

void gen_Radius_Wrapper()
{
        STk_add_new_cpp_primitive("radius", tc_subr_1,
                               (PRIMITIVE (*)(...))RadiusCmd);
}
