From: Matthew Fernandez Date: Thu, 20 May 2021 03:25:03 +0000 (-0700) Subject: remove unused improve_antibandwidth_by_swapping_for_fortran X-Git-Tag: 2.47.3~33^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c52775333f8491d713404445caa52e6b9e22a70;p=graphviz remove unused improve_antibandwidth_by_swapping_for_fortran --- diff --git a/cmd/gvmap/country_graph_coloring.c b/cmd/gvmap/country_graph_coloring.c index bc954df86..dc7cb0f23 100644 --- a/cmd/gvmap/country_graph_coloring.c +++ b/cmd/gvmap/country_graph_coloring.c @@ -338,53 +338,3 @@ void country_graph_coloring_internal(int seed, SparseMatrix A, int **p, real *no void country_graph_coloring(int seed, SparseMatrix A, int **p, real *norm_1){ country_graph_coloring_internal(seed, A, p, norm_1, DO_SWAPPING); } - -void improve_antibandwidth_by_swapping_for_fortran(int *n, int *nz, int *ja, int *ia, int *p, int *aprof, int *verbose){ - /* n: dimension - nz: number of nonzeros - ja: array of size nz, holds column indices. 1- based - ia: array of size n+1, position of row starts. 1-based. - p: holds the position of row/col i in the permuted matrix. 1-based - aprof: aprof[0] is the antiband width on entry. aprof[1] is the abtiband on exit - Verbose: a flag, when set to nonzero, will print the input matrix, as well as others things. - */ - SparseMatrix A, A2; - real norm1[3]; - int i, j, jj; - clock_t start; - real cpu; - - Verbose = *verbose; - A = SparseMatrix_new(*n, *n, 1, MATRIX_TYPE_PATTERN, FORMAT_COORD); - - for (i = 0; i < *n; i++){ - for (j = ia[i] - 1; j < ia[i+1] - 1; j++){ - jj = ja[j] - 1; - A = SparseMatrix_coordinate_form_add_entries(A, 1, &i, &jj, NULL); - } - } - A2 = SparseMatrix_from_coordinate_format(A); - if (Verbose && 0) SparseMatrix_print("A = ",A2); - - SparseMatrix_delete(A); - A = SparseMatrix_symmetrize(A2, TRUE); - - for (i = 0; i < *n; i++) p[i]--; - - ia = A->ia; ja = A->ja; - get_12_norm(*n, ia, ja, p, norm1); - if (Verbose) fprintf(stderr,"on entry antibandwidth = %f\n", norm1[0]); - aprof[0] = (int) norm1[0]; - - start = clock(); - improve_antibandwidth_by_swapping(A, p); - cpu = (clock() - start)/(CLOCKS_PER_SEC); - fprintf(stderr,"cpu = %f\n", cpu); - - get_12_norm(*n, ia, ja, p, norm1); - if (Verbose) fprintf(stderr,"on exit antibandwidth = %f\n", norm1[0]); - aprof[1] = (int) norm1[0]; - SparseMatrix_delete(A); - SparseMatrix_delete(A2); - for (i = 0; i < *n; i++) p[i]++; -} diff --git a/cmd/gvmap/country_graph_coloring.h b/cmd/gvmap/country_graph_coloring.h index c604e4067..578b43955 100644 --- a/cmd/gvmap/country_graph_coloring.h +++ b/cmd/gvmap/country_graph_coloring.h @@ -17,8 +17,6 @@ enum {DO_SWAPPING = 1, DO_SWAPPING_CHEAP}; void country_graph_coloring(int seed, SparseMatrix A, int **p, real *norm_1); -void improve_antibandwidth_by_swapping_for_fortran(int *n, int *nz, int *ja, int *ia, int *p, int *aprof, int *Verbose); - void improve_antibandwidth_by_swapping(SparseMatrix A, int *p); #endif