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

Function get_bitcode

graphs/frequent_pattern_graph_miner.py:40–50  ·  view source on GitHub ↗

Return bitcode of distinct_edge

(edge_array, distinct_edge)

Source from the content-addressed store, hash-verified

38
39
40def get_bitcode(edge_array, distinct_edge):
41 """
42 Return bitcode of distinct_edge
43 """
44 bitcode = ["0"] * len(edge_array)
45 for i, row in enumerate(edge_array):
46 for item in row:
47 if distinct_edge in item[0]:
48 bitcode[i] = "1"
49 break
50 return "".join(bitcode)
51
52
53def get_frequency_table(edge_array):

Callers 1

get_frequency_tableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected