This is always set to true.
if (!clust_sym) clust_sym = agattr(g,AGNODE,"cluster","-1");
if (clustering_scheme == CLUSTERING_MQ){
- mq_clustering(A, maxcluster, use_value,
+ mq_clustering(A, maxcluster,
&nc, clusters, &modularity);
} else if (clustering_scheme == CLUSTERING_MODULARITY){
modularity_clustering(A, FALSE, maxcluster, use_value,
if (!clust_sym) clust_sym = agattr(g,AGNODE,"cluster","-1");
if (clustering_scheme == CLUSTERING_MQ){
- mq_clustering(A, maxcluster, use_value,
+ mq_clustering(A, maxcluster,
&nc, &clusters, &modularity);
} else if (clustering_scheme == CLUSTERING_MODULARITY){
modularity_clustering(A, FALSE, maxcluster, use_value,
-void mq_clustering(SparseMatrix A, int maxcluster, int use_value,
+void mq_clustering(SparseMatrix A, int maxcluster,
int *nclusters, int **assignment, double *mq){
/* find a clustering of vertices by maximize mq
A: symmetric square matrix n x n. If real value, value will be used as edges weights, otherwise edge weights are considered as 1.
B = SparseMatrix_remove_diagonal(B);
- if (B->type != MATRIX_TYPE_REAL || !use_value) B = SparseMatrix_set_entries_to_real_one(B);
+ if (B->type != MATRIX_TYPE_REAL) B = SparseMatrix_set_entries_to_real_one(B);
hierachical_mq_clustering(B, maxcluster, nclusters, assignment, mq);
maxcluster: used to specify the maximum number of cluster desired, e.g., maxcluster=10 means that a maximum of 10 clusters
. is desired. this may not always be realized, and modularity quality may be low when this is specified. Default: maxcluster = 0 (no limit)
- use_value: whether to use the entry value, or treat edge weights as 1.
nclusters: on output the number of clusters
assignment: dimension n. Node i is assigned to cluster "assignment[i]". 0 <= assignment < nclusters.
. If *assignment = NULL on entry, it will be allocated. Otherwise used.
mq: achieve modularity
*/
-void mq_clustering(SparseMatrix A, int maxcluster, int use_value,
+void mq_clustering(SparseMatrix A, int maxcluster,
int *nclusters, int **assignment, double *mq);
#ifdef __cplusplus