Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
SparseMatrix.c File Reference
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include <cgraph/alloc.h>
#include <common/arith.h>
#include <limits.h>
#include <sparse/SparseMatrix.h>
#include <stddef.h>
#include <stdbool.h>
Include dependency graph for SparseMatrix.c:

Go to the source code of this file.

Functions

static size_t size_of_matrix_type (int type)
 
SparseMatrix SparseMatrix_sort (SparseMatrix A)
 
SparseMatrix SparseMatrix_make_undirected (SparseMatrix A)
 
SparseMatrix SparseMatrix_transpose (SparseMatrix A)
 
SparseMatrix SparseMatrix_symmetrize (SparseMatrix A, bool pattern_symmetric_only)
 
bool SparseMatrix_is_symmetric (SparseMatrix A, bool test_pattern_symmetry_only)
 
static SparseMatrix SparseMatrix_init (int m, int n, int type, size_t sz, int format)
 
static SparseMatrix SparseMatrix_alloc (SparseMatrix A, int nz)
 
static SparseMatrix SparseMatrix_realloc (SparseMatrix A, int nz)
 
SparseMatrix SparseMatrix_new (int m, int n, int nz, int type, int format)
 
SparseMatrix SparseMatrix_general_new (int m, int n, int nz, int type, size_t sz, int format)
 
void SparseMatrix_delete (SparseMatrix A)
 
static void SparseMatrix_export_csr (FILE *f, SparseMatrix A)
 
static void SparseMatrix_export_coord (FILE *f, SparseMatrix A)
 
void SparseMatrix_export (FILE *f, SparseMatrix A)
 
SparseMatrix SparseMatrix_from_coordinate_format (SparseMatrix A)
 
SparseMatrix SparseMatrix_from_coordinate_format_not_compacted (SparseMatrix A)
 
static SparseMatrix SparseMatrix_from_coordinate_arrays_internal (int nz, int m, int n, int *irn, int *jcn, void *val0, int type, size_t sz, int sum_repeated)
 
SparseMatrix SparseMatrix_from_coordinate_arrays (int nz, int m, int n, int *irn, int *jcn, void *val0, int type, size_t sz)
 
SparseMatrix SparseMatrix_from_coordinate_arrays_not_compacted (int nz, int m, int n, int *irn, int *jcn, void *val0, int type, size_t sz)
 
SparseMatrix SparseMatrix_add (SparseMatrix A, SparseMatrix B)
 
void SparseMatrix_multiply_dense (SparseMatrix A, const double *v, double *res, int dim)
 
void SparseMatrix_multiply_vector (SparseMatrix A, double *v, double **res)
 
SparseMatrix SparseMatrix_multiply (SparseMatrix A, SparseMatrix B)
 
SparseMatrix SparseMatrix_multiply3 (SparseMatrix A, SparseMatrix B, SparseMatrix C)
 
SparseMatrix SparseMatrix_sum_repeat_entries (SparseMatrix A)
 
SparseMatrix SparseMatrix_coordinate_form_add_entry (SparseMatrix A, int irn, int jcn, const void *val)
 
SparseMatrix SparseMatrix_remove_diagonal (SparseMatrix A)
 
SparseMatrix SparseMatrix_remove_upper (SparseMatrix A)
 
SparseMatrix SparseMatrix_divide_row_by_degree (SparseMatrix A)
 
SparseMatrix SparseMatrix_get_real_adjacency_matrix_symmetrized (SparseMatrix A)
 
SparseMatrix SparseMatrix_apply_fun (SparseMatrix A, double(*fun)(double x))
 
SparseMatrix SparseMatrix_copy (SparseMatrix A)
 
bool SparseMatrix_has_diagonal (SparseMatrix A)
 
static void SparseMatrix_level_sets (SparseMatrix A, int root, int *nlevel, int **levelset_ptr, int **levelset, int **mask, bool reinitialize_mask)
 
int * SparseMatrix_weakly_connected_components (SparseMatrix A0, int *ncomp, int **comps)
 
void SparseMatrix_decompose_to_supervariables (SparseMatrix A, int *ncluster, int **cluster, int **clusterp)
 
SparseMatrix SparseMatrix_get_augmented (SparseMatrix A)
 
SparseMatrix SparseMatrix_to_square_matrix (SparseMatrix A, int bipartite_options)
 
SparseMatrix SparseMatrix_get_submatrix (SparseMatrix A, int nrow, int ncol, int *rindices, int *cindices)
 
SparseMatrix SparseMatrix_set_entries_to_real_one (SparseMatrix A)
 
SparseMatrix SparseMatrix_from_dense (int m, int n, double *x)
 
void SparseMatrix_distance_matrix (SparseMatrix D0, double **dist0)
 

Function Documentation

◆ size_of_matrix_type()

static size_t size_of_matrix_type ( int  type)
static

Definition at line 22 of file SparseMatrix.c.

References MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, and type.

Referenced by SparseMatrix_new().

Here is the caller graph for this function:

◆ SparseMatrix_add()

SparseMatrix SparseMatrix_add ( SparseMatrix  A,
SparseMatrix  B 
)

Definition at line 703 of file SparseMatrix.c.

References A, B, C, FORMAT_CSR, free(), gv_calloc(), MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, NULL, RETURN, and SparseMatrix_new().

Referenced by SparseMatrix_symmetrize(), StressMajorizationSmoother_smooth(), and TriangleSmoother_new().

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

◆ SparseMatrix_alloc()

static SparseMatrix SparseMatrix_alloc ( SparseMatrix  A,
int  nz 
)
static

Definition at line 299 of file SparseMatrix.c.

References A, format, SparseMatrix_struct::format, FORMAT_COORD, FORMAT_CSR, gv_calloc(), and NULL.

Referenced by SparseMatrix_general_new(), and SparseMatrix_new().

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

◆ SparseMatrix_apply_fun()

SparseMatrix SparseMatrix_apply_fun ( SparseMatrix  A,
double(*)(double x)  fun 
)

Definition at line 1546 of file SparseMatrix.c.

References A, FORMAT_CSR, and MATRIX_TYPE_REAL.

Referenced by modularity_ink_bundling().

Here is the caller graph for this function:

◆ SparseMatrix_coordinate_form_add_entry()

SparseMatrix SparseMatrix_coordinate_form_add_entry ( SparseMatrix  A,
int  irn,
int  jcn,
const void *  val 
)

Definition at line 1276 of file SparseMatrix.c.

References A, FORMAT_COORD, and SparseMatrix_realloc().

Referenced by Agglomerative_Ink_Bundling_establish(), call_tri(), call_tri2(), check_compatibility(), conn_comp(), country_graph_coloring(), edge_distinct_coloring(), get_country_graph(), get_poly_lines(), get_polygon_solids(), matrix_add_entry(), modularity_ink_bundling(), Multilevel_Modularity_Clustering_establish(), and Multilevel_MQ_Clustering_establish().

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

◆ SparseMatrix_copy()

SparseMatrix SparseMatrix_copy ( SparseMatrix  A)

Definition at line 1569 of file SparseMatrix.c.

References A, B, and SparseMatrix_general_new().

Referenced by ideal_distance_matrix(), modularity_clustering(), modularity_ink_bundling(), mq_clustering(), SparseMatrix_symmetrize(), StressMajorizationSmoother_smooth(), and TriangleSmoother_new().

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

◆ SparseMatrix_decompose_to_supervariables()

void SparseMatrix_decompose_to_supervariables ( SparseMatrix  A,
int *  ncluster,
int **  cluster,
int **  clusterp 
)

Definition at line 1675 of file SparseMatrix.c.

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

Referenced by maximal_independent_edge_set_heavest_edge_pernode_supernodes_first().

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

◆ SparseMatrix_delete()

void SparseMatrix_delete ( SparseMatrix  A)

Definition at line 381 of file SparseMatrix.c.

References A, and free().

Referenced by Agglomerative_Ink_Bundling_delete(), Agglomerative_Ink_Bundling_establish(), agglomerative_ink_bundling_internal(), attached_clustering(), bundle(), call_tri(), call_tri2(), check_compatibility(), conn_comp(), country_graph_coloring(), edge_bundling(), edge_distinct_coloring(), get_country_graph(), get_poly_lines(), get_polygon_solids(), get_tri(), improve_contiguity(), main(), make_map_internal(), makeMap(), map_palette_optimal_coloring(), modularity_clustering(), modularity_ink_bundling(), mq_clustering(), Multilevel_coarsen(), Multilevel_delete(), Multilevel_Modularity_Clustering_delete(), Multilevel_Modularity_Clustering_establish(), Multilevel_MQ_Clustering_delete(), Multilevel_MQ_Clustering_establish(), multilevel_spring_electrical_embedding(), node_distinct_coloring(), sfdpLayout(), SparseMatrix_distance_matrix(), SparseMatrix_get_real_adjacency_matrix_symmetrized(), SparseMatrix_import_dot(), SparseMatrix_is_symmetric(), SparseMatrix_multiply(), SparseMatrix_sort(), SparseMatrix_symmetrize(), SparseMatrix_to_square_matrix(), SparseMatrix_transpose(), SparseMatrix_weakly_connected_components(), spring_electrical_embedding(), spring_electrical_embedding_fast(), spring_electrical_embedding_slow(), spring_electrical_spring_embedding(), SpringSmoother_delete(), SpringSmoother_new(), stress_model(), StressMajorizationSmoother2_new(), StressMajorizationSmoother_delete(), StressMajorizationSmoother_smooth(), and TriangleSmoother_new().

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

◆ SparseMatrix_distance_matrix()

void SparseMatrix_distance_matrix ( SparseMatrix  D0,
double **  dist0 
)

Definition at line 2030 of file SparseMatrix.c.

References D, free(), gv_calloc(), SparseMatrix_struct::m, NULL, SparseMatrix_delete(), SparseMatrix_is_symmetric(), SparseMatrix_level_sets(), and SparseMatrix_symmetrize().

Referenced by map_palette_optimal_coloring().

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

◆ SparseMatrix_divide_row_by_degree()

SparseMatrix SparseMatrix_divide_row_by_degree ( SparseMatrix  A)

Definition at line 1464 of file SparseMatrix.c.

References A, SparseMatrix_struct::ia, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, and NULL.

Referenced by Multilevel_coarsen_internal().

Here is the caller graph for this function:

◆ SparseMatrix_export()

void SparseMatrix_export ( FILE *  f,
SparseMatrix  A 
)

Definition at line 520 of file SparseMatrix.c.

References A, FORMAT_COORD, FORMAT_CSR, SparseMatrix_export_coord(), and SparseMatrix_export_csr().

Referenced by map_palette_optimal_coloring().

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

◆ SparseMatrix_export_coord()

static void SparseMatrix_export_coord ( FILE *  f,
SparseMatrix  A 
)
static

Definition at line 458 of file SparseMatrix.c.

References A, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, and MATRIX_TYPE_UNKNOWN.

Referenced by SparseMatrix_export().

Here is the caller graph for this function:

◆ SparseMatrix_export_csr()

static void SparseMatrix_export_csr ( FILE *  f,
SparseMatrix  A 
)
static

Definition at line 389 of file SparseMatrix.c.

References A, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, and MATRIX_TYPE_UNKNOWN.

Referenced by SparseMatrix_export().

Here is the caller graph for this function:

◆ SparseMatrix_from_coordinate_arrays()

SparseMatrix SparseMatrix_from_coordinate_arrays ( int  nz,
int  m,
int  n,
int *  irn,
int *  jcn,
void *  val0,
int  type,
size_t  sz 
)

Definition at line 694 of file SparseMatrix.c.

References SparseMatrix_from_coordinate_arrays_internal(), SUM_REPEATED_ALL, and type.

Referenced by attached_clustering(), get_edge_label_matrix(), Import_coord_clusters_from_dot(), makeMatrix(), Multilevel_coarsen_internal(), nearest_neighbor_graph(), shorting_edge_label_nodes(), SparseMatrix_from_coordinate_format(), SparseMatrix_get_augmented(), SparseMatrix_get_submatrix(), SparseMatrix_import_dot(), and SparseMatrix_import_matrix_market().

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

◆ SparseMatrix_from_coordinate_arrays_internal()

static SparseMatrix SparseMatrix_from_coordinate_arrays_internal ( int  nz,
int  m,
int  n,
int *  irn,
int *  jcn,
void *  val0,
int  type,
size_t  sz,
int  sum_repeated 
)
static

Definition at line 565 of file SparseMatrix.c.

References A, FORMAT_CSR, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, NULL, SparseMatrix_general_new(), SparseMatrix_sum_repeat_entries(), and type.

Referenced by SparseMatrix_from_coordinate_arrays(), and SparseMatrix_from_coordinate_arrays_not_compacted().

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

◆ SparseMatrix_from_coordinate_arrays_not_compacted()

SparseMatrix SparseMatrix_from_coordinate_arrays_not_compacted ( int  nz,
int  m,
int  n,
int *  irn,
int *  jcn,
void *  val0,
int  type,
size_t  sz 
)

Definition at line 699 of file SparseMatrix.c.

References SparseMatrix_from_coordinate_arrays_internal(), SUM_REPEATED_NONE, and type.

Referenced by SparseMatrix_from_coordinate_format_not_compacted().

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

◆ SparseMatrix_from_coordinate_format()

SparseMatrix SparseMatrix_from_coordinate_format ( SparseMatrix  A)

Definition at line 535 of file SparseMatrix.c.

References A, SparseMatrix_struct::a, FORMAT_COORD, NULL, and SparseMatrix_from_coordinate_arrays().

Referenced by Agglomerative_Ink_Bundling_establish(), call_tri(), call_tri2(), check_compatibility(), conn_comp(), country_graph_coloring(), edge_distinct_coloring(), get_country_graph(), modularity_ink_bundling(), Multilevel_Modularity_Clustering_establish(), and Multilevel_MQ_Clustering_establish().

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

◆ SparseMatrix_from_coordinate_format_not_compacted()

SparseMatrix SparseMatrix_from_coordinate_format_not_compacted ( SparseMatrix  A)

Definition at line 550 of file SparseMatrix.c.

References A, SparseMatrix_struct::a, FORMAT_COORD, NULL, and SparseMatrix_from_coordinate_arrays_not_compacted().

Referenced by get_poly_lines(), get_polygon_solids(), and get_tri().

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

◆ SparseMatrix_from_dense()

SparseMatrix SparseMatrix_from_dense ( int  m,
int  n,
double *  x 
)

Definition at line 2007 of file SparseMatrix.c.

References A, FORMAT_CSR, MATRIX_TYPE_REAL, and SparseMatrix_new().

Referenced by map_palette_optimal_coloring().

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

◆ SparseMatrix_general_new()

SparseMatrix SparseMatrix_general_new ( int  m,
int  n,
int  nz,
int  type,
size_t  sz,
int  format 
)

Definition at line 367 of file SparseMatrix.c.

References A, format, SparseMatrix_alloc(), SparseMatrix_init(), and type.

Referenced by SparseMatrix_copy(), and SparseMatrix_from_coordinate_arrays_internal().

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

◆ SparseMatrix_get_augmented()

SparseMatrix SparseMatrix_get_augmented ( SparseMatrix  A)

Definition at line 1773 of file SparseMatrix.c.

References A, B, free(), gv_calloc(), NULL, SparseMatrix_from_coordinate_arrays(), SparseMatrix_set_pattern_symmetric, SparseMatrix_set_symmetric, and type.

Referenced by SparseMatrix_to_square_matrix().

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

◆ SparseMatrix_get_real_adjacency_matrix_symmetrized()

SparseMatrix SparseMatrix_get_real_adjacency_matrix_symmetrized ( SparseMatrix  A)

Definition at line 1513 of file SparseMatrix.c.

References A, B, FORMAT_CSR, gv_calloc(), MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, NULL, SparseMatrix_struct::nz, SparseMatrix_delete(), SparseMatrix_new(), SparseMatrix_remove_diagonal(), and SparseMatrix_symmetrize().

Referenced by Agglomerative_Ink_Bundling_new(), improve_contiguity(), makeMap(), Multilevel_Modularity_Clustering_new(), Multilevel_MQ_Clustering_new(), Multilevel_new(), multilevel_spring_electrical_embedding(), and stress_model().

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

◆ SparseMatrix_get_submatrix()

SparseMatrix SparseMatrix_get_submatrix ( SparseMatrix  A,
int  nrow,
int  ncol,
int *  rindices,
int *  cindices 
)

Definition at line 1838 of file SparseMatrix.c.

References A, B, free(), gv_calloc(), SparseMatrix_struct::ia, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, NULL, and SparseMatrix_from_coordinate_arrays().

Referenced by node_distinct_coloring().

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

◆ SparseMatrix_has_diagonal()

bool SparseMatrix_has_diagonal ( SparseMatrix  A)

Definition at line 1583 of file SparseMatrix.c.

References A.

Referenced by beautify_leaves().

Here is the caller graph for this function:

◆ SparseMatrix_init()

static SparseMatrix SparseMatrix_init ( int  m,
int  n,
int  type,
size_t  sz,
int  format 
)
static

Definition at line 276 of file SparseMatrix.c.

References A, format, FORMAT_COORD, FORMAT_CSR, gv_alloc(), gv_calloc(), NULL, and type.

Referenced by SparseMatrix_general_new(), and SparseMatrix_new().

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

◆ SparseMatrix_is_symmetric()

bool SparseMatrix_is_symmetric ( SparseMatrix  A,
bool  test_pattern_symmetry_only 
)

◆ SparseMatrix_level_sets()

static void SparseMatrix_level_sets ( SparseMatrix  A,
int  root,
int *  nlevel,
int **  levelset_ptr,
int **  levelset,
int **  mask,
bool  reinitialize_mask 
)
static

Definition at line 1595 of file SparseMatrix.c.

References A, gv_calloc(), and UNMASKED.

Referenced by SparseMatrix_distance_matrix(), and SparseMatrix_weakly_connected_components().

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

◆ SparseMatrix_make_undirected()

SparseMatrix SparseMatrix_make_undirected ( SparseMatrix  A)

Definition at line 56 of file SparseMatrix.c.

References A, B, SparseMatrix_remove_upper(), SparseMatrix_set_undirected, and SparseMatrix_symmetrize().

Referenced by main().

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

◆ SparseMatrix_multiply()

SparseMatrix SparseMatrix_multiply ( SparseMatrix  A,
SparseMatrix  B 
)

Definition at line 922 of file SparseMatrix.c.

References A, B, C, FORMAT_CSR, free(), MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, NULL, RETURN, SparseMatrix_delete(), SparseMatrix_new(), and type.

Referenced by Agglomerative_Ink_Bundling_establish(), Multilevel_coarsen(), Multilevel_Modularity_Clustering_establish(), and Multilevel_MQ_Clustering_establish().

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

◆ SparseMatrix_multiply3()

SparseMatrix SparseMatrix_multiply3 ( SparseMatrix  A,
SparseMatrix  B,
SparseMatrix  C 
)

Definition at line 1085 of file SparseMatrix.c.

References A, B, C, D, FORMAT_CSR, free(), id, MATRIX_TYPE_REAL, NULL, RETURN, SparseMatrix_new(), and type.

Referenced by Multilevel_coarsen_internal().

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

◆ SparseMatrix_multiply_dense()

void SparseMatrix_multiply_dense ( SparseMatrix  A,
const double *  v,
double *  res,
int  dim 
)

Definition at line 835 of file SparseMatrix.c.

References A, FORMAT_CSR, and MATRIX_TYPE_REAL.

Referenced by prolongate(), and StressMajorizationSmoother_smooth().

Here is the caller graph for this function:

◆ SparseMatrix_multiply_vector()

void SparseMatrix_multiply_vector ( SparseMatrix  A,
double *  v,
double **  res 
)

Definition at line 858 of file SparseMatrix.c.

References A, FORMAT_CSR, gv_calloc(), MATRIX_TYPE_INTEGER, MATRIX_TYPE_REAL, and NULL.

Referenced by conjugate_gradient(), hierachical_modularity_clustering(), hierachical_mq_clustering(), and power_method().

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

◆ SparseMatrix_new()

SparseMatrix SparseMatrix_new ( int  m,
int  n,
int  nz,
int  type,
int  format 
)

◆ SparseMatrix_realloc()

static SparseMatrix SparseMatrix_realloc ( SparseMatrix  A,
int  nz 
)
static

Definition at line 322 of file SparseMatrix.c.

References A, format, SparseMatrix_struct::format, FORMAT_COORD, FORMAT_CSR, gv_calloc(), and gv_recalloc().

Referenced by SparseMatrix_coordinate_form_add_entry().

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

◆ SparseMatrix_remove_diagonal()

SparseMatrix SparseMatrix_remove_diagonal ( SparseMatrix  A)

Definition at line 1300 of file SparseMatrix.c.

References A, SparseMatrix_struct::ia, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, and NULL.

Referenced by map_palette_optimal_coloring(), modularity_clustering(), mq_clustering(), Multilevel_coarsen_internal(), multilevel_spring_electrical_embedding(), SparseMatrix_get_real_adjacency_matrix_symmetrized(), and stress_model().

Here is the caller graph for this function:

◆ SparseMatrix_remove_upper()

SparseMatrix SparseMatrix_remove_upper ( SparseMatrix  A)

Definition at line 1380 of file SparseMatrix.c.

References A, clear_flag, SparseMatrix_struct::ia, MATRIX_PATTERN_SYMMETRIC, MATRIX_SYMMETRIC, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, and NULL.

Referenced by SparseMatrix_make_undirected().

Here is the caller graph for this function:

◆ SparseMatrix_set_entries_to_real_one()

SparseMatrix SparseMatrix_set_entries_to_real_one ( SparseMatrix  A)

Definition at line 1993 of file SparseMatrix.c.

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

Referenced by modularity_clustering(), and mq_clustering().

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

◆ SparseMatrix_sort()

SparseMatrix SparseMatrix_sort ( SparseMatrix  A)

Definition at line 48 of file SparseMatrix.c.

References A, B, SparseMatrix_delete(), and SparseMatrix_transpose().

Referenced by get_tri().

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

◆ SparseMatrix_sum_repeat_entries()

SparseMatrix SparseMatrix_sum_repeat_entries ( SparseMatrix  A)

Definition at line 1175 of file SparseMatrix.c.

References A, free(), gv_calloc(), SparseMatrix_struct::ia, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, NULL, and type.

Referenced by SparseMatrix_from_coordinate_arrays_internal().

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

◆ SparseMatrix_symmetrize()

SparseMatrix SparseMatrix_symmetrize ( SparseMatrix  A,
bool  pattern_symmetric_only 
)

◆ SparseMatrix_to_square_matrix()

SparseMatrix SparseMatrix_to_square_matrix ( SparseMatrix  A,
int  bipartite_options 
)

Definition at line 1816 of file SparseMatrix.c.

References A, B, BIPARTITE_ALWAYS, BIPARTITE_PATTERN_UNSYM, BIPARTITE_RECT, BIPARTITE_UNSYM, SparseMatrix_delete(), SparseMatrix_get_augmented(), and SparseMatrix_is_symmetric().

Referenced by main().

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

◆ SparseMatrix_transpose()

SparseMatrix SparseMatrix_transpose ( SparseMatrix  A)

Definition at line 63 of file SparseMatrix.c.

References A, B, format, FORMAT_CSR, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, NULL, SparseMatrix_delete(), SparseMatrix_new(), and type.

Referenced by Agglomerative_Ink_Bundling_establish(), improve_contiguity(), Multilevel_coarsen_internal(), Multilevel_Modularity_Clustering_establish(), Multilevel_MQ_Clustering_establish(), SparseMatrix_is_symmetric(), SparseMatrix_sort(), and SparseMatrix_symmetrize().

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

◆ SparseMatrix_weakly_connected_components()

int * SparseMatrix_weakly_connected_components ( SparseMatrix  A0,
int *  ncomp,
int **  comps 
)

Definition at line 1644 of file SparseMatrix.c.

References A, free(), gv_calloc(), NULL, SparseMatrix_delete(), SparseMatrix_is_symmetric(), SparseMatrix_level_sets(), and SparseMatrix_symmetrize().

Referenced by conn_comp(), and node_distinct_coloring().

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