![]() |
Quantum Fog
0.9.3
|
Public Member Functions | |
def | __init__ (self, nodes) |
def | get_vtx_to_state_names (self) |
def | write_bif (self, path, is_quantum) |
![]() | |
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) |
![]() | |
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) |
![]() | |
def | new_from_nx_graph (nx_graph) |
![]() | |
def | new_from_nx_graph (nx_graph) |
Additional Inherited Members | |
![]() | |
num_nodes | |
nodes | |
![]() | |
nodes | |
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
def graphs.BayesNet.BayesNet.__init__ | ( | self, | |
nodes | |||
) |
Constructor. Parameters ---------- nodes : set[BayesNode] Returns -------
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]]
|
static |
Returns a BayesNet constructed from nx_graph. Parameters ---------- nx_graph : networkx Graph Returns ------- BayesNet
|
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 -------