mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
[mypy] Fix type annotations for graphs (#4622)
* Fix mypy error for frequent_pattern_graph_miner.py * Fix mypy error for markov_chain.py
This commit is contained in:
parent
d009cea391
commit
4545270ace
|
@ -227,6 +227,6 @@ if __name__ == "__main__":
|
||||||
support = get_support(cluster)
|
support = get_support(cluster)
|
||||||
graph = construct_graph(cluster, nodes)
|
graph = construct_graph(cluster, nodes)
|
||||||
find_freq_subgraph_given_support(60, cluster, graph)
|
find_freq_subgraph_given_support(60, cluster, graph)
|
||||||
paths = []
|
paths: list = []
|
||||||
freq_subgraph_edge_list = freq_subgraphs_edge_list(paths)
|
freq_subgraph_edge_list = freq_subgraphs_edge_list(paths)
|
||||||
print_all()
|
print_all()
|
||||||
|
|
|
@ -35,6 +35,7 @@ class MarkovChainGraphUndirectedUnweighted:
|
||||||
current_probability += self.connections[node][dest]
|
current_probability += self.connections[node][dest]
|
||||||
if current_probability > random_value:
|
if current_probability > random_value:
|
||||||
return dest
|
return dest
|
||||||
|
return ""
|
||||||
|
|
||||||
|
|
||||||
def get_transitions(
|
def get_transitions(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user