3

Is there any suggested javascript alternative(s) to pythons pygraph or NetworkX? It should be noted that visualization is not necessary (even prefered not to have this).

The library should be able to parse a format capable of retaining labeling and attributes on nodes and edges (DOT, GraphML?). It should support operations such as:

  • Listing nodes and edges.
  • Given a node, the edges which point in/out to/from it.
  • Given a node or edge, return the attached attributes.
  • Given two nodes that are connected, determine the most complete path. When running this operation a predicate function should be provided to determine if a node should be included in the search or not.

To put it in context, the web browser based application will traverse the graph from a pre-determined start node. Each node holds an attribute 'userValue' which is compared against conditions (rules?) held as attributes on the nodes out-edges. For the traversal to continue the edge condition must evaluate to true against 'userValue'. The graph will always contain a predetermined start and end (or goal) node.

3
  • 1
    Are there specific graph formats that need to be supported? Also if visualisation is not needed, then what kind of graph operations are needed to be supported? Commented Oct 6, 2010 at 11:12
  • You did not say what you want to do with this library, or in what context you need it to run. Commented Oct 6, 2010 at 11:39
  • Added more beef to the post in response to the previous comments. Commented Oct 6, 2010 at 15:07

1 Answer 1

5

You could try

JSNetworkX A port of the NetworkX graph library to JavaScript

http://felix-kling.de/JSNetworkX/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.