In [15]:
import os
from performance_tools.digraph import Digraph
In [3]:
filename = os.path.realpath(os.path.join(os.path.abspath(__file__), 'digraph.csv'))
dg = Digraph.from_csv(filename)
In [18]:
dg._vertices
Out[18]:
In [21]:
dg._arcs
Out[21]:
In [4]:
dg.draw('examples/digraph.pdf', relative_value=True)
In [5]:
dg.all_paths('None', '/foo/bar')
Out[5]:
In [6]:
dg.draw_all_paths('None', '/foo/bar', 'examples/digraph.pdf', relative_value=True)
In [16]:
vertices = {'None', '/', '/foo/bar'}
sub_dg = dg.subgraph(vertices)
In [19]:
sub_dg._vertices
Out[19]:
In [20]:
sub_dg._arcs
Out[20]: