<commit_before>/*
 *
 */

#include "CoverHubDominance.h"
#include "../auxiliary/SignalHandling.h"
#include <atomic>

void NetworKit::CoverHubDominance::run() {
	hasRun = false;
	Aux::SignalHandler handler;

	std::vector<std::atomic<count> > maxInternalDeg(C.upperBound());

	handler.assureRunning();

	G.parallelForNodes([&](node u) {
		for (index c : C[u]) {
			count internalDeg = 0;
			G.forNeighborsOf(u, [&](node v) {
				if (C[v].count(c) > 0) {
					internalDeg++;
				}
			});

			// atomic max operation
			// current maximum value<commit_msg>CoverHubDominance: use balanced scheduling for parallelization<commit_after>/*
 *
 */

#include "CoverHubDominance.h"
#include "../auxiliary/SignalHandling.h"
#include <atomic>

void NetworKit::CoverHubDominance::run() {
	hasRun = false;
	Aux::SignalHandler handler;

	std::vector<std::atomic<count> > maxInternalDeg(C.upperBound());

	handler.assureRunning();

	G.balancedParallelForNodes([&](node u) {
		for (index c : C[u]) {
			count internalDeg = 0;
			G.forNeighborsOf(u, [&](node v) {
				if (C[v].count(c) > 0) {
					internalDeg++;
				}
			});

			// atomic max operation
			// current maximum value
{'fraction_non_alphanumeric': 0.16968130921619293, 'fraction_numerical': 0.0034453057708871662, 'mean_word_length': 4.008620689655173, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2881089', 'n_tokens_mistral': 480, 'n_tokens_neox': 411, 'n_words': 80}