用于图表操作的Javascript库 [英] Javascript library for graph operations

查看:119
本文介绍了用于图表操作的Javascript库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何建议的JavaScript替代Python的python pygraph NetworkX ?应该注意的是,可视化是没有必要的(甚至最好不要这样做)。

库应该能够解析能够保留节点上的标签和属性的格式和边缘(DOT,GraphML?)。它应该支持以下操作:


  • 列出节点和边缘。 给定一个节点,
  • 给定一个节点或边,返回附加的属性。

  • 给定连接的两个节点,确定最完整的路径。当运行这个操作时,应该提供一个谓词函数来确定一个节点是否应该包含在搜索中。



在上下文中,基于Web浏览器的应用程序将从预定的开始节点遍历图形。每个节点都拥有一个属性'userValue',该属性与节点外边缘的属性(条件?)进行比较。为了遍历继续,边缘条件必须根据'userValue'评估为true。该图将始终包含预定的开始和结束(或目标)节点。

解决方案

您可以尝试

JSNetworkX
将NetworkX图库的一个端口转换为JavaScript


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


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.

解决方案

You could try

JSNetworkX A port of the NetworkX graph library to JavaScript

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

这篇关于用于图表操作的Javascript库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆