MCPcopy Create free account
hub / github.com/easy-graph/Easy-Graph / edges

Method edges

easygraph/classes/graph.py:126–139  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

124
125 @property
126 def edges(self):
127 if self.cache.get("edges") != None:
128 return self.cache["edges"]
129 edge_lst = list()
130 seen = set()
131 for u in self._adj:
132 for v in self._adj[u]:
133 if (u, v) not in seen:
134 seen.add((u, v))
135 seen.add((v, u))
136 edge_lst.append((u, v, self._adj[u][v]))
137 del seen
138 self.cache["edge"] = edge_lst
139 return self.cache["edge"]
140
141 @property
142 def name(self):

Callers 5

from_pyGraphviz_agraphFunction · 0.45
to_pyGraphviz_agraphFunction · 0.45
test_k_coreFunction · 0.45
edge_boundaryFunction · 0.45
from_agraphFunction · 0.45

Calls 2

addMethod · 0.80
appendMethod · 0.80

Tested by 1

test_k_coreFunction · 0.36