MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / get_distinct_edge

Function get_distinct_edge

graphs/frequent_pattern_graph_miner.py:27–37  ·  view source on GitHub ↗

Return Distinct edges from edge array of multiple graphs >>> sorted(get_distinct_edge(edge_array)) ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']

(edge_array)

Source from the content-addressed store, hash-verified

25
26
27def get_distinct_edge(edge_array):
28 """
29 Return Distinct edges from edge array of multiple graphs
30 >>> sorted(get_distinct_edge(edge_array))
31 ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
32 """
33 distinct_edge = set()
34 for row in edge_array:
35 for item in row:
36 distinct_edge.add(item[0])
37 return list(distinct_edge)
38
39
40def get_bitcode(edge_array, distinct_edge):

Callers 1

get_frequency_tableFunction · 0.85

Calls 1

addMethod · 0.45

Tested by

no test coverage detected