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

Public Member Functions

def __init__ (self, id_num, clique_x, clique_y, subnodes)
 
def __lt__ (self, other)
 
def set_pot_to_one (self, is_quantum)
 
def get_other_clique (self, clique)
 
- Public Member Functions inherited from nodes.Node.Node
def __init__ (self, id_num, name="blank")
 
def __lt__ (self, other)
 
def add_neighbor (self, node)
 
def remove_neighbor (self, node)
 
def has_neighbor (self, node)
 

Static Public Member Functions

def create_sepset_heap (cliques)
 

Public Attributes

 clique_x
 
 clique_y
 
 subnodes
 
 potential
 
 flag
 
 mass
 
 cost
 
- Public Attributes inherited from nodes.Node.Node
 id_num
 
 topo_index
 
 name
 
 neighbors
 
 visited
 

Detailed Description

A Sepset is a Node which contains subnodes. Every Sepset sits between 2
Cliques in a JoinTree. The subnodes set of a sepset is the intersection
of the subnodes sets of those two Cliques. The potential of a sepset
pertains to its subnodes. A sepset is used when passing messages between
its two cliques.

Attributes
----------
clique_x : Clique
clique_y : Clique
cost : float
flag : bool
mass : float
potential : Potential
subnodes : set[Node]

id_nym : int
topo_index : int
name : str
neighbors : set[Node]
visited : bool

Constructor & Destructor Documentation

def graphs.Sepset.Sepset.__init__ (   self,
  id_num,
  clique_x,
  clique_y,
  subnodes 
)
Constructor


Parameters
----------
id_num : int
clique_x : Clique
clique_y : Clique
subnodes : set[BayesNode]
    the intersection of the subnodes of clique_x and clique_y.

Returns
-------

Member Function Documentation

def graphs.Sepset.Sepset.__lt__ (   self,
  other 
)
Overrides <. Used by JoinTree to order sepsets
in a priority queue.

Parameters
----------
other : Sepset

Returns
-------
bool
def graphs.Sepset.Sepset.create_sepset_heap (   cliques)
static
Create a sepset (with a unique id) for every pair of cliques in
'cliques' that have a non-empty intersection. Insert those sepsets
into a priority queue.

Parameters
----------
cliques : list[Clique]

Returns
-------
list
def graphs.Sepset.Sepset.get_other_clique (   self,
  clique 
)
If 'clique' is clique_x or clique_y, then return the other one.

Parameters
----------
clique : Clique

Returns
-------
Clique
def graphs.Sepset.Sepset.set_pot_to_one (   self,
  is_quantum 
)
Sets self.potential to one. Needs to know is_quantum to decide
whether to use a numpy array with float64 or complex128 entries.
Sets pot to one over all states, not just the active ones.

Parameters
----------
is_quantum : bool

Returns
-------
None

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