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

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

static PRIMITIVE RevealEdgesByRankCmd(SCM g, SCM view)
{
	Graph *gr;
        if (!(gr = getGraph(g)))
                Err("reveal-edges-by-rank: bad arg 1, graph expected", g);
	char *name = getViewName(view);
	int k = initAnimation();
	animationWindows(k, name);
        RevealEdgesByRank(gr,name);

        return UNDEFINED;
}

void gen_RevealEdgesByRank_Wrapper()
{
        STk_add_new_cpp_primitive("reveal-edges-by-rank", tc_subr_2,
                               (PRIMITIVE (*)(...))RevealEdgesByRankCmd);
}
