Home Wiki Blog Forum GEXF.net

Gephi forums

Community support

edge weight filter error

Automated tasks on server

edge weight filter error

Postby noarappaport » 15 Jul 2013 09:10

Hi,
I am trying to apply the age range filter similar to the tutorial:

FilterController filterController = Lookup.getDefault().lookup(FilterController.class);
EdgeWeightFilter weightFilter = new EdgeWeightFilter();
weightFilter.setRange(new Range(10, 20));
Query query = filterController.createQuery(weightFilter);
GraphView view = filterController.filter(query);
graphModel.setVisibleView(view);

I get the following error:

java.lang.IllegalArgumentException: Lower and upper must be the same class
at org.gephi.filters.api.Range.<init>(Range.java:75)
at org.gephi.filters.api.Range.<init>(Range.java:82)
at org.gephi.filters.api.Range.<init>(Range.java:87)
at org.gephi.filters.FilterProcessor.init(FilterProcessor.java:288)
at org.gephi.filters.FilterProcessor.processEdgeFilter(FilterProcessor.java:192)
at org.gephi.filters.FilterProcessor.process(FilterProcessor.java:105)
at org.gephi.filters.FilterControllerImpl.filter(FilterControllerImpl.java:237)
at graphsController.DiseaseNWgenerator.main(DiseaseNWgenerator.java:265)



What can I do ??
thanks.
noarappaport
 
Posts: 13
Joined: 05 Nov 2012 15:52

Re: edge weight filter error

Postby seinecle » 17 Jul 2013 09:28

Hi,

Just a random suggestion as I don't have the code live in front of me: maybe that passing floats instead of integers would do?
(either by casting to
Code: Select all
(float)
or by putting 10.0 and 20.0.

Best,

Clement
http://www.clementlevallois.net
Gephi tutorials and personalized trainings: http://www.clementlevallois.net/training.html
Join the Gephi Facebook group for help and support: https://www.facebook.com/groups/gephi/
User avatar
seinecle
Gephi Community Support
 
Posts: 527
Joined: 08 Feb 2010 17:55
Location: Lyon, France


Return to Toolkit

Who is online

Users browsing this forum: No registered users and 0 guests