Classes | Functions
wirecell.img.clusters Namespace Reference

Classes

class  ClusterMap
 

Functions

def match_dict (have, want)
 

Detailed Description

Handle cluster graphs.

A cluster graph is a networkx graph with nodes holding a letter "type
code" (c,w,b,s,m) and a code-dependent data structure

Function Documentation

def wirecell.img.clusters.match_dict (   have,
  want 
)
return True if all keys of want are in have and all their values are equal.

Definition at line 9 of file clusters.py.

9 def match_dict(have, want):
10  '''
11  return True if all keys of want are in have and all their values are equal.
12  '''
13  for w in want:
14  if w not in have:
15  return False
16  if have[w] != want[w]:
17  return False
18  return True
19 
def match_dict(have, want)
Definition: clusters.py:9