def call_louvain(sID, data, num_verts, num_edges, vertex_partition_offsets, sorted_by_degree, max_level, resolution): wid = Comms.get_worker_id(sID) handle = Comms.get_handle(sID) return c_mg_louvain.louvain(data[0], num_verts, num_edges, vertex_partition_offsets, wid, handle, sorted_by_degree, max_level, resolution)
def call_louvain(sID, data, num_verts, num_edges, vertex_partition_offsets, aggregate_segment_offsets, max_level, resolution): wid = Comms.get_worker_id(sID) handle = Comms.get_handle(sID) local_size = len(aggregate_segment_offsets) // Comms.get_n_workers(sID) segment_offsets = \ aggregate_segment_offsets[local_size * wid: local_size * (wid + 1)] return c_mg_louvain.louvain(data[0], num_verts, num_edges, vertex_partition_offsets, wid, handle, segment_offsets, max_level, resolution)
def call_louvain(sID, data, local_data, max_level, resolution): wid = Comms.get_worker_id(sID) handle = Comms.get_handle(sID) return c_mg_louvain.louvain(data[0], local_data, wid, handle, max_level, resolution)