goulib.graph

efficient Euclidian Graphs for networkx and related algorithms

requires:

optional:

  • scipy for delauney triangulation

  • rtree for faster GeoGraph algorithms

Functions

delauney_triangulation(nodes[, ...])

https://en.wikipedia.org/wiki/Delaunay_triangulation :param nodes: _Geo graph or list of (x,y) or (x,y,z) node positions :param qhull_options: string passed to scipy.spatial.Delaunay(), which passes it to Qhull ( http://www.qhull.org/ ) *'Qt' ensures all points are connected *'Qz' required when nodes lie on a sphere *'QJ' solves some singularity situations

draw_networkx(g[, pos])

improves nx.draw_networkx :param g: NetworkX Graph :param pos: can be either :

euclidean_minimum_spanning_tree(nodes, **kwargs)

figure(g[, box])

points_on_sphere(N)

read_json(filename[, directed, multigraph, ...])

to_drawing(g[, d, edges])

draws Graph to a Drawing :param g: Graph :param d: existing Drawing to draw onto, or None to create a new Drawing :param edges: iterable of edges (with data) that will be added, in the same order.

to_json(g, **kwargs)

to_networkx_graph(data[, create_using, ...])

Make a NetworkX graph from a known data structure.

write_dot(g, filename)

write_dxf(g, filename)

writes networkx.Graph in .dxf format

write_json(g, filename, **kwargs)

write a JSON file, suitable for D*.js representation

Classes

AGraph()

DiGraph([data, nodes])

directed graph with nodes positions can be set to non multiedges anytime with attribute multi=False

GeoGraph([data, nodes])

Undirected graph with nodes positions can be set to non multiedges anytime with attribute multi=False

_Geo(parent[, data, nodes])

base class for graph with nodes at specified positions.

index()