Home | History | Annotate | Download | only in bipartite

Lines Matching defs:color

19             'color',
97 def color(G):
108 color : dictionary
109 A dictionary keyed by node with a 1 or 0 as data for each node color.
119 >>> c = bipartite.color(G)
139 color = {}
141 if n in color or len(G[n])==0: # skip isolates
144 color[n] = 1 # nodes seen with color (1 or 0)
147 c = 1 - color[v] # opposite color of node v
149 if w in color:
150 if color[w] == color[v]:
153 color[w] = c
155 # color isolates with 0
156 color.update(dict.fromkeys(nx.isolates(G),0))
157 return color
175 color, is_bipartite_node_set
178 color(G)
241 color
243 c = color(G)
276 color
322 color, density