medil.graph.UndirectedDependenceGraph

class medil.graph.UndirectedDependenceGraph(adj_matrix, verbose=False)[source]

Bases: object

Adjacency matrix representation using a 2d numpy array.

Upon initialization, this class is fairly standard implementation of an undirected graph. However, upon calling the make_aux() method, an auxilliary data structure in the form of several new attributes is created, which are used by medil.ecc_algorithms.find_clique_min_cover() according to the algorithm in [GGfN09].

Notes

The algorithms for finding the minMCM via ECC contain many algebraic operations, so adjacency matrix representation (via NumPy) is most covenient.

The diag is used to store information when the graph is reduced, not to indicate self loops, so it is important that diag = 1 at init.

__init__(adj_matrix, verbose=False)[source]

Methods

__init__(adj_matrix[, verbose])

add_edges(edges)

convert_to_nde([name])

make_aux()

n_choose_2(n)

reducible_copy()

rm_edges(edges)