Quantum Fog  0.9.3
Public Member Functions | Static Public Member Functions | List of all members
graphs.BayesNet.BayesNet Class Reference
Inheritance diagram for graphs.BayesNet.BayesNet:
Inheritance graph
[legend]
Collaboration diagram for graphs.BayesNet.BayesNet:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, nodes)
 
def get_vtx_to_state_names (self)
 
def write_bif (self, path, is_quantum)
 
- Public Member Functions inherited from graphs.Dag.Dag
def __init__ (self, nodes)
 
def detect_two_node_cycle (self)
 
def topological_sort (self)
 
def undirect (self)
 
def add_nodes (self, nodes)
 
def get_nx_graph (self)
 
- Public Member Functions inherited from graphs.Graph.Graph
def __init__ (self, nodes)
 
def add_nodes (self, nodes)
 
def has_node (self, node)
 
def contains (self, nodes)
 
def unmark_all_nodes (self)
 
def get_node_named (self, name)
 
def get_node_with_id_num (self, id_num)
 
def get_node_with_topo_index (self, topo_index)
 
def get_nx_graph (self)
 
def draw (self, algo_num, kwargs)
 
def write_dot (self, path)
 
def read_dot (cls, path)
 

Static Public Member Functions

def new_from_nx_graph (nx_graph)
 
def read_bif (path, is_quantum)
 
- Static Public Member Functions inherited from graphs.Dag.Dag
def new_from_nx_graph (nx_graph)
 
- Static Public Member Functions inherited from graphs.Graph.Graph
def new_from_nx_graph (nx_graph)
 

Additional Inherited Members

- Public Attributes inherited from graphs.Dag.Dag
 num_nodes
 
 nodes
 
- Public Attributes inherited from graphs.Graph.Graph
 nodes
 

Detailed Description

This class embodies a CBnet or QBnet.  It's a DAG (Direct
Acyclic Graph) whose nodes are of type BayesNode.

Attributes
----------
nodes : set[BayesNode]
num_of_nodes : int

Constructor & Destructor Documentation

def graphs.BayesNet.BayesNet.__init__ (   self,
  nodes 
)
Constructor.

Parameters
----------
nodes : set[BayesNode]

Returns
-------

Member Function Documentation

def graphs.BayesNet.BayesNet.get_vtx_to_state_names (   self)
Returns a dictionary mapping node names to the list of their state
names

Returns
-------
dict[str, list[str]]
def graphs.BayesNet.BayesNet.new_from_nx_graph (   nx_graph)
static
Returns a BayesNet constructed from nx_graph.

Parameters
----------
nx_graph : networkx Graph

Returns
-------
BayesNet
def graphs.BayesNet.BayesNet.read_bif (   path,
  is_quantum 
)
static
Reads a bif file using our stand-alone class Qubifer and returns a
BayesNet. bif and dot files complement each other. bif: graphical
info No, pot info Yes. dot: graphical info Yes, pot info No. By pots
I mean potentials, the transition matrices of the nodes. (aka CPTs,
etc.)

Parameters
----------
path : str
is_quantum : bool

Returns
-------
BayesNet
def graphs.BayesNet.BayesNet.write_bif (   self,
  path,
  is_quantum 
)
Writes a bif file using Qubifer class. Complements read_bif().

Parameters
----------
path : str
is_quantum : bool

Returns
-------

The documentation for this class was generated from the following file: