Filter api #325

merged 6 commits into from Jul 30, 2014


None yet

4 participants


This plugin filters nodes and edges in a fancy manner:

  • Define your own filters on nodes and edges using the nodesBy and edgesBy methods, or execute more complex filters using the neighborsOf method.
  • Register multiple filters before applying them anytime at once.
  • Undo any filter while preserving the execution order.
  • Chain all methods for concise style.

See the README, example code and unit tests for full usage.

apitts commented Jun 28, 2014


Very useful - thanks!



On Jun 27, 2014, at 20:35, Andrew Pitts wrote:

Very useful - thanks!

Reply to this email directly or view it on GitHub.


Very cool plugin, @sheymann, thanks a lot!
I am merging it. I just want first to try to move your specific graph methods adjacentNodes and adjacentEdges into the plugin file.

@jacomyal jacomyal merged commit 4bad67c into jacomyal:master Jul 30, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
@jacomyal jacomyal added a commit that referenced this pull request Jul 30, 2014
@jacomyal Minor adaptations for pull request #325
Here are the minor adaptations to merge the pull request:
 - Moved methods `adjacentNodes` and `adjacentEdges` from sigma.classes.graph.js into sigma.plugins.filter.js
 - Moved the related unit tests into unit.plugins.filter.js
 - Added sigma.classes.graph.hasMethod to check wether a methodName already exists or not (and its unit tests)
 - Used hasMethod in sigma.plugins.filter.js to check if `adjacentNodes` and `adjacentEdges` already exist or not
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment