Graphviz 13.0.0~dev.20241220.2304
|
#include <math.h>
#include <sparse/general.h>
#include <sparse/SparseMatrix.h>
#include <sparse/clustering.h>
#include <stdbool.h>
#include <util/alloc.h>
Go to the source code of this file.
Macros | |
#define | STANDALONE |
Functions | |
static Multilevel_Modularity_Clustering | Multilevel_Modularity_Clustering_init (SparseMatrix A, int level) |
static void | Multilevel_Modularity_Clustering_delete (Multilevel_Modularity_Clustering grid) |
static Multilevel_Modularity_Clustering | Multilevel_Modularity_Clustering_establish (Multilevel_Modularity_Clustering grid, int ncluster_target) |
static Multilevel_Modularity_Clustering | Multilevel_Modularity_Clustering_new (SparseMatrix A0, int ncluster_target) |
static void | hierachical_modularity_clustering (SparseMatrix A, int ncluster_target, int *nclusters, int **assignment, double *modularity) |
void | modularity_clustering (SparseMatrix A, bool inplace, int ncluster_target, int *nclusters, int **assignment, double *modularity) |
#define STANDALONE |
Definition at line 11 of file clustering.c.
|
static |
Definition at line 280 of file clustering.c.
References A, free(), grid, gv_calloc(), Multilevel_Modularity_Clustering_struct::matching, Multilevel_Modularity_Clustering_struct::modularity, Multilevel_Modularity_Clustering_delete(), Multilevel_Modularity_Clustering_new(), Multilevel_Modularity_Clustering_struct::n, Multilevel_Modularity_Clustering_struct::next, NULL, Multilevel_Modularity_Clustering_struct::P, Multilevel_Modularity_Clustering_struct::prev, and SparseMatrix_multiply_vector().
Referenced by modularity_clustering().
void modularity_clustering | ( | SparseMatrix | A, |
bool | inplace, | ||
int | ncluster_target, | ||
int * | nclusters, | ||
int ** | assignment, | ||
double * | modularity | ||
) |
Definition at line 341 of file clustering.c.
References A, B, hierachical_modularity_clustering(), MATRIX_TYPE_REAL, SparseMatrix_copy(), SparseMatrix_delete(), SparseMatrix_remove_diagonal(), SparseMatrix_set_entries_to_real_one(), and SparseMatrix_symmetrize().
Referenced by attached_clustering(), Import_coord_clusters_from_dot(), and modularity_ink_bundling().
|
static |
Definition at line 73 of file clustering.c.
References free(), grid, Multilevel_Modularity_Clustering_delete(), and SparseMatrix_delete().
Referenced by hierachical_modularity_clustering(), and Multilevel_Modularity_Clustering_delete().
|
static |
Definition at line 90 of file clustering.c.
References A, Multilevel_Modularity_Clustering_struct::agglomerate_regardless, B, Multilevel_Modularity_Clustering_struct::deg, Multilevel_Modularity_Clustering_struct::deg_total, FORMAT_COORD, free(), grid, gv_calloc(), Multilevel_Modularity_Clustering_struct::matching, MATRIX_TYPE_REAL, Multilevel_Modularity_Clustering_struct::modularity, Multilevel_Modularity_Clustering_establish(), Multilevel_Modularity_Clustering_init(), SparseMatrix_struct::n, Multilevel_Modularity_Clustering_struct::prev, RETURN, SparseMatrix_coordinate_form_add_entry(), SparseMatrix_delete(), SparseMatrix_from_coordinate_format(), SparseMatrix_multiply(), SparseMatrix_new(), SparseMatrix_transpose(), UNMATCHED, and Verbose.
Referenced by Multilevel_Modularity_Clustering_establish(), and Multilevel_Modularity_Clustering_new().
|
static |
Definition at line 19 of file clustering.c.
References A, free(), grid, gv_alloc(), gv_calloc(), MATRIX_TYPE_REAL, Multilevel_Modularity_Clustering_struct::n, NULL, and SparseMatrix_is_symmetric().
Referenced by Multilevel_Modularity_Clustering_establish(), and Multilevel_Modularity_Clustering_new().
|
static |
Definition at line 256 of file clustering.c.
References A, grid, MATRIX_TYPE_REAL, Multilevel_Modularity_Clustering_establish(), Multilevel_Modularity_Clustering_init(), SparseMatrix_get_real_adjacency_matrix_symmetrized(), and SparseMatrix_is_symmetric().
Referenced by hierachical_modularity_clustering().