Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
clustering.c File Reference
#include <math.h>
#include <sparse/general.h>
#include <sparse/SparseMatrix.h>
#include <sparse/clustering.h>
#include <stdbool.h>
#include <util/alloc.h>
Include dependency graph for clustering.c:

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)
 

Macro Definition Documentation

◆ STANDALONE

#define STANDALONE

Definition at line 11 of file clustering.c.

Function Documentation

◆ hierachical_modularity_clustering()

static void hierachical_modularity_clustering ( SparseMatrix  A,
int  ncluster_target,
int *  nclusters,
int **  assignment,
double *  modularity 
)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Multilevel_Modularity_Clustering_delete()

static void Multilevel_Modularity_Clustering_delete ( Multilevel_Modularity_Clustering  grid)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Multilevel_Modularity_Clustering_establish()

◆ Multilevel_Modularity_Clustering_init()

static Multilevel_Modularity_Clustering Multilevel_Modularity_Clustering_init ( SparseMatrix  A,
int  level 
)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Multilevel_Modularity_Clustering_new()

static Multilevel_Modularity_Clustering Multilevel_Modularity_Clustering_new ( SparseMatrix  A0,
int  ncluster_target 
)
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().

Here is the call graph for this function:
Here is the caller graph for this function: