mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 09:14:59 +00:00
use in-edges
This commit is contained in:
parent
915a9132de
commit
bb0d58020c
1 changed files with 2 additions and 2 deletions
|
@ -358,9 +358,9 @@ def call_map():
|
||||||
ranked_definitions = defaultdict(float)
|
ranked_definitions = defaultdict(float)
|
||||||
for src in G.nodes:
|
for src in G.nodes:
|
||||||
src_rank = ranked[src]
|
src_rank = ranked[src]
|
||||||
total_weight = sum(data["weight"] for _src, _dst, data in G.out_edges(src, data=True))
|
total_weight = sum(data["weight"] for _src, _dst, data in G.in_edges(src, data=True))
|
||||||
dump(src, src_rank, total_weight)
|
dump(src, src_rank, total_weight)
|
||||||
for src, dst, data in G.out_edges(src, data=True):
|
for src, dst, data in G.in_edges(src, data=True):
|
||||||
data["rank"] = data["weight"] / total_weight * src_rank
|
data["rank"] = data["weight"] / total_weight * src_rank
|
||||||
ident = data["ident"]
|
ident = data["ident"]
|
||||||
ranked_definitions[(dst, ident)] += data["rank"]
|
ranked_definitions[(dst, ident)] += data["rank"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue