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

Go to the source code of this file.

Macros

#define STANDALONE
 

Functions

static double get_mq (SparseMatrix A, int *assignment, int *ncluster0, double *mq_in0, double *mq_out0, double **dout0)
 
static Multilevel_MQ_Clustering Multilevel_MQ_Clustering_init (SparseMatrix A, int level)
 
static void Multilevel_MQ_Clustering_delete (Multilevel_MQ_Clustering grid)
 
static Multilevel_MQ_Clustering Multilevel_MQ_Clustering_establish (Multilevel_MQ_Clustering grid, int maxcluster)
 
static Multilevel_MQ_Clustering Multilevel_MQ_Clustering_new (SparseMatrix A0, int maxcluster)
 
static void hierachical_mq_clustering (SparseMatrix A, int maxcluster, int *nclusters, int **assignment, double *mq)
 
void mq_clustering (SparseMatrix A, int maxcluster, int *nclusters, int **assignment, double *mq)
 

Macro Definition Documentation

◆ STANDALONE

#define STANDALONE

Definition at line 58 of file mq.c.

Function Documentation

◆ get_mq()

static double get_mq ( SparseMatrix  A,
int *  assignment,
int *  ncluster0,
double *  mq_in0,
double *  mq_out0,
double **  dout0 
)
static

Definition at line 68 of file mq.c.

References A, free(), gv_calloc(), MATRIX_TYPE_REAL, NULL, and SparseMatrix_is_symmetric().

Referenced by Multilevel_MQ_Clustering_establish(), and Multilevel_MQ_Clustering_init().

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

◆ hierachical_mq_clustering()

static void hierachical_mq_clustering ( SparseMatrix  A,
int  maxcluster,
int *  nclusters,
int **  assignment,
double *  mq 
)
static

Definition at line 529 of file mq.c.

References A, free(), grid, gv_calloc(), Multilevel_MQ_Clustering_struct::matching, Multilevel_MQ_Clustering_struct::mq, Multilevel_MQ_Clustering_delete(), Multilevel_MQ_Clustering_new(), Multilevel_MQ_Clustering_struct::n, Multilevel_MQ_Clustering_struct::next, NULL, Multilevel_MQ_Clustering_struct::P, Multilevel_MQ_Clustering_struct::prev, and SparseMatrix_multiply_vector().

Referenced by mq_clustering().

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

◆ mq_clustering()

void mq_clustering ( SparseMatrix  A,
int  maxcluster,
int *  nclusters,
int **  assignment,
double *  mq 
)

Definition at line 583 of file mq.c.

References A, B, hierachical_mq_clustering(), MATRIX_TYPE_REAL, SparseMatrix_copy(), SparseMatrix_delete(), SparseMatrix_remove_diagonal(), SparseMatrix_set_entries_to_real_one(), and SparseMatrix_symmetrize().

Referenced by attached_clustering(), and Import_coord_clusters_from_dot().

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

◆ Multilevel_MQ_Clustering_delete()

static void Multilevel_MQ_Clustering_delete ( Multilevel_MQ_Clustering  grid)
static

Definition at line 207 of file mq.c.

References free(), grid, Multilevel_MQ_Clustering_delete(), and SparseMatrix_delete().

Referenced by hierachical_mq_clustering(), and Multilevel_MQ_Clustering_delete().

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

◆ Multilevel_MQ_Clustering_establish()

static Multilevel_MQ_Clustering Multilevel_MQ_Clustering_establish ( Multilevel_MQ_Clustering  grid,
int  maxcluster 
)
static

◆ Multilevel_MQ_Clustering_init()

static Multilevel_MQ_Clustering Multilevel_MQ_Clustering_init ( SparseMatrix  A,
int  level 
)
static

Definition at line 154 of file mq.c.

References A, get_mq(), grid, gv_alloc(), gv_calloc(), MATRIX_TYPE_REAL, Multilevel_MQ_Clustering_struct::n, NULL, and SparseMatrix_is_symmetric().

Referenced by Multilevel_MQ_Clustering_establish(), and Multilevel_MQ_Clustering_new().

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

◆ Multilevel_MQ_Clustering_new()

static Multilevel_MQ_Clustering Multilevel_MQ_Clustering_new ( SparseMatrix  A0,
int  maxcluster 
)
static

Definition at line 510 of file mq.c.

References A, grid, SparseMatrix_struct::m, MATRIX_TYPE_REAL, Multilevel_MQ_Clustering_establish(), Multilevel_MQ_Clustering_init(), SparseMatrix_get_real_adjacency_matrix_symmetrized(), and SparseMatrix_is_symmetric().

Referenced by hierachical_mq_clustering().

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