Graphviz
2.41.20171026.1811
|
Go to the source code of this file.
Data Structures | |
struct | SparseMatrix_struct |
Typedefs | |
typedef struct SparseMatrix_struct * | SparseMatrix |
Enumerations | |
enum | { FORMAT_CSC, FORMAT_CSR, FORMAT_COORD } |
enum | { UNMASKED = -10, MASKED = 1 } |
enum | { MATRIX_PATTERN_SYMMETRIC = 1<<0, MATRIX_SYMMETRIC = 1<<1, MATRIX_SKEW = 1<<2, MATRIX_HERMITIAN = 1<<3, 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, SUM_REPEATED_REAL_PART, SUM_REPEATED_IMAGINARY_PART, SUM_IMGINARY_KEEP_LAST_REAL } |
#define SparseMatrix_clear_hemitian | ( | A | ) | clear_flag((A)->property, MATRIX_HERMITIAN) |
Definition at line 172 of file SparseMatrix.h.
#define SparseMatrix_clear_pattern_symmetric | ( | A | ) | clear_flag((A)->property, MATRIX_PATTERN_SYMMETRIC) |
Definition at line 170 of file SparseMatrix.h.
#define SparseMatrix_clear_skew | ( | A | ) | clear_flag((A)->property, MATRIX_SKEW) |
Definition at line 171 of file SparseMatrix.h.
#define SparseMatrix_clear_symmetric | ( | A | ) | clear_flag((A)->property, MATRIX_SYMMETRIC) |
Definition at line 169 of file SparseMatrix.h.
#define SparseMatrix_clear_undirected | ( | A | ) | clear_flag((A)->property, MATRIX_UNDIRECTED) |
Definition at line 168 of file SparseMatrix.h.
#define SparseMatrix_known_hemitian | ( | A | ) | test_flag((A)->property, MATRIX_HERMITIAN) |
Definition at line 179 of file SparseMatrix.h.
#define SparseMatrix_known_skew | ( | A | ) | test_flag((A)->property, MATRIX_SKEW) |
Definition at line 178 of file SparseMatrix.h.
#define SparseMatrix_known_strucural_symmetric | ( | A | ) | test_flag((A)->property, MATRIX_PATTERN_SYMMETRIC) |
Definition at line 177 of file SparseMatrix.h.
Referenced by SparseMatrix_is_symmetric().
#define SparseMatrix_known_symmetric | ( | A | ) | test_flag((A)->property, MATRIX_SYMMETRIC) |
Definition at line 176 of file SparseMatrix.h.
Referenced by SparseMatrix_is_symmetric().
#define SparseMatrix_known_undirected | ( | A | ) | test_flag((A)->property, MATRIX_UNDIRECTED) |
Definition at line 175 of file SparseMatrix.h.
Referenced by makeDotGraph().
#define SparseMatrix_set_hemitian | ( | A | ) | set_flag((A)->property, MATRIX_HERMITIAN) |
Definition at line 165 of file SparseMatrix.h.
#define SparseMatrix_set_pattern_symmetric | ( | A | ) | set_flag((A)->property, MATRIX_PATTERN_SYMMETRIC) |
Definition at line 163 of file SparseMatrix.h.
Referenced by DistanceMatrix_restrict_cluster(), SparseMatrix_get_augmented(), SparseMatrix_is_symmetric(), SparseMatrix_symmetrize(), and SparseMatrix_symmetrize_nodiag().
#define SparseMatrix_set_skew | ( | A | ) | set_flag((A)->property, MATRIX_SKEW) |
Definition at line 164 of file SparseMatrix.h.
#define SparseMatrix_set_symmetric | ( | A | ) | set_flag((A)->property, MATRIX_SYMMETRIC) |
Definition at line 162 of file SparseMatrix.h.
Referenced by DistanceMatrix_restrict_cluster(), SparseMatrix_get_augmented(), SparseMatrix_is_symmetric(), SparseMatrix_symmetrize(), and SparseMatrix_symmetrize_nodiag().
#define SparseMatrix_set_undirected | ( | A | ) | set_flag((A)->property, MATRIX_UNDIRECTED) |
Definition at line 161 of file SparseMatrix.h.
Referenced by SparseMatrix_make_undirected().
#define SYMMETRY_EPSILON 0.0000001 |
Definition at line 19 of file SparseMatrix.h.
Referenced by SparseMatrix_is_symmetric().
typedef struct SparseMatrix_struct* SparseMatrix |
Definition at line 40 of file SparseMatrix.h.
anonymous enum |
Enumerator | |
---|---|
FORMAT_CSC | |
FORMAT_CSR | |
FORMAT_COORD |
Definition at line 20 of file SparseMatrix.h.
anonymous enum |
Enumerator | |
---|---|
UNMASKED | |
MASKED |
Definition at line 21 of file SparseMatrix.h.
anonymous enum |
Enumerator | |
---|---|
MATRIX_PATTERN_SYMMETRIC | |
MATRIX_SYMMETRIC | |
MATRIX_SKEW | |
MATRIX_HERMITIAN | |
MATRIX_UNDIRECTED |
Definition at line 22 of file SparseMatrix.h.
anonymous enum |
Enumerator | |
---|---|
BIPARTITE_RECT | |
BIPARTITE_PATTERN_UNSYM | |
BIPARTITE_UNSYM | |
BIPARTITE_ALWAYS |
Definition at line 23 of file SparseMatrix.h.
anonymous enum |
Enumerator | |
---|---|
MATRIX_TYPE_REAL | |
MATRIX_TYPE_COMPLEX | |
MATRIX_TYPE_INTEGER | |
MATRIX_TYPE_PATTERN | |
MATRIX_TYPE_UNKNOWN |
Definition at line 42 of file SparseMatrix.h.
anonymous enum |
Enumerator | |
---|---|
SUM_REPEATED_NONE | |
SUM_REPEATED_ALL | |
SUM_REPEATED_REAL_PART | |
SUM_REPEATED_IMAGINARY_PART | |
SUM_IMGINARY_KEEP_LAST_REAL |
Definition at line 82 of file SparseMatrix.h.
SparseMatrix SparseMatrix_add | ( | SparseMatrix | A, |
SparseMatrix | B | ||
) |
Definition at line 966 of file SparseMatrix.c.
References SparseMatrix_struct::a, assert, C, for(), SparseMatrix_struct::format, FORMAT_CSR, FREE, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MALLOC, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, SparseMatrix_struct::n, NULL, SparseMatrix_struct::nz, real, SparseMatrix_new(), and SparseMatrix_struct::type.
Referenced by SparseMatrix_symmetrize(), SparseMatrix_symmetrize_nodiag(), StressMajorizationSmoother_smooth(), and TriangleSmoother_new().
SparseMatrix SparseMatrix_apply_fun | ( | SparseMatrix | A, |
double(*)(double x) | fun | ||
) |
Definition at line 2355 of file SparseMatrix.c.
References SparseMatrix_struct::a, for(), SparseMatrix_struct::format, FORMAT_CSR, SparseMatrix_struct::ia, SparseMatrix_struct::m, MATRIX_TYPE_REAL, real, and SparseMatrix_struct::type.
SparseMatrix SparseMatrix_apply_fun_general | ( | SparseMatrix | A, |
void(*)(int i, int j, int n, double *x) | fun | ||
) |
Definition at line 2378 of file SparseMatrix.c.
References SparseMatrix_struct::a, for(), SparseMatrix_struct::format, FORMAT_CSR, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_REAL, real, and SparseMatrix_struct::type.
SparseMatrix SparseMatrix_complement | ( | SparseMatrix | A, |
int | undirected | ||
) |
Definition at line 3332 of file SparseMatrix.c.
References assert, FREE, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MALLOC, MATRIX_TYPE_PATTERN, SparseMatrix_struct::n, NULL, SparseMatrix_struct::nz, SparseMatrix_delete(), SparseMatrix_from_coordinate_arrays(), SparseMatrix_symmetrize(), and TRUE.
int SparseMatrix_connectedQ | ( | SparseMatrix | A | ) |
Definition at line 2854 of file SparseMatrix.c.
References FALSE, FREE, SparseMatrix_struct::m, SparseMatrix_struct::n, NULL, SparseMatrix_delete(), SparseMatrix_is_symmetric(), SparseMatrix_level_sets(), SparseMatrix_symmetrize(), and TRUE.
SparseMatrix SparseMatrix_coordinate_form_add_entries | ( | SparseMatrix | A, |
int | nentries, | ||
int * | irn, | ||
int * | jcn, | ||
void * | val | ||
) |
Definition at line 1968 of file SparseMatrix.c.
References SparseMatrix_struct::a, assert, SparseMatrix_struct::format, FORMAT_COORD, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MAX, MEMCPY, SparseMatrix_struct::n, SparseMatrix_struct::nz, SparseMatrix_struct::nzmax, and SparseMatrix_struct::size.
Referenced by call_tri(), call_tri2(), Multilevel_MQ_Clustering_establish(), SparseMatrix_distance_matrix_k_centers(), and SparseMatrix_distance_matrix_khops().
SparseMatrix SparseMatrix_copy | ( | SparseMatrix | A | ) |
Definition at line 2471 of file SparseMatrix.c.
References SparseMatrix_struct::a, SparseMatrix_struct::format, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MEMCPY, SparseMatrix_struct::n, SparseMatrix_struct::nz, SparseMatrix_struct::property, SparseMatrix_struct::size, SparseMatrix_general_new(), and SparseMatrix_struct::type.
Referenced by ideal_distance_matrix(), modularity_clustering(), mq_clustering(), SparseMatrix_delete_sparse_columns(), SparseMatrix_symmetrize(), SparseMatrix_symmetrize_nodiag(), StressMajorizationSmoother_smooth(), and TriangleSmoother_new().
SparseMatrix SparseMatrix_crop | ( | SparseMatrix | A, |
real | epsilon | ||
) |
Definition at line 2402 of file SparseMatrix.c.
References SparseMatrix_struct::a, ABS, for(), SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, NULL, SparseMatrix_struct::nz, real, and SparseMatrix_struct::type.
void SparseMatrix_decompose_to_supervariables | ( | SparseMatrix | A, |
int * | ncluster, | ||
int ** | cluster, | ||
int ** | clusterp | ||
) |
Definition at line 2875 of file SparseMatrix.c.
References FREE, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MALLOC, SparseMatrix_struct::n, and NULL.
void SparseMatrix_delete | ( | SparseMatrix | A | ) |
Definition at line 411 of file SparseMatrix.c.
References SparseMatrix_struct::a, FREE, SparseMatrix_struct::ia, and SparseMatrix_struct::ja.
Referenced by attached_clustering(), call_tri(), call_tri2(), DistanceMatrix_restrict_cluster(), main(), modularity_clustering(), mq_clustering(), Multilevel_coarsen(), Multilevel_delete(), Multilevel_MQ_Clustering_delete(), Multilevel_MQ_Clustering_establish(), SparseMatrix_complement(), SparseMatrix_connectedQ(), SparseMatrix_delete_sparse_columns(), SparseMatrix_distance_matrix(), SparseMatrix_distance_matrix_k_centers(), SparseMatrix_distance_matrix_khops(), SparseMatrix_get_real_adjacency_matrix_symmetrized(), SparseMatrix_is_symmetric(), SparseMatrix_k_centers(), SparseMatrix_k_centers_user(), SparseMatrix_multiply(), SparseMatrix_multiply3(), SparseMatrix_pseudo_diameter_unweighted(), SparseMatrix_pseudo_diameter_weighted(), SparseMatrix_sort(), SparseMatrix_symmetrize(), SparseMatrix_symmetrize_nodiag(), 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(), spring_maxent_embedding(), SpringSmoother_delete(), SpringSmoother_new(), stress_model_core(), StressMajorizationSmoother2_new(), StressMajorizationSmoother_delete(), StressMajorizationSmoother_smooth(), TriangleSmoother_new(), and uniform_stress().
SparseMatrix SparseMatrix_delete_empty_columns | ( | SparseMatrix | A, |
int ** | new2old, | ||
int * | nnew, | ||
int | inplace | ||
) |
Definition at line 3314 of file SparseMatrix.c.
References SparseMatrix_delete_sparse_columns().
SparseMatrix SparseMatrix_delete_sparse_columns | ( | SparseMatrix | A, |
int | threshold, | ||
int ** | new2old, | ||
int * | nnew, | ||
int | inplace | ||
) |
Definition at line 3264 of file SparseMatrix.c.
References assert, FREE, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MALLOC, SparseMatrix_struct::n, SparseMatrix_copy(), SparseMatrix_delete(), and SparseMatrix_transpose().
Referenced by SparseMatrix_delete_empty_columns().
int SparseMatrix_distance_matrix | ( | SparseMatrix | A, |
int | weighted, | ||
real ** | dist_matrix | ||
) |
Definition at line 3655 of file SparseMatrix.c.
References assert, FALSE, FREE, SparseMatrix_struct::m, MALLOC, SparseMatrix_struct::n, NULL, real, SparseMatrix_delete(), SparseMatrix_is_symmetric(), SparseMatrix_level_sets(), SparseMatrix_symmetrize(), and TRUE.
SparseMatrix SparseMatrix_distance_matrix_k_centers | ( | int | K, |
SparseMatrix | D, | ||
int | weighted | ||
) |
Definition at line 3709 of file SparseMatrix.c.
References assert, C, FALSE, FORMAT_COORD, FREE, SparseMatrix_struct::m, MATRIX_TYPE_REAL, SparseMatrix_struct::n, NULL, real, SparseMatrix_coordinate_form_add_entries(), SparseMatrix_delete(), SparseMatrix_from_coordinate_format(), SparseMatrix_k_centers(), and SparseMatrix_new().
SparseMatrix SparseMatrix_distance_matrix_khops | ( | int | khops, |
SparseMatrix | A, | ||
int | weighted | ||
) |
Definition at line 3747 of file SparseMatrix.c.
References assert, C, FALSE, FORMAT_COORD, FREE, SparseMatrix_struct::m, MALLOC, MATRIX_TYPE_REAL, SparseMatrix_struct::n, NULL, real, SparseMatrix_coordinate_form_add_entries(), SparseMatrix_delete(), SparseMatrix_from_coordinate_format(), SparseMatrix_is_symmetric(), SparseMatrix_level_sets_khops(), SparseMatrix_new(), SparseMatrix_symmetrize(), and TRUE.
SparseMatrix SparseMatrix_divide_row_by_degree | ( | SparseMatrix | A | ) |
Definition at line 2159 of file SparseMatrix.c.
References SparseMatrix_struct::a, assert, for(), SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, NULL, real, and SparseMatrix_struct::type.
SparseMatrix SparseMatrix_exclude_submatrix | ( | SparseMatrix | A, |
int | nrow, | ||
int | ncol, | ||
int * | rindices, | ||
int * | cindices | ||
) |
Definition at line 3195 of file SparseMatrix.c.
References FREE, SparseMatrix_struct::m, MALLOC, SparseMatrix_struct::n, and SparseMatrix_get_submatrix().
void SparseMatrix_export | ( | FILE * | f, |
SparseMatrix | A | ||
) |
Definition at line 778 of file SparseMatrix.c.
References assert, SparseMatrix_struct::format, FORMAT_COORD, FORMAT_CSC, and FORMAT_CSR.
void SparseMatrix_export_binary | ( | char * | name, |
SparseMatrix | A, | ||
int * | flag | ||
) |
Definition at line 646 of file SparseMatrix.c.
References SparseMatrix_export_binary_fp().
void SparseMatrix_export_binary_fp | ( | FILE * | f, |
SparseMatrix | A | ||
) |
Definition at line 626 of file SparseMatrix.c.
References SparseMatrix_struct::a, SparseMatrix_struct::format, FORMAT_COORD, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, SparseMatrix_struct::n, SparseMatrix_struct::nz, SparseMatrix_struct::nzmax, SparseMatrix_struct::property, SparseMatrix_struct::size, and SparseMatrix_struct::type.
Referenced by SparseMatrix_export_binary().
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 957 of file SparseMatrix.c.
References SUM_REPEATED_ALL.
Referenced by attached_clustering(), DistanceMatrix_restrict_cluster(), Import_coord_clusters_from_dot(), makeMatrix(), SparseMatrix_complement(), SparseMatrix_from_coordinate_format(), SparseMatrix_get_augmented(), SparseMatrix_get_submatrix(), and SparseMatrix_import_dot().
SparseMatrix SparseMatrix_from_coordinate_arrays_not_compacted | ( | int | nz, |
int | m, | ||
int | n, | ||
int * | irn, | ||
int * | jcn, | ||
void * | val, | ||
int | type, | ||
size_t | sz, | ||
int | what_to_sum | ||
) |
Definition at line 962 of file SparseMatrix.c.
Referenced by SparseMatrix_from_coordinate_format_not_compacted().
SparseMatrix SparseMatrix_from_coordinate_format | ( | SparseMatrix | A | ) |
Definition at line 797 of file SparseMatrix.c.
References SparseMatrix_struct::a, assert, SparseMatrix_struct::format, FORMAT_COORD, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, SparseMatrix_struct::n, NULL, SparseMatrix_struct::nz, SparseMatrix_struct::size, SparseMatrix_from_coordinate_arrays(), and SparseMatrix_struct::type.
Referenced by call_tri(), call_tri2(), Multilevel_MQ_Clustering_establish(), SparseMatrix_distance_matrix_k_centers(), and SparseMatrix_distance_matrix_khops().
SparseMatrix SparseMatrix_from_coordinate_format_not_compacted | ( | SparseMatrix | A, |
int | what_to_sum | ||
) |
Definition at line 812 of file SparseMatrix.c.
References SparseMatrix_struct::a, assert, SparseMatrix_struct::format, FORMAT_COORD, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, SparseMatrix_struct::n, NULL, SparseMatrix_struct::nz, SparseMatrix_struct::size, SparseMatrix_from_coordinate_arrays_not_compacted(), and SparseMatrix_struct::type.
SparseMatrix SparseMatrix_from_dense | ( | int | m, |
int | n, | ||
real * | x | ||
) |
Definition at line 3631 of file SparseMatrix.c.
References SparseMatrix_struct::a, for(), FORMAT_CSR, SparseMatrix_struct::ia, SparseMatrix_struct::ja, MATRIX_TYPE_REAL, SparseMatrix_struct::nz, real, and SparseMatrix_new().
Definition at line 397 of file SparseMatrix.c.
Referenced by SparseMatrix_copy(), and SparseMatrix_import_binary_fp().
SparseMatrix SparseMatrix_get_augmented | ( | SparseMatrix | A | ) |
Definition at line 2974 of file SparseMatrix.c.
References SparseMatrix_struct::a, assert, FREE, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MALLOC, MEMCPY, SparseMatrix_struct::n, NULL, SparseMatrix_struct::nz, SparseMatrix_struct::size, SparseMatrix_from_coordinate_arrays(), SparseMatrix_set_pattern_symmetric, SparseMatrix_set_symmetric, and SparseMatrix_struct::type.
Referenced by SparseMatrix_to_square_matrix().
SparseMatrix SparseMatrix_get_real_adjacency_matrix_symmetrized | ( | SparseMatrix | A | ) |
Definition at line 2208 of file SparseMatrix.c.
References SparseMatrix_struct::a, for(), FORMAT_CSR, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MALLOC, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MEMCPY, SparseMatrix_struct::n, NULL, SparseMatrix_struct::nz, real, SparseMatrix_struct::size, SparseMatrix_delete(), SparseMatrix_new(), SparseMatrix_remove_diagonal(), SparseMatrix_symmetrize(), TRUE, and SparseMatrix_struct::type.
Referenced by get_distance_matrix(), Multilevel_MQ_Clustering_new(), Multilevel_new(), and stress_model_core().
SparseMatrix SparseMatrix_get_submatrix | ( | SparseMatrix | A, |
int | nrow, | ||
int | ncol, | ||
int * | rindices, | ||
int * | cindices | ||
) |
Definition at line 3040 of file SparseMatrix.c.
References SparseMatrix_struct::a, FREE, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MALLOC, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, SparseMatrix_struct::n, NULL, real, SparseMatrix_struct::size, SparseMatrix_from_coordinate_arrays(), and SparseMatrix_struct::type.
Referenced by SparseMatrix_exclude_submatrix(), and SparseMatrix_largest_component().
int SparseMatrix_has_diagonal | ( | SparseMatrix | A | ) |
Definition at line 2483 of file SparseMatrix.c.
References FALSE, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, and TRUE.
SparseMatrix SparseMatrix_import_binary | ( | char * | name | ) |
Definition at line 707 of file SparseMatrix.c.
References NULL, and SparseMatrix_import_binary_fp().
SparseMatrix SparseMatrix_import_binary_fp | ( | FILE * | f | ) |
Definition at line 662 of file SparseMatrix.c.
References SparseMatrix_struct::a, FORMAT_COORD, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, NULL, SparseMatrix_struct::nz, SparseMatrix_struct::property, SparseMatrix_struct::size, and SparseMatrix_general_new().
Referenced by SparseMatrix_import_binary().
int SparseMatrix_is_symmetric | ( | SparseMatrix | A, |
int | test_pattern_symmetry_only | ||
) |
Definition at line 178 of file SparseMatrix.c.
References SparseMatrix_struct::a, ABS, assert, FALSE, SparseMatrix_struct::format, FORMAT_CSR, FREE, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MALLOC, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, SparseMatrix_struct::n, real, SparseMatrix_delete(), SparseMatrix_known_strucural_symmetric, SparseMatrix_known_symmetric, SparseMatrix_set_pattern_symmetric, SparseMatrix_set_symmetric, SparseMatrix_transpose(), SYMMETRY_EPSILON, TRUE, and SparseMatrix_struct::type.
Referenced by average_edge_length(), ideal_distance_matrix(), Multilevel_MQ_Clustering_init(), Multilevel_MQ_Clustering_new(), Multilevel_new(), SparseMatrix_connectedQ(), SparseMatrix_distance_matrix(), SparseMatrix_distance_matrix_khops(), SparseMatrix_k_centers(), SparseMatrix_k_centers_user(), SparseMatrix_pseudo_diameter_unweighted(), SparseMatrix_pseudo_diameter_weighted(), SparseMatrix_symmetrize(), SparseMatrix_symmetrize_nodiag(), SparseMatrix_to_square_matrix(), SparseMatrix_weakly_connected_components(), SparseStressMajorizationSmoother_new(), SpringSmoother_new(), stress_model_core(), StressMajorizationSmoother2_new(), TriangleSmoother_new(), uniform_stress(), and UniformStressSmoother_new().
int SparseMatrix_k_centers | ( | SparseMatrix | D, |
int | weighted, | ||
int | K, | ||
int | root, | ||
int ** | centers, | ||
int | centering, | ||
real ** | dist | ||
) |
Definition at line 3372 of file SparseMatrix.c.
References assert, FALSE, FREE, SparseMatrix_struct::m, MALLOC, MIN, SparseMatrix_struct::n, NULL, real, SparseMatrix_delete(), SparseMatrix_is_symmetric(), SparseMatrix_level_sets(), SparseMatrix_pseudo_diameter_unweighted(), SparseMatrix_pseudo_diameter_weighted(), SparseMatrix_symmetrize(), and TRUE.
Referenced by SparseMatrix_distance_matrix_k_centers().
int SparseMatrix_k_centers_user | ( | SparseMatrix | D, |
int | weighted, | ||
int | K, | ||
int * | centers_user, | ||
int | centering, | ||
real ** | dist | ||
) |
Definition at line 3515 of file SparseMatrix.c.
References assert, FALSE, FREE, SparseMatrix_struct::m, MALLOC, MIN, SparseMatrix_struct::n, NULL, real, SparseMatrix_delete(), SparseMatrix_is_symmetric(), SparseMatrix_level_sets(), SparseMatrix_pseudo_diameter_unweighted(), SparseMatrix_pseudo_diameter_weighted(), SparseMatrix_symmetrize(), and TRUE.
void SparseMatrix_kcore_decomposition | ( | SparseMatrix | A, |
int * | coreness_max0, | ||
int ** | coreness_ptr0, | ||
int ** | coreness_list0 | ||
) |
void SparseMatrix_kcoreness | ( | SparseMatrix | A, |
int ** | coreness | ||
) |
void SparseMatrix_khair_decomposition | ( | SparseMatrix | A, |
int * | hairness_max0, | ||
int ** | hairness_ptr0, | ||
int ** | hairness_list0 | ||
) |
void SparseMatrix_khairness | ( | SparseMatrix | A, |
int ** | hairness | ||
) |
SparseMatrix SparseMatrix_largest_component | ( | SparseMatrix | A | ) |
Definition at line 3234 of file SparseMatrix.c.
References BIPARTITE_RECT, FREE, NULL, SparseMatrix_get_submatrix(), SparseMatrix_to_square_matrix(), and SparseMatrix_weakly_connected_components().
void SparseMatrix_level_sets | ( | SparseMatrix | A, |
int | root, | ||
int * | nlevel, | ||
int ** | levelset_ptr, | ||
int ** | levelset, | ||
int ** | mask, | ||
int | reintialize_mask | ||
) |
Definition at line 2545 of file SparseMatrix.c.
References SparseMatrix_level_sets_internal().
Referenced by SparseMatrix_connectedQ(), SparseMatrix_distance_matrix(), SparseMatrix_k_centers(), SparseMatrix_k_centers_user(), SparseMatrix_pseudo_diameter_unweighted(), and SparseMatrix_weakly_connected_components().
void SparseMatrix_level_sets_khops | ( | int | khops, |
SparseMatrix | A, | ||
int | root, | ||
int * | nlevel, | ||
int ** | levelset_ptr, | ||
int ** | levelset, | ||
int ** | mask, | ||
int | reintialize_mask | ||
) |
Definition at line 2552 of file SparseMatrix.c.
References SparseMatrix_level_sets_internal().
Referenced by SparseMatrix_distance_matrix_khops().
SparseMatrix SparseMatrix_make_undirected | ( | SparseMatrix | A | ) |
Definition at line 62 of file SparseMatrix.c.
References FALSE, SparseMatrix_remove_upper(), SparseMatrix_set_undirected, and SparseMatrix_symmetrize().
SparseMatrix SparseMatrix_multiply | ( | SparseMatrix | A, |
SparseMatrix | B | ||
) |
Definition at line 1401 of file SparseMatrix.c.
References SparseMatrix_struct::a, assert, C, for(), SparseMatrix_struct::format, FORMAT_CSR, FREE, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MALLOC, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, SparseMatrix_struct::n, NULL, SparseMatrix_struct::nz, real, SparseMatrix_delete(), SparseMatrix_new(), and SparseMatrix_struct::type.
Referenced by Multilevel_coarsen(), and Multilevel_MQ_Clustering_establish().
SparseMatrix SparseMatrix_multiply3 | ( | SparseMatrix | A, |
SparseMatrix | B, | ||
SparseMatrix | C | ||
) |
Definition at line 1567 of file SparseMatrix.c.
References SparseMatrix_struct::a, assert, SparseMatrix_struct::format, FORMAT_CSR, FREE, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MALLOC, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, SparseMatrix_struct::n, NULL, SparseMatrix_struct::nz, real, SparseMatrix_delete(), SparseMatrix_new(), and SparseMatrix_struct::type.
Referenced by DistanceMatrix_restrict_cluster().
SparseMatrix SparseMatrix_multiply_by_scaler | ( | SparseMatrix | A, |
real | s | ||
) |
Definition at line 1355 of file SparseMatrix.c.
References SparseMatrix_struct::a, assert, for(), SparseMatrix_struct::format, FORMAT_CSR, FREE, SparseMatrix_struct::ia, SparseMatrix_struct::m, MALLOC, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_REAL, NULL, SparseMatrix_struct::nz, real, and SparseMatrix_struct::type.
void SparseMatrix_multiply_dense | ( | SparseMatrix | A, |
int | ATranspose, | ||
real * | v, | ||
int | vTransposed, | ||
real ** | res, | ||
int | res_transpose, | ||
int | dim | ||
) |
Definition at line 1192 of file SparseMatrix.c.
Referenced by StressMajorizationSmoother_smooth().
void SparseMatrix_multiply_vector | ( | SparseMatrix | A, |
real * | v, | ||
real ** | res, | ||
int | transposed | ||
) |
Definition at line 1217 of file SparseMatrix.c.
References SparseMatrix_struct::a, assert, SparseMatrix_struct::format, FORMAT_CSR, SparseMatrix_struct::ia, if(), SparseMatrix_struct::ja, SparseMatrix_struct::m, MALLOC, MATRIX_TYPE_INTEGER, MATRIX_TYPE_REAL, SparseMatrix_struct::n, NULL, real, and SparseMatrix_struct::type.
Referenced by Operator_matmul_apply(), and Operator_uniform_stress_matmul_apply().
Definition at line 384 of file SparseMatrix.c.
Referenced by call_tri(), call_tri2(), Multilevel_MQ_Clustering_establish(), SparseMatrix_add(), SparseMatrix_distance_matrix_k_centers(), SparseMatrix_distance_matrix_khops(), SparseMatrix_from_dense(), SparseMatrix_get_real_adjacency_matrix_symmetrized(), SparseMatrix_import_dot(), SparseMatrix_multiply(), SparseMatrix_multiply3(), SparseMatrix_transpose(), SparseStressMajorizationSmoother_new(), SpringSmoother_new(), StressMajorizationSmoother2_new(), and UniformStressSmoother_new().
SparseMatrix SparseMatrix_normalize_by_row | ( | SparseMatrix | A | ) |
Definition at line 2272 of file SparseMatrix.c.
References SparseMatrix_struct::a, ABS, for(), SparseMatrix_struct::format, FORMAT_CSR, SparseMatrix_struct::ia, SparseMatrix_struct::m, MATRIX_TYPE_REAL, MAX, max, real, and SparseMatrix_struct::type.
SparseMatrix SparseMatrix_normalize_to_rowsum1 | ( | SparseMatrix | A | ) |
Definition at line 2243 of file SparseMatrix.c.
References SparseMatrix_struct::a, for(), SparseMatrix_struct::format, FORMAT_CSR, SparseMatrix_struct::ia, SparseMatrix_struct::m, MATRIX_TYPE_REAL, real, and SparseMatrix_struct::type.
void SparseMatrix_page_rank | ( | SparseMatrix | A, |
real | teleport_probablity, | ||
int | weighted, | ||
real | epsilon, | ||
real ** | page_rank | ||
) |
Definition at line 4081 of file SparseMatrix.c.
References SparseMatrix_struct::a, ABS, assert, FALSE, FREE, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MACHINEACC, MALLOC, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, MAX, MEMCPY, SparseMatrix_struct::n, NULL, real, SparseMatrix_struct::type, and Verbose.
void SparseMatrix_print | ( | char * | , |
SparseMatrix | A | ||
) |
Definition at line 536 of file SparseMatrix.c.
References assert, SparseMatrix_struct::format, FORMAT_COORD, FORMAT_CSC, FORMAT_CSR, SparseMatrix_print_coord(), and SparseMatrix_print_csr().
real SparseMatrix_pseudo_diameter_only | ( | SparseMatrix | A | ) |
Definition at line 2849 of file SparseMatrix.c.
References FALSE, and SparseMatrix_pseudo_diameter_unweighted().
real SparseMatrix_pseudo_diameter_unweighted | ( | SparseMatrix | A0, |
int | root, | ||
int | aggressive, | ||
int * | end1, | ||
int * | end2, | ||
int * | connectedQ | ||
) |
Definition at line 2796 of file SparseMatrix.c.
References assert, FALSE, FREE, int, SparseMatrix_struct::m, MIN, NULL, real, SparseMatrix_delete(), SparseMatrix_is_symmetric(), SparseMatrix_level_sets(), SparseMatrix_pseudo_diameter_unweighted(), SparseMatrix_symmetrize(), and TRUE.
Referenced by SparseMatrix_k_centers(), SparseMatrix_k_centers_user(), SparseMatrix_pseudo_diameter_only(), and SparseMatrix_pseudo_diameter_unweighted().
real SparseMatrix_pseudo_diameter_weighted | ( | SparseMatrix | A0, |
int | root, | ||
int | aggressive, | ||
int * | end1, | ||
int * | end2, | ||
int * | connectedQ | ||
) |
Definition at line 2732 of file SparseMatrix.c.
References ABS, assert, FALSE, FREE, SparseMatrix_struct::m, MALLOC, MAX, SparseMatrix_struct::n, NULL, real, SparseMatrix_delete(), SparseMatrix_is_symmetric(), SparseMatrix_pseudo_diameter_weighted(), SparseMatrix_symmetrize(), and TRUE.
Referenced by SparseMatrix_k_centers(), SparseMatrix_k_centers_user(), and SparseMatrix_pseudo_diameter_weighted().
SparseMatrix SparseMatrix_remove_diagonal | ( | SparseMatrix | A | ) |
Definition at line 1993 of file SparseMatrix.c.
References SparseMatrix_struct::a, for(), SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, NULL, SparseMatrix_struct::nz, real, and SparseMatrix_struct::type.
Referenced by DistanceMatrix_restrict_cluster(), modularity_clustering(), mq_clustering(), SparseMatrix_get_real_adjacency_matrix_symmetrized(), SparseMatrix_symmetrize_nodiag(), and stress_model_core().
SparseMatrix SparseMatrix_remove_upper | ( | SparseMatrix | A | ) |
Definition at line 2073 of file SparseMatrix.c.
References SparseMatrix_struct::a, clear_flag, for(), SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MATRIX_HERMITIAN, MATRIX_PATTERN_SYMMETRIC, MATRIX_SKEW, MATRIX_SYMMETRIC, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, NULL, SparseMatrix_struct::nz, SparseMatrix_struct::property, real, and SparseMatrix_struct::type.
Referenced by SparseMatrix_make_undirected().
SparseMatrix SparseMatrix_scaled_by_vector | ( | SparseMatrix | A, |
real * | v, | ||
int | apply_to_row | ||
) |
Definition at line 1324 of file SparseMatrix.c.
References SparseMatrix_struct::a, assert, SparseMatrix_struct::format, FORMAT_CSR, SparseMatrix_struct::ia, if(), SparseMatrix_struct::ja, SparseMatrix_struct::m, MATRIX_TYPE_REAL, real, and SparseMatrix_struct::type.
SparseMatrix SparseMatrix_set_entries_to_real_one | ( | SparseMatrix | A | ) |
Definition at line 3318 of file SparseMatrix.c.
References SparseMatrix_struct::a, FREE, MALLOC, MATRIX_TYPE_REAL, SparseMatrix_struct::nz, real, SparseMatrix_struct::size, and SparseMatrix_struct::type.
Referenced by modularity_clustering(), and mq_clustering().
SparseMatrix SparseMatrix_sort | ( | SparseMatrix | A | ) |
Definition at line 54 of file SparseMatrix.c.
References SparseMatrix_delete(), and SparseMatrix_transpose().
SparseMatrix SparseMatrix_sum_repeat_entries | ( | SparseMatrix | A, |
int | what_to_sum | ||
) |
Definition at line 1769 of file SparseMatrix.c.
References SparseMatrix_struct::a, assert, for(), FREE, SparseMatrix_struct::ia, if(), int, SparseMatrix_struct::ja, SparseMatrix_struct::m, MALLOC, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, MAX, MIN, SparseMatrix_struct::n, NULL, SparseMatrix_struct::nz, real, SUM_IMGINARY_KEEP_LAST_REAL, SUM_REPEATED_ALL, SUM_REPEATED_IMAGINARY_PART, SUM_REPEATED_NONE, SUM_REPEATED_REAL_PART, SparseMatrix_struct::type, xmax, xmin, ymax, and ymin.
SparseMatrix SparseMatrix_symmetrize | ( | SparseMatrix | A, |
int | pattern_symmetric_only | ||
) |
Definition at line 151 of file SparseMatrix.c.
References NULL, SparseMatrix_add(), SparseMatrix_copy(), SparseMatrix_delete(), SparseMatrix_is_symmetric(), SparseMatrix_set_pattern_symmetric, SparseMatrix_set_symmetric, and SparseMatrix_transpose().
Referenced by call_tri(), call_tri2(), get_distance_matrix(), modularity_clustering(), mq_clustering(), SparseMatrix_complement(), SparseMatrix_connectedQ(), SparseMatrix_distance_matrix(), SparseMatrix_distance_matrix_khops(), SparseMatrix_get_real_adjacency_matrix_symmetrized(), SparseMatrix_k_centers(), SparseMatrix_k_centers_user(), SparseMatrix_make_undirected(), SparseMatrix_pseudo_diameter_unweighted(), SparseMatrix_pseudo_diameter_weighted(), SparseMatrix_weakly_connected_components(), spring_electrical_embedding(), spring_electrical_embedding_fast(), spring_electrical_embedding_slow(), spring_electrical_spring_embedding(), spring_maxent_embedding(), and stress_model_core().
SparseMatrix SparseMatrix_symmetrize_nodiag | ( | SparseMatrix | A, |
int | pattern_symmetric_only | ||
) |
Definition at line 163 of file SparseMatrix.c.
References NULL, SparseMatrix_add(), SparseMatrix_copy(), SparseMatrix_delete(), SparseMatrix_is_symmetric(), SparseMatrix_remove_diagonal(), SparseMatrix_set_pattern_symmetric, SparseMatrix_set_symmetric, and SparseMatrix_transpose().
Referenced by Multilevel_new().
SparseMatrix SparseMatrix_to_square_matrix | ( | SparseMatrix | A, |
int | bipartite_options | ||
) |
Definition at line 3018 of file SparseMatrix.c.
References assert, BIPARTITE_ALWAYS, BIPARTITE_PATTERN_UNSYM, BIPARTITE_RECT, BIPARTITE_UNSYM, FALSE, SparseMatrix_struct::m, SparseMatrix_struct::n, SparseMatrix_delete(), SparseMatrix_get_augmented(), SparseMatrix_is_symmetric(), and TRUE.
Referenced by SparseMatrix_largest_component().
SparseMatrix SparseMatrix_transpose | ( | SparseMatrix | A | ) |
Definition at line 69 of file SparseMatrix.c.
References SparseMatrix_struct::a, assert, SparseMatrix_struct::format, FORMAT_CSR, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MATRIX_TYPE_UNKNOWN, SparseMatrix_struct::n, NULL, SparseMatrix_struct::nz, real, SparseMatrix_delete(), SparseMatrix_new(), and SparseMatrix_struct::type.
Referenced by Multilevel_MQ_Clustering_establish(), SparseMatrix_delete_sparse_columns(), SparseMatrix_is_symmetric(), SparseMatrix_sort(), SparseMatrix_symmetrize(), and SparseMatrix_symmetrize_nodiag().
void SparseMatrix_weakly_connected_components | ( | SparseMatrix | A0, |
int * | ncomp, | ||
int ** | comps, | ||
int ** | comps_ptr | ||
) |
Definition at line 2558 of file SparseMatrix.c.
References FALSE, FREE, SparseMatrix_struct::m, MALLOC, NULL, SparseMatrix_delete(), SparseMatrix_is_symmetric(), SparseMatrix_level_sets(), SparseMatrix_symmetrize(), and TRUE.
Referenced by SparseMatrix_largest_component().