Toolkit - Edge Filtering

Please use a mailing-list, see http://gephi.org/developers/
Post Reply
raffaelecesarano
Posts: 1
Joined: 30 Mar 2017 09:41

Toolkit - Edge Filtering

Post by raffaelecesarano » 30 Mar 2017 09:48

Hello, I'm trying to develop an algorithm with the toolkit and I need to delete all the edges that have the value "Function" in the column "kind".
I tried the following code:

Code: Select all

        FilterController filterController = Lookup.getDefault().lookup(FilterController.class);
        EdgePartitionFilter EdgePartitionFilter = new EdgePartitionFilter(graphModel.getEdgeTable().getColumn("kind"), appearanceModel);
        EdgePartitionFilter.unselectAll();
        EdgePartitionFilter.addPart("Function");
        Query query = filterController.createQuery(EdgePartitionFilter);
        GraphView view = filterController.filter(query);
        graphModel.setVisibleView(view);
                          
        graph = graphModel.getDirectedGraphVisible();
        System.out.println("Nodes: " + graph.getNodeCount() + " Edges: " + graph.getEdgeCount());
Unfortunately, it does not work because it does not delete the edges. I tried the version 0.9.1 and the 0.9.2 snapshot
Can someone help me please? I am a total newbie :D

Post Reply