pydi.graph.gstruct
index
/cygdrive/c/dev/workspace/pydi_open/src/pydi/graph/gstruct.py

Copyright (C) 2008 Eithon Cadag
 
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
dbgraph.py -- Extension module to represent results in the browser as graphs,
visually and structurally.
 
Eithon Cadag

 
Modules
       
pydi
time
warnings

 
Classes
       
BrowserEdge
BrowserGraph
NXBrowserGraph
BrowserInstanceNode

 
class BrowserEdge
     Methods defined here:
__init__(self, head_node, tail_node, link)
get_head(self)
get_link(self)
get_link_properties(self)
get_tail(self)

Data descriptors defined here:
head
link
properties
tail

 
class BrowserGraph
    Convenience class that takes callbacks from the Browser, and generates
a graph-like interface to the data.
 
  Methods defined here:
__init__(self, browser)
children_of(self, src_name, id_ref)
get_node_by_src_id(self, src, id)
get_roots(self)
get_sinks(self)
loaded_instance(self, inst)
loaded_link(self, link)

 
class BrowserInstanceNode
    Class to encapsulate an instance, and provide getters/setters for 
the child and parent instances.
 
  Methods defined here:
__init__(self, inst)
add_in_edge(self, p)
add_out_edge(self, c)
get_in_edges(self)
get_instance(self)
get_instance_properties(self)
get_out_edges(self)

Data descriptors defined here:
in_edges
instance
out_edges
properties

 
class NXBrowserGraph(BrowserGraph)
    Same as default Browsergraph above, but with NetworkX package capabilities.
 
  Methods defined here:
__init__(self, browser)
edges(self)
edges_str(self)
get_digraph(self)
get_edge(self, start_n, end_n)
loaded_instance(self, inst)
loaded_link(self, link)
nodes(self)
nodes_str(self)

Methods inherited from BrowserGraph:
children_of(self, src_name, id_ref)
get_node_by_src_id(self, src, id)
get_roots(self)
get_sinks(self)

 
Functions
       
diffusion_matrix(nxbg, beta=0.20000000000000001)
Input is an NXBrowserGraph, beta is the diffusion coefficient,
should be <<1.
dot_friendly_name(name)
generate_graph_jpg(browser, file_name_out)

 
Data
        __warningregistry__ = {('dbgraph module optionally needs SciPy package to operate.', <type 'exceptions.UserWarning'>, 36): 1, ('dbgraph module optionally needs pydot package to operate.', <type 'exceptions.UserWarning'>, 40): 1, ('dbgraph module requires NetworkX package to operate.', <type 'exceptions.UserWarning'>, 32): 1}