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

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

static PRIMITIVE TrianglesCmd(SCM g)
{
        Graph *gr;
        if (!(gr = getGraph(g)))
                Err("directed-triangles: bad arg 1, graph expected", g);
        Triangles(gr,0);
        return UNDEFINED;
}

void gen_Triangles_Wrapper()
{
        STk_add_new_cpp_primitive("find-triangles", tc_subr_1,
                               (PRIMITIVE (*)(...))TrianglesCmd);
}
