gephi/trunk — Issue #435: AttributeRangeFilter returns main graph when nothing matches filter
Author: mbastian
Created: 2011-10-22 16:46:49+00:00
State: open
Labels: Confirmed, Undecided

When you apply a NodeAttributeRangeFilter with a given range that doesn't match any node (or edge, in the case of an EdgeAttributeRangeFilter), a GraphView which is equal to the original main graph is returned.

Here's an example code, suppose that all the nodes have the attributeColumn in the range [0, +inf[ (i.e. strictly positive):

AttributeRangeFilter filter = new
AttributeRangeBuilder.NodeAttributeRangeFilter(attributeColumn);
Query query = filterController.createQuery(filter);
// this shouldn't match any nodes
filter.setRange(new Range(-10, -5));
filterController.filterVisible(query);