beta version of filter

how to test:

    make mgraph_test
    ./mgraph_test c                                   # create graph
    ./mgraph_test l test_graph                        # show original graph
    ./mgraph_test f                                   # filter original graph
    ./mgraph_test l test_graph_transformed            # show filtered graph