/************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-v10.html * * Contributors: Details at https://graphviz.org *************************************************************************/ #pragma once #include #ifdef __cplusplus extern "C" { #endif typedef struct Multilevel_MQ_Clustering_struct *Multilevel_MQ_Clustering; struct Multilevel_MQ_Clustering_struct { int level;/* 0, 1, ... */ int n; SparseMatrix A; /* n x n matrix */ SparseMatrix P; Multilevel_MQ_Clustering next; Multilevel_MQ_Clustering prev; bool delete_top_level_A; int *matching; /* dimension n. matching[i] is the clustering assignment of node i */ /* . |E(i,i)| |E(i,j)| MQ/2 = (1/k) * \sum_{i=1...k} ------------ - (1/(k*(k-1))) * \sum_{i