Skip to content
Snippets Groups Projects

pydtn agkmeans and version 1.0

Merged Hunter McConnell (rtm534) requested to merge summer2022 into develop
1 file
+ 3
4
Compare changes
  • Side-by-side
  • Inline
+ 3
4
@@ -240,7 +240,7 @@ class AGKmeansCommunity(Community):
}
graph.add_nodes_from(nodes)
for node_a, node_b, weight in self.graph_old.edges(data='weight'):
graph.add_edge(id(node_a), id(node_b), {'weight': weight})
graph.add_edge(id(node_a), id(node_b), weight=weight)
partitions = agkmeans(graph, k=self.agk)
@@ -333,8 +333,7 @@ class CommunityNode(Node):
if neighbour not in self.community
]
def shared_community(context, create):
def shared_community(context, create):
"""
Check context for shared community and return a shared community.
@@ -403,7 +402,7 @@ class AGKmeansNode(CommunityNode):
super().__init__(**options)
def _decide(node, others, key):
def _decide(node, others, key):
"""
Make a decision on which node to send to best is decided based on key.
Loading