Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
SparseMatrix.h File Reference
#include <sparse/general.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
Include dependency graph for SparseMatrix.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  SparseMatrix_struct
 

Macros

#define SYMMETRY_EPSILON   0.0000001
 
#define SparseMatrix_set_undirected(A)   set_flag((A)->property, MATRIX_UNDIRECTED)
 
#define SparseMatrix_set_symmetric(A)   set_flag((A)->property, MATRIX_SYMMETRIC)
 
#define SparseMatrix_set_pattern_symmetric(A)   set_flag((A)->property, MATRIX_PATTERN_SYMMETRIC)
 
#define SparseMatrix_known_undirected(A)   test_flag((A)->property, MATRIX_UNDIRECTED)
 
#define SparseMatrix_known_symmetric(A)   test_flag((A)->property, MATRIX_SYMMETRIC)
 
#define SparseMatrix_known_strucural_symmetric(A)   test_flag((A)->property, MATRIX_PATTERN_SYMMETRIC)
 

Typedefs

typedef struct SparseMatrix_structSparseMatrix
 

Enumerations

enum  { FORMAT_CSR , FORMAT_COORD }
 
enum  { UNMASKED = -10 , MASKED = 1 }
 
enum  { MATRIX_PATTERN_SYMMETRIC = 1<<0 , MATRIX_SYMMETRIC = 1<<1 , MATRIX_UNDIRECTED = 1<<4 }
 
enum  { BIPARTITE_RECT = 0 , BIPARTITE_PATTERN_UNSYM , BIPARTITE_UNSYM , BIPARTITE_ALWAYS }
 
enum  {
  MATRIX_TYPE_REAL = 1<<0 , MATRIX_TYPE_COMPLEX = 1<<1 , MATRIX_TYPE_INTEGER = 1<<2 , MATRIX_TYPE_PATTERN = 1<<3 ,
  MATRIX_TYPE_UNKNOWN = 1<<4
}
 
enum  { SUM_REPEATED_NONE = 0 , SUM_REPEATED_ALL }
 

Functions

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)
 
SparseMatrix SparseMatrix_from_coordinate_format (SparseMatrix A)
 
SparseMatrix SparseMatrix_from_coordinate_format_not_compacted (SparseMatrix A)
 
SparseMatrix SparseMatrix_from_coordinate_arrays (int nz, int m, int n, int *irn, int *jcn, void *val, int type, size_t sz)
 
SparseMatrix SparseMatrix_from_coordinate_arrays_not_compacted (int nz, int m, int n, int *irn, int *jcn, void *val, int type, size_t sz)
 
void SparseMatrix_export (FILE *f, SparseMatrix A)
 
void SparseMatrix_delete (SparseMatrix A)
 
SparseMatrix SparseMatrix_add (SparseMatrix A, SparseMatrix B)
 
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)
 
bool SparseMatrix_is_symmetric (SparseMatrix A, bool test_pattern_symmetry_only)
 
SparseMatrix SparseMatrix_transpose (SparseMatrix A)
 
SparseMatrix SparseMatrix_symmetrize (SparseMatrix A, bool pattern_symmetric_only)
 
void SparseMatrix_multiply_vector (SparseMatrix A, double *v, double **res)
 
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)
 
void SparseMatrix_multiply_dense (SparseMatrix A, const double *v, double *res, int dim)
 
SparseMatrix SparseMatrix_apply_fun (SparseMatrix A, double(*fun)(double x))
 
SparseMatrix SparseMatrix_copy (SparseMatrix A)
 
bool SparseMatrix_has_diagonal (SparseMatrix A)
 
SparseMatrix SparseMatrix_make_undirected (SparseMatrix A)
 
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_submatrix (SparseMatrix A, int nrow, int ncol, int *rindices, int *cindices)
 
SparseMatrix SparseMatrix_get_augmented (SparseMatrix A)
 
SparseMatrix SparseMatrix_to_square_matrix (SparseMatrix A, int bipartite_options)
 
SparseMatrix SparseMatrix_sort (SparseMatrix A)
 
SparseMatrix SparseMatrix_set_entries_to_real_one (SparseMatrix A)
 
void SparseMatrix_distance_matrix (SparseMatrix A, double **dist_matrix)
 
SparseMatrix SparseMatrix_from_dense (int m, int n, double *x)
 

Macro Definition Documentation

◆ SparseMatrix_known_strucural_symmetric

#define SparseMatrix_known_strucural_symmetric (   A)    test_flag((A)->property, MATRIX_PATTERN_SYMMETRIC)

Definition at line 116 of file SparseMatrix.h.

◆ SparseMatrix_known_symmetric

#define SparseMatrix_known_symmetric (   A)    test_flag((A)->property, MATRIX_SYMMETRIC)

Definition at line 115 of file SparseMatrix.h.

◆ SparseMatrix_known_undirected

#define SparseMatrix_known_undirected (   A)    test_flag((A)->property, MATRIX_UNDIRECTED)

Definition at line 114 of file SparseMatrix.h.

◆ SparseMatrix_set_pattern_symmetric

#define SparseMatrix_set_pattern_symmetric (   A)    set_flag((A)->property, MATRIX_PATTERN_SYMMETRIC)

Definition at line 111 of file SparseMatrix.h.

◆ SparseMatrix_set_symmetric

#define SparseMatrix_set_symmetric (   A)    set_flag((A)->property, MATRIX_SYMMETRIC)

Definition at line 110 of file SparseMatrix.h.

◆ SparseMatrix_set_undirected

#define SparseMatrix_set_undirected (   A)    set_flag((A)->property, MATRIX_UNDIRECTED)

Definition at line 109 of file SparseMatrix.h.

◆ SYMMETRY_EPSILON

#define SYMMETRY_EPSILON   0.0000001

Definition at line 22 of file SparseMatrix.h.

Typedef Documentation

◆ SparseMatrix

Definition at line 43 of file SparseMatrix.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
FORMAT_CSR 
FORMAT_COORD 

Definition at line 23 of file SparseMatrix.h.

◆ anonymous enum

anonymous enum
Enumerator
UNMASKED 
MASKED 

Definition at line 24 of file SparseMatrix.h.

◆ anonymous enum

anonymous enum
Enumerator
MATRIX_PATTERN_SYMMETRIC 
MATRIX_SYMMETRIC 
MATRIX_UNDIRECTED 

Definition at line 25 of file SparseMatrix.h.

◆ anonymous enum

anonymous enum
Enumerator
BIPARTITE_RECT 
BIPARTITE_PATTERN_UNSYM 
BIPARTITE_UNSYM 
BIPARTITE_ALWAYS 

Definition at line 26 of file SparseMatrix.h.

◆ anonymous enum

anonymous enum
Enumerator
MATRIX_TYPE_REAL 
MATRIX_TYPE_COMPLEX 
MATRIX_TYPE_INTEGER 
MATRIX_TYPE_PATTERN 
MATRIX_TYPE_UNKNOWN 

Definition at line 45 of file SparseMatrix.h.

◆ anonymous enum

anonymous enum
Enumerator
SUM_REPEATED_NONE 
SUM_REPEATED_ALL 

Definition at line 67 of file SparseMatrix.h.

Function Documentation

◆ 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_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  A,
double **  dist_matrix 
)

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_from_coordinate_arrays()

SparseMatrix SparseMatrix_from_coordinate_arrays ( int  nz,
int  m,
int  n,
int *  irn,
int *  jcn,
void *  val,
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_not_compacted()

SparseMatrix SparseMatrix_from_coordinate_arrays_not_compacted ( int  nz,
int  m,
int  n,
int *  irn,
int *  jcn,
void *  val,
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_is_symmetric()

bool SparseMatrix_is_symmetric ( SparseMatrix  A,
bool  test_pattern_symmetry_only 
)

◆ 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_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: