[med-svn] [Git][med-team/igraph][master] 2 commits: Upstream patches relaxing tests to enable building on all architectures

Andreas Tille gitlab at salsa.debian.org
Mon Apr 20 20:32:49 BST 2020



Andreas Tille pushed to branch master at Debian Med / igraph


Commits:
e0852e57 by Andreas Tille at 2020-04-20T21:21:55+02:00
Upstream patches relaxing tests to enable building on all architectures

- - - - -
8a4f570b by Andreas Tille at 2020-04-20T21:25:15+02:00
Upload to unstable

- - - - -


11 changed files:

- debian/changelog
- + debian/patches/01-fix-adjacency-spectral-embedding.patch
- + debian/patches/02-fix-scg2-test-case.patch
- + debian/patches/03-fix-igraph-i-gml-tostring-static-var.patch
- + debian/patches/04-fix-igraph-layout-merge2-test-case.patch
- + debian/patches/05-canonical-scg-grouping.patch
- + debian/patches/06-canonical-scg-eigenvectors.patch
- + debian/patches/07-canonical-infomap.patch
- + debian/patches/08-infomap-test-relaxation.patch
- + debian/patches/09-hrg-test-relaxation.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,8 +1,11 @@
-igraph (0.8.1+ds-2) UNRELEASED; urgency=medium
+igraph (0.8.1+ds-2) unstable; urgency=medium
 
   * Drop --with-external-f2c (thanks for the hint to Szabolcs Horvát)
+  
+  [ Tamás Nepusz ]
+  * Upstream patches relaxing tests to enable building on all architectures
 
- -- Andreas Tille <tille at debian.org>  Thu, 16 Apr 2020 19:11:44 +0200
+ -- Andreas Tille <tille at debian.org>  Mon, 20 Apr 2020 21:22:20 +0200
 
 igraph (0.8.1+ds-1) unstable; urgency=medium
 


=====================================
debian/patches/01-fix-adjacency-spectral-embedding.patch
=====================================
@@ -0,0 +1,118 @@
+From 55f88af60e7d65e158226c0328eca38b6cd539d0 Mon Sep 17 00:00:00 2001
+From: Tamas Nepusz <ntamas at gmail.com>
+Date: Thu, 16 Apr 2020 20:26:39 +0200
+Subject: [PATCH] fix igraph_adjacency_spectral_embedding() test case
+
+---
+ .../igraph_adjacency_spectral_embedding.c     |  8 +++-
+ .../igraph_adjacency_spectral_embedding.out   | 40 +++++++++----------
+ examples/tests/test_utilities.inc             | 25 ++++++++++++
+ 3 files changed, 51 insertions(+), 22 deletions(-)
+
+diff --git a/examples/simple/igraph_adjacency_spectral_embedding.c b/examples/simple/igraph_adjacency_spectral_embedding.c
+index 2d0066c46..dea2a0ca3 100644
+--- a/examples/simple/igraph_adjacency_spectral_embedding.c
++++ b/examples/simple/igraph_adjacency_spectral_embedding.c
+@@ -23,6 +23,8 @@
+ 
+ #include <igraph.h>
+ 
++#include "../tests/test_utilities.inc"
++
+ /*
+ 
+     R
+@@ -56,9 +58,11 @@ int main() {
+                                         /*scaled=*/ 0, &U, &V, /*D=*/ 0,
+                                         &cvec, &options);
+ 
+-    igraph_matrix_printf(&U, "%8.4f");
++    /* eigenvectors are in the columns of U and V; make sure that the
++     * first row contains positive values */
++    print_matrix_first_row_positive(&U, "%8.4f");
+     printf("--\n");
+-    igraph_matrix_printf(&V, "%8.4f");
++    print_matrix_first_row_positive(&V, "%8.4f");
+ 
+     igraph_vector_destroy(&cvec);
+     igraph_matrix_destroy(&V);
+diff --git a/examples/simple/igraph_adjacency_spectral_embedding.out b/examples/simple/igraph_adjacency_spectral_embedding.out
+index 2e1ede0c4..78e52cf12 100644
+--- a/examples/simple/igraph_adjacency_spectral_embedding.out
++++ b/examples/simple/igraph_adjacency_spectral_embedding.out
+@@ -1,21 +1,21 @@
+- -0.5877   0.0000   0.7948   0.0000
+- -0.5689   0.7015  -0.4032   0.0000
+- -0.5689  -0.7015  -0.4032   0.0000
+- -0.0330   0.0000   0.1302   0.0000
+- -0.0320   0.0511  -0.0660   0.1236
+- -0.0320   0.0511  -0.0660   0.5430
+- -0.0320   0.0511  -0.0660  -0.6667
+- -0.0320  -0.0511  -0.0660   0.1819
+- -0.0320  -0.0511  -0.0660  -0.4038
+- -0.0320  -0.0511  -0.0660   0.2219
++  0.5877   0.0000   0.7948   0.0000
++  0.5689   0.7015  -0.4032   0.0000
++  0.5689  -0.7015  -0.4032   0.0000
++  0.0330   0.0000   0.1302   0.0000
++  0.0320   0.0511  -0.0660   0.1236
++  0.0320   0.0511  -0.0660   0.5430
++  0.0320   0.0511  -0.0660  -0.6667
++  0.0320  -0.0511  -0.0660   0.1819
++  0.0320  -0.0511  -0.0660  -0.4038
++  0.0320  -0.0511  -0.0660   0.2219
+ --
+- -0.2914   0.0000   0.6560   0.0000
+- -0.5705   0.5262  -0.0063   0.0000
+- -0.5705  -0.5262  -0.0063   0.0000
+- -0.1997   0.0000   0.4732   0.0000
+- -0.1934   0.2727  -0.2400   0.1236
+- -0.1934   0.2727  -0.2400   0.5430
+- -0.1934   0.2727  -0.2400  -0.6667
+- -0.1934  -0.2727  -0.2400   0.1819
+- -0.1934  -0.2727  -0.2400  -0.4038
+- -0.1934  -0.2727  -0.2400   0.2219
++  0.2914   0.0000   0.6560   0.0000
++  0.5705   0.5262  -0.0063   0.0000
++  0.5705  -0.5262  -0.0063   0.0000
++  0.1997   0.0000   0.4732   0.0000
++  0.1934   0.2727  -0.2400   0.1236
++  0.1934   0.2727  -0.2400   0.5430
++  0.1934   0.2727  -0.2400  -0.6667
++  0.1934  -0.2727  -0.2400   0.1819
++  0.1934  -0.2727  -0.2400  -0.4038
++  0.1934  -0.2727  -0.2400   0.2219
+diff --git a/examples/tests/test_utilities.inc b/examples/tests/test_utilities.inc
+index 5df221b58..99140e2a4 100644
+--- a/examples/tests/test_utilities.inc
++++ b/examples/tests/test_utilities.inc
+@@ -57,4 +57,29 @@ void print_graph(const igraph_t *graph, FILE *f) {
+     fprintf(f, "}\n");
+ }
+ 
++/* Print a matrix, ensuring that the first row contains positive elements only.
++ * Useful when the columns are eigenvectors. */
++void print_matrix_first_row_positive(const igraph_matrix_t *matrix, const char* format) {
++    igraph_matrix_t copy;
++    long i, j, nrow, ncol;
++
++    igraph_matrix_copy(&copy, matrix);
++
++    nrow = igraph_matrix_nrow(&copy);
++    ncol = igraph_matrix_ncol(&copy);
++
++    if (nrow > 0) {
++        for (i = 0; i < ncol; i++) {
++            if (MATRIX(copy, 0, i) < 0) {
++                for (j = 0; j < nrow; j++) {
++                    MATRIX(copy, j, i) *= -1;
++                }
++            }
++        }
++    }
++
++    igraph_matrix_printf(&copy, format);
++    igraph_matrix_destroy(&copy);
++}
++
+ #endif /* TEST_UTILITIES_INC */


=====================================
debian/patches/02-fix-scg2-test-case.patch
=====================================
@@ -0,0 +1,92 @@
+From e3f48fe9241a6ff97b439f58720123c07b2aebb4 Mon Sep 17 00:00:00 2001
+From: Tamas Nepusz <ntamas at gmail.com>
+Date: Thu, 16 Apr 2020 20:46:36 +0200
+Subject: [PATCH] ignore numeric inaccuracy in examples/simple/scg2.c test case
+
+---
+ examples/simple/scg2.c   | 27 +++++++++++++++++++++++++++
+ examples/simple/scg2.out |  8 ++++----
+ 2 files changed, 31 insertions(+), 4 deletions(-)
+
+diff --git a/examples/simple/scg2.c b/examples/simple/scg2.c
+index aca184587..f54fc8de6 100644
+--- a/examples/simple/scg2.c
++++ b/examples/simple/scg2.c
+@@ -63,6 +63,31 @@ int main() {
+                               &Lsparse, &Rsparse);               \
+     } while (0)
+ 
++#define FIXSMALL(eps) do { \
++	long int i, j, ncol, nrow; \
++	ncol = igraph_vector_complex_size(&eval); \
++	for (i = 0; i < ncol; i++) { \
++		if (fabs((double)IGRAPH_REAL(VECTOR(eval)[i])) < eps) { \
++			IGRAPH_REAL(VECTOR(eval)[i]) = 0; \
++		} \
++		if (fabs((double)IGRAPH_IMAG(VECTOR(eval)[i])) < eps) { \
++			IGRAPH_IMAG(VECTOR(eval)[i]) = 0; \
++		} \
++	} \
++	nrow = igraph_matrix_complex_nrow(&evec); \
++	ncol = igraph_matrix_complex_ncol(&evec); \
++	for (i = 0; i < nrow; i++) { \
++		for (j = 0; j < ncol; j++) { \
++			if (fabs((double)IGRAPH_REAL(MATRIX(evec, i, j))) < eps) { \
++				IGRAPH_REAL(MATRIX(evec, i, j)) = 0; \
++			} \
++			if (fabs((double)IGRAPH_IMAG(MATRIX(evec, i, j))) < eps) { \
++				IGRAPH_IMAG(MATRIX(evec, i, j)) = 0; \
++			} \
++		} \
++	} \
++    } while (0)
++
+ #define PRINTRES()                      \
+     do {                              \
+         printf("--------------------------------\n");       \
+@@ -91,6 +116,7 @@ int main() {
+ 
+     VECTOR(ev)[0] = 3;
+     CALLSTO();
++	FIXSMALL(1e-10);
+     PRINTRES();
+     igraph_destroy(&scg_graph);
+     igraph_sparsemat_destroy(&scg_sparsemat);
+@@ -101,6 +127,7 @@ int main() {
+     VECTOR(ev)[0] = 1;
+     VECTOR(ev)[1] = 3;
+     CALLSTO();
++	FIXSMALL(1e-10);
+     PRINTRES();
+     igraph_destroy(&scg_graph);
+     igraph_sparsemat_destroy(&scg_sparsemat);
+diff --git a/examples/simple/scg2.out b/examples/simple/scg2.out
+index 6b83919e1..509a3f03a 100644
+--- a/examples/simple/scg2.out
++++ b/examples/simple/scg2.out
+@@ -44,10 +44,10 @@ col 0: locations 0 to 0
+ 2 3 1 2 4 4 4 0 0 0
+ ---
+ 0.866025+0i
+--3.14295e-16+0i
++0+0i
+ 0.316228+0i
+ -0.316228+0i
+--3.26134e-16+0i
++0+0i
+ 0.365148+0i
+ 0.365148+0i
+ 0.365148+0i
+@@ -106,10 +106,10 @@ col 4: locations 8 to 8
+ 2 3 1 2 4 4 4 0 0 0
+ ---
+ 1+0i 0.866025+0i
+--0.316228+0i -3.14295e-16+0i
++-0.316228+0i 0+0i
+ -0.316228+0i 0.316228+0i
+ -0.316228+0i -0.316228+0i
+--0.316228+0i -3.26134e-16+0i
++-0.316228+0i 0+0i
+ -0.316228+0i 0.365148+0i
+ -0.316228+0i 0.365148+0i
+ -0.316228+0i 0.365148+0i


=====================================
debian/patches/03-fix-igraph-i-gml-tostring-static-var.patch
=====================================
@@ -0,0 +1,23 @@
+From f03d9142577f035a878e81b0cdab334974d35d00 Mon Sep 17 00:00:00 2001
+From: Tamas Nepusz <ntamas at gmail.com>
+Date: Thu, 16 Apr 2020 21:27:10 +0200
+Subject: [PATCH] fixed igraph_i_gml_tostring() that accidentally returned the
+ address of a local variable
+
+---
+ src/foreign.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/foreign.c b/src/foreign.c
+index 38dbd0b05..6019b93c8 100644
+--- a/src/foreign.c
++++ b/src/foreign.c
+@@ -1028,7 +1028,7 @@ static igraph_real_t igraph_i_gml_toreal(igraph_gml_tree_t *node, long int pos)
+ static const char *igraph_i_gml_tostring(igraph_gml_tree_t *node, long int pos) {
+ 
+     int type = igraph_gml_tree_type(node, pos);
+-    char tmp[256];
++    static char tmp[256];
+     const char *p = tmp;
+     long int i;
+     igraph_real_t d;


=====================================
debian/patches/04-fix-igraph-layout-merge2-test-case.patch
=====================================
@@ -0,0 +1,88 @@
+From c7fa48790b35a5c5bcd2739ee4f177084061a454 Mon Sep 17 00:00:00 2001
+From: Tamas Nepusz <ntamas at gmail.com>
+Date: Thu, 16 Apr 2020 21:27:25 +0200
+Subject: [PATCH] fixed igraph_layout_merge2() test case; MDS layout was
+ unstable so we use a circle now
+
+---
+ examples/simple/igraph_layout_merge2.c   | 19 ++++++++++++-----
+ examples/simple/igraph_layout_merge2.out | 26 ++++++++++++------------
+ 2 files changed, 27 insertions(+), 18 deletions(-)
+
+diff --git a/examples/simple/igraph_layout_merge2.c b/examples/simple/igraph_layout_merge2.c
+index 9420d7faa..999e86a0c 100644
+--- a/examples/simple/igraph_layout_merge2.c
++++ b/examples/simple/igraph_layout_merge2.c
+@@ -28,6 +28,7 @@ int main() {
+     igraph_matrix_t small_coords, big_coords, merged_coords;
+     igraph_vector_ptr_t graph_ptr, coords_ptr;
+     igraph_arpack_options_t arpack_opts;
++    long int i, j, nrow, ncol;
+ 
+     /* To make things reproducible */
+     igraph_rng_seed(igraph_rng_default(), 42);
+@@ -43,12 +44,10 @@ int main() {
+     igraph_arpack_options_init(&arpack_opts);
+ 
+     igraph_matrix_init(&big_coords, 0, 0);
+-    igraph_layout_mds(&big, &big_coords, /*dist=*/ 0, /*dim=*/ 2,
+-                      &arpack_opts);
++    igraph_layout_circle(&big, &big_coords, igraph_vss_all());
+ 
+     igraph_matrix_init(&small_coords, 0, 0);
+-    igraph_layout_mds(&small, &small_coords, /*dist=*/ 0, /*dim=*/ 2,
+-                      &arpack_opts);
++    igraph_layout_circle(&small, &small_coords, igraph_vss_all());
+ 
+     igraph_vector_ptr_init(&graph_ptr, 2);
+     igraph_vector_ptr_init(&coords_ptr, 2);
+@@ -60,7 +59,17 @@ int main() {
+ 
+     igraph_layout_merge_dla(&graph_ptr, &coords_ptr, &merged_coords);
+ 
+-    igraph_matrix_print(&merged_coords);
++    nrow = igraph_matrix_nrow(&merged_coords);
++    ncol = igraph_matrix_ncol(&merged_coords);
++    for (i = 0; i < nrow; i++) {
++        for (j = 0; j < ncol; j++) {
++            if (fabs((double)MATRIX(merged_coords, i, j)) < 1e-8) {
++                MATRIX(merged_coords, i, j) = 0;
++            }
++        }
++    }
++
++    igraph_matrix_printf(&merged_coords, "%.4f");
+ 
+     igraph_matrix_destroy(&merged_coords);
+     igraph_matrix_destroy(&small_coords);
+diff --git a/examples/simple/igraph_layout_merge2.out b/examples/simple/igraph_layout_merge2.out
+index dfe2c224b..12f15619e 100644
+--- a/examples/simple/igraph_layout_merge2.out
++++ b/examples/simple/igraph_layout_merge2.out
+@@ -1,13 +1,13 @@
+--2.73912 -2.95429
+--0.479512 -4.00008
+-1.96326 -3.51798
+-3.65613 -1.69214
+-3.95248 0.780051
+-2.73912 2.95429
+-0.479512 4.00008
+--1.96326 3.51798
+--3.65613 1.69214
+--3.95248 -0.780051
+--1.6061 6.30088
+--4.92661 5.80435
+--3.69637 8.92826
++4.0748 0.0000
++3.2966 2.3951
++1.2592 3.8754
++-1.2592 3.8754
++-3.2966 2.3951
++-4.0748 0.0000
++-3.2966 -2.3951
++-1.2592 -3.8754
++1.2592 -3.8754
++3.2966 -2.3951
++-1.7741 7.3663
++-4.7586 9.0894
++-4.7586 5.6432


=====================================
debian/patches/05-canonical-scg-grouping.patch
=====================================
@@ -0,0 +1,618 @@
+From ea59c9a4bd6696ef4621ec549d9aa91bd47a6713 Mon Sep 17 00:00:00 2001
+From: Tamas Nepusz <ntamas at gmail.com>
+Date: Fri, 17 Apr 2020 19:13:06 +0200
+Subject: [PATCH] SCG: canonicalize the calculated groupings to make the test
+ cases deterministic
+
+---
+ examples/simple/igraph_scg_grouping.out       |   2 +-
+ examples/simple/igraph_scg_grouping2.out      |   4 +-
+ examples/simple/igraph_scg_grouping3.out      |   6 +-
+ examples/simple/igraph_scg_grouping4.out      |   8 +-
+ .../simple/igraph_scg_semiprojectors2.out     |  12 +-
+ .../simple/igraph_scg_semiprojectors3.out     |  12 +-
+ examples/simple/scg2.out                      | 160 +++++++--------
+ examples/simple/scg3.out                      | 190 +++++++++---------
+ src/scg.c                                     |   3 +
+ 9 files changed, 200 insertions(+), 197 deletions(-)
+
+diff --git a/examples/simple/igraph_scg_grouping.out b/examples/simple/igraph_scg_grouping.out
+index fde1be9b7..087cec53a 100644
+--- a/examples/simple/igraph_scg_grouping.out
++++ b/examples/simple/igraph_scg_grouping.out
+@@ -1 +1 @@
+-0 1 3 2 4 4 3 5 3 3 5 0 3 0 5 1 1 0 0 4 0 4 4 1 4 4 5 0 4 0 1 1 1 0 4 5 5 3 1 5 3 5 1 4 1 4 5 1 3 0 4 4 4 5 5 4 5 1 0 1 1 4 5 2 2 2 0 1 1 4 4 5 2 4 4 3 1 0 4 2 4 1 2 1 3 0 2 1 4 4 3 2 4 5 1 5 3 4 0 5 4 1 4 0 3 4 0 0 2 4 2 5 1 0 1 3 4 2 1 2 3 5 2 2 5 2 4 4 4 0 1 4 2 3 0 4 4 1 5 4 5 2 3 4 4 4 4 4 4 4 1 3 2 0 4 1 0 4 1 0 4 1 0 5 5 1 4 3 2 4 5 2 2 1 4 0 2 3 4 1 4 0 0 1 2 5 2 1 4 0 0 1 1 5 5 2 2 2 4 2 1 0 1 5 2 2 0 1 3 4 1 5 1 2 5 2 4 2 0 1 0 1 5 4 0 4 0 4 1 4 1 5 1 5 2 4 5 0 4 0 3 4 1 4 1 5 0 4 4 2 5 2 1 3 1 1 4 1 0 1 2 3 1 5 4 4 1 1 5 1 3 5 1 4 1 1 1 0 1 5 0 0 1 2 4 0 4 3 0 5 0 4 2 4 3 4 5 0 5 5 2 1 2 4 1 2 2 1 5 4 0 2 5 5 3 1 5 5 0 0 4 5 3 5 1 1 5 3 3 3 3 4 2 3 2 0 1 1 1 4 5 4 4 1 1 1 2 2 2 3 3 4 5 2 1 2 3 4 1 0 1 1 0 0 3 5 4 1 2 3 3 1 1 4 4 1 2 4 0 2 1 4 4 4 3 4 4 3 3 4 4 4 3 1 3 2 4 2 1 3 3 4 3 1 4 5 4 4 3 0 0 4 5 5 0 1 5 1 1 3 4 4 4 1 4 3 0 2 2 3 5 3 2 1 3 4 1 4 1 4 4 1 0 4 3 2 1 0 5 1 1 4 2 2 3 0 2 4 2 1 2 1 1 4 2 3 5 5 4 1 5 4 4 4 5 0 1 3 3 2 1 4 1 1 5 2 2 2 5 2 2 4 0 2 2 1 3 0 5 5 5 4 0 4 0 4 0 2 1 0 3 3 2 1 1 4 2 5 1 3 2 1 4 4 3 1 5 1 2 2 3 1 0 5 0 5 3 4 4 1 4 1 1 5 4 1 0 5 2 4 4 1 3 4 1 4 5 5 1 2 1 4 4 5 3 5 5 0 5 2 1 4 5 0 4 4 2 1 2 5 4 1 1 5 5 1 2 3 2 1 1 2 4 0 5 5 5 0 4 3 2 4 1 4 5 5 2 3 1 4 1 5 4 1 3 1 2 1 1 4 3 4 1 5 1 5 5 4 2 2 5 1 5 1 1 0 2 5 4 4 2 1 1 4 4 4 5 2 3 0 1 0 4 2 4 1 1 4 4 3 2 0 3 2 2 1 4 3 2 0 4 4 3 0 4 1 2 0 1 4 1 4 1 0 3 2 3 3 1 2 1 4 2 2 3 0 0 4 4 1 1 4 0 5 2 4 4 5 1 2 4 2 2 5 3 4 1 2 3 4 2 0 1 4 5 1 0 4 5 1 1 4 0 5 4 4 0 2 0 4 3 1 2 0 5 5 1 1 0 3 4 5 4 5 1 4 2 1 4 4 3 1 2 4 2 5 0 2 2 4 3 5 4 3 0 0 1 2 1 1 5 1 1 5 0 1 3 4 1 2 4 5 1 1 0 2 4 1 5 4 1 5 1 2 3 0 4 1 4 4 4 5 4 1 0 5 5 5 5 1 5 4 5 3 4 1 2 1 4 2 3 5 5 5 5 5 2 4 0 4 1 1 0 1 5 5 4 4 0 4 5 0 1 1 3 5 2 4 3 0 1 0 3 4 1 4 4 4 1 1 1 1 1 5 5 0 1 2 3 3 5 3 5 4 2 5 2 5 3 1 4 2 4 1 1 4 1 4 4 0 3 1 3 3 2 4 3 3 3 5 3 0 2 1 3 5 4 2 5 3 5 1 4 0 4 0 5 2 4 1 1 3 1 0 4 1 3 4 2 4 3 4 1 4 1 0 0 0 5 4 3 4 1 3 2 3 0 4 4 3 3 0 3 4 0 4 5 1 3 4 1 2 0 2 3 3 4 2 4 3 1 4 1 1 1 1 4 4 2 2 1 1 1 4 0 1 1 1 1 4
++0 1 2 3 4 4 2 5 2 2 5 0 2 0 5 1 1 0 0 4 0 4 4 1 4 4 5 0 4 0 1 1 1 0 4 5 5 2 1 5 2 5 1 4 1 4 5 1 2 0 4 4 4 5 5 4 5 1 0 1 1 4 5 3 3 3 0 1 1 4 4 5 3 4 4 2 1 0 4 3 4 1 3 1 2 0 3 1 4 4 2 3 4 5 1 5 2 4 0 5 4 1 4 0 2 4 0 0 3 4 3 5 1 0 1 2 4 3 1 3 2 5 3 3 5 3 4 4 4 0 1 4 3 2 0 4 4 1 5 4 5 3 2 4 4 4 4 4 4 4 1 2 3 0 4 1 0 4 1 0 4 1 0 5 5 1 4 2 3 4 5 3 3 1 4 0 3 2 4 1 4 0 0 1 3 5 3 1 4 0 0 1 1 5 5 3 3 3 4 3 1 0 1 5 3 3 0 1 2 4 1 5 1 3 5 3 4 3 0 1 0 1 5 4 0 4 0 4 1 4 1 5 1 5 3 4 5 0 4 0 2 4 1 4 1 5 0 4 4 3 5 3 1 2 1 1 4 1 0 1 3 2 1 5 4 4 1 1 5 1 2 5 1 4 1 1 1 0 1 5 0 0 1 3 4 0 4 2 0 5 0 4 3 4 2 4 5 0 5 5 3 1 3 4 1 3 3 1 5 4 0 3 5 5 2 1 5 5 0 0 4 5 2 5 1 1 5 2 2 2 2 4 3 2 3 0 1 1 1 4 5 4 4 1 1 1 3 3 3 2 2 4 5 3 1 3 2 4 1 0 1 1 0 0 2 5 4 1 3 2 2 1 1 4 4 1 3 4 0 3 1 4 4 4 2 4 4 2 2 4 4 4 2 1 2 3 4 3 1 2 2 4 2 1 4 5 4 4 2 0 0 4 5 5 0 1 5 1 1 2 4 4 4 1 4 2 0 3 3 2 5 2 3 1 2 4 1 4 1 4 4 1 0 4 2 3 1 0 5 1 1 4 3 3 2 0 3 4 3 1 3 1 1 4 3 2 5 5 4 1 5 4 4 4 5 0 1 2 2 3 1 4 1 1 5 3 3 3 5 3 3 4 0 3 3 1 2 0 5 5 5 4 0 4 0 4 0 3 1 0 2 2 3 1 1 4 3 5 1 2 3 1 4 4 2 1 5 1 3 3 2 1 0 5 0 5 2 4 4 1 4 1 1 5 4 1 0 5 3 4 4 1 2 4 1 4 5 5 1 3 1 4 4 5 2 5 5 0 5 3 1 4 5 0 4 4 3 1 3 5 4 1 1 5 5 1 3 2 3 1 1 3 4 0 5 5 5 0 4 2 3 4 1 4 5 5 3 2 1 4 1 5 4 1 2 1 3 1 1 4 2 4 1 5 1 5 5 4 3 3 5 1 5 1 1 0 3 5 4 4 3 1 1 4 4 4 5 3 2 0 1 0 4 3 4 1 1 4 4 2 3 0 2 3 3 1 4 2 3 0 4 4 2 0 4 1 3 0 1 4 1 4 1 0 2 3 2 2 1 3 1 4 3 3 2 0 0 4 4 1 1 4 0 5 3 4 4 5 1 3 4 3 3 5 2 4 1 3 2 4 3 0 1 4 5 1 0 4 5 1 1 4 0 5 4 4 0 3 0 4 2 1 3 0 5 5 1 1 0 2 4 5 4 5 1 4 3 1 4 4 2 1 3 4 3 5 0 3 3 4 2 5 4 2 0 0 1 3 1 1 5 1 1 5 0 1 2 4 1 3 4 5 1 1 0 3 4 1 5 4 1 5 1 3 2 0 4 1 4 4 4 5 4 1 0 5 5 5 5 1 5 4 5 2 4 1 3 1 4 3 2 5 5 5 5 5 3 4 0 4 1 1 0 1 5 5 4 4 0 4 5 0 1 1 2 5 3 4 2 0 1 0 2 4 1 4 4 4 1 1 1 1 1 5 5 0 1 3 2 2 5 2 5 4 3 5 3 5 2 1 4 3 4 1 1 4 1 4 4 0 2 1 2 2 3 4 2 2 2 5 2 0 3 1 2 5 4 3 5 2 5 1 4 0 4 0 5 3 4 1 1 2 1 0 4 1 2 4 3 4 2 4 1 4 1 0 0 0 5 4 2 4 1 2 3 2 0 4 4 2 2 0 2 4 0 4 5 1 2 4 1 3 0 3 2 2 4 3 4 2 1 4 1 1 1 1 4 4 3 3 1 1 1 4 0 1 1 1 1 4
+diff --git a/examples/simple/igraph_scg_grouping2.out b/examples/simple/igraph_scg_grouping2.out
+index 54b0ed2d3..31407d3aa 100644
+--- a/examples/simple/igraph_scg_grouping2.out
++++ b/examples/simple/igraph_scg_grouping2.out
+@@ -1,4 +1,4 @@
+ 0 1 1 2 2 2 2 2 2 2
+-0 0 0 2 2 2 2 2 2 2
+-0 0 0 2 2 2 2 2 2 2
++0 0 0 1 1 1 1 1 1 1
++0 0 0 1 1 1 1 1 1 1
+ 0 1 1 2 3 3 3 3 3 3
+diff --git a/examples/simple/igraph_scg_grouping3.out b/examples/simple/igraph_scg_grouping3.out
+index c6fc1006d..3dbed8861 100644
+--- a/examples/simple/igraph_scg_grouping3.out
++++ b/examples/simple/igraph_scg_grouping3.out
+@@ -1,5 +1,5 @@
+ 0.433013 0.57735 0.57735 0.144338 0.144338 0.144338 0.144338 0.144338 0.144338 0.144338
+ 0 1 1 0 2 2 2 2 2 2
+-1 2 2 0 2 2 2 2 2 2
+-1 2 2 0 2 2 2 2 2 2
+-1 2 2 0 3 3 3 3 3 3
++0 1 1 2 1 1 1 1 1 1
++0 1 1 2 1 1 1 1 1 1
++0 1 1 2 3 3 3 3 3 3
+diff --git a/examples/simple/igraph_scg_grouping4.out b/examples/simple/igraph_scg_grouping4.out
+index a137ff8f7..b03883f5e 100644
+--- a/examples/simple/igraph_scg_grouping4.out
++++ b/examples/simple/igraph_scg_grouping4.out
+@@ -1,4 +1,4 @@
+-0 2 2 1 1 1 1 1 1 1
+-0 2 2 1 1 1 1 1 1 1
+-0 2 2 1 1 1 1 1 1 1
+-0 3 3 2 1 1 1 1 1 1
++0 1 1 2 2 2 2 2 2 2
++0 1 1 2 2 2 2 2 2 2
++0 1 1 2 2 2 2 2 2 2
++0 1 1 2 3 3 3 3 3 3
+diff --git a/examples/simple/igraph_scg_semiprojectors2.out b/examples/simple/igraph_scg_semiprojectors2.out
+index 9faabe167..1fbe20a99 100644
+--- a/examples/simple/igraph_scg_semiprojectors2.out
++++ b/examples/simple/igraph_scg_semiprojectors2.out
+@@ -8,31 +8,31 @@
+ 0 0 0 0 1 1 1 1 1 1
+ ---
+ ----------------------
+-0 0 0 1 0 0 0 0 0 0
+ 1 0 0 0 0 0 0 0 0 0
+ 0 0.285714 0.285714 0 0.0714286 0.0714286 0.0714286 0.0714286 0.0714286 0.0714286
+----
+ 0 0 0 1 0 0 0 0 0 0
++---
+ 1 0 0 0 0 0 0 0 0 0
+ 0 1 1 0 1 1 1 1 1 1
++0 0 0 1 0 0 0 0 0 0
+ ---
+ ----------------------
+-0 0 0 1 0 0 0 0 0 0
+ 1 0 0 0 0 0 0 0 0 0
+ 0 0.285714 0.285714 0 0.0714286 0.0714286 0.0714286 0.0714286 0.0714286 0.0714286
+----
+ 0 0 0 1 0 0 0 0 0 0
++---
+ 1 0 0 0 0 0 0 0 0 0
+ 0 1 1 0 1 1 1 1 1 1
++0 0 0 1 0 0 0 0 0 0
+ ---
+ ----------------------
+-0 0 0 1 0 0 0 0 0 0
+ 1 0 0 0 0 0 0 0 0 0
+ 0 0.5 0.5 0 0 0 0 0 0 0
++0 0 0 1 0 0 0 0 0 0
+ 0 0 0 0 0.166667 0.166667 0.166667 0.166667 0.166667 0.166667
+ ---
+-0 0 0 1 0 0 0 0 0 0
+ 1 0 0 0 0 0 0 0 0 0
+ 0 1 1 0 0 0 0 0 0 0
++0 0 0 1 0 0 0 0 0 0
+ 0 0 0 0 1 1 1 1 1 1
+ ---
+diff --git a/examples/simple/igraph_scg_semiprojectors3.out b/examples/simple/igraph_scg_semiprojectors3.out
+index d3d2b3d6a..5b158ccaa 100644
+--- a/examples/simple/igraph_scg_semiprojectors3.out
++++ b/examples/simple/igraph_scg_semiprojectors3.out
+@@ -1,11 +1,11 @@
+ ----------------------
+ 1 0 0 0 0 0 0 0 0 0
+-0 0 0 0.142857 0.142857 0.142857 0.142857 0.142857 0.142857 0.142857
+ 0 0.5 0.5 0 0 0 0 0 0 0
++0 0 0 0.142857 0.142857 0.142857 0.142857 0.142857 0.142857 0.142857
+ ---
+ 1 0 0 0 0 0 0 0 0 0
+-0 0 0 1 1 1 1 1 1 1
+ 0 1 1 0 0 0 0 0 0 0
++0 0 0 1 1 1 1 1 1 1
+ ---
+ ----------------------
+ 0.125 0 0 0.125 0.125 0.125 0.125 0.125 0.125 0.125
+@@ -23,12 +23,12 @@
+ ---
+ ----------------------
+ 1 0 0 0 0 0 0 0 0 0
+-0 0 0 0 0.166667 0.166667 0.166667 0.166667 0.166667 0.166667
+-0 0 0 1 0 0 0 0 0 0
+ 0 0.5 0.5 0 0 0 0 0 0 0
++0 0 0 1 0 0 0 0 0 0
++0 0 0 0 0.166667 0.166667 0.166667 0.166667 0.166667 0.166667
+ ---
+ 1 0 0 0 0 0 0 0 0 0
+-0 0 0 0 1 1 1 1 1 1
+-0 0 0 1 0 0 0 0 0 0
+ 0 1 1 0 0 0 0 0 0 0
++0 0 0 1 0 0 0 0 0 0
++0 0 0 0 1 1 1 1 1 1
+ ---
+diff --git a/examples/simple/scg2.out b/examples/simple/scg2.out
+index 509a3f03a..1a0a07e0d 100644
+--- a/examples/simple/scg2.out
++++ b/examples/simple/scg2.out
+@@ -41,7 +41,7 @@ col 0: locations 0 to 0
+ 0 9 : 1
+ ---
+ --------------------------------
+-2 3 1 2 4 4 4 0 0 0
++0 1 2 0 3 3 3 4 4 4
+ ---
+ 0.866025+0i
+ 0+0i
+@@ -55,55 +55,55 @@ col 0: locations 0 to 0
+ -0.365148+0i
+ -0.365148+0i
+ ---
++0 0
+ 0 1
++0 2
+ 1 0
+-1 2
+-2 1
+-2 2
+-2 3
+-3 2
+-3 4
+-4 3
++1 3
++2 0
++2 4
++3 1
++4 2
+ ---
+-col 0: locations 0 to 0
+-1 : 0.75
+-col 1: locations 1 to 2
+-2 : 0.25
+-0 : 1
+-col 2: locations 3 to 5
+-3 : 0.25
++col 0: locations 0 to 2
+ 1 : 0.25
+-2 : 0.5
+-col 3: locations 6 to 7
+ 2 : 0.25
++0 : 0.5
++col 1: locations 3 to 4
++0 : 0.25
++3 : 1
++col 2: locations 5 to 6
++0 : 0.25
+ 4 : 1
++col 3: locations 7 to 7
++1 : 0.75
+ col 4: locations 8 to 8
+-3 : 0.75
+----
+-2 0 : 0.75
+-3 1 : 1
+-1 2 : 1
+-2 3 : 0.25
+-4 4 : 0.333333
+-4 5 : 0.333333
+-4 6 : 0.333333
+-0 7 : 0.333333
+-0 8 : 0.333333
+-0 9 : 0.333333
+----
+-2 0 : 1
+-3 1 : 1
+-1 2 : 1
+-2 3 : 1
+-4 4 : 1
+-4 5 : 1
+-4 6 : 1
+-0 7 : 1
+-0 8 : 1
+-0 9 : 1
++2 : 0.75
++---
++0 0 : 0.75
++1 1 : 1
++2 2 : 1
++0 3 : 0.25
++3 4 : 0.333333
++3 5 : 0.333333
++3 6 : 0.333333
++4 7 : 0.333333
++4 8 : 0.333333
++4 9 : 0.333333
++---
++0 0 : 1
++1 1 : 1
++2 2 : 1
++0 3 : 1
++3 4 : 1
++3 5 : 1
++3 6 : 1
++4 7 : 1
++4 8 : 1
++4 9 : 1
+ ---
+ --------------------------------
+-2 3 1 2 4 4 4 0 0 0
++0 1 2 0 3 3 3 4 4 4
+ ---
+ 1+0i 0.866025+0i
+ -0.316228+0i 0+0i
+@@ -117,50 +117,50 @@ col 4: locations 8 to 8
+ -0.316228+0i -0.365148+0i
+ -0.316228+0i -0.365148+0i
+ ---
++0 0
+ 0 1
++0 2
+ 1 0
+-1 2
+-2 1
+-2 2
+-2 3
+-3 2
+-3 4
+-4 3
++1 3
++2 0
++2 4
++3 1
++4 2
+ ---
+-col 0: locations 0 to 0
+-1 : 0.75
+-col 1: locations 1 to 2
+-2 : 0.25
+-0 : 1
+-col 2: locations 3 to 5
+-3 : 0.25
++col 0: locations 0 to 2
+ 1 : 0.25
+-2 : 0.5
+-col 3: locations 6 to 7
+ 2 : 0.25
++0 : 0.5
++col 1: locations 3 to 4
++0 : 0.25
++3 : 1
++col 2: locations 5 to 6
++0 : 0.25
+ 4 : 1
++col 3: locations 7 to 7
++1 : 0.75
+ col 4: locations 8 to 8
+-3 : 0.75
+----
+-2 0 : 0.75
+-3 1 : 1
+-1 2 : 1
+-2 3 : 0.25
+-4 4 : 0.333333
+-4 5 : 0.333333
+-4 6 : 0.333333
+-0 7 : 0.333333
+-0 8 : 0.333333
+-0 9 : 0.333333
+----
+-2 0 : 1
+-3 1 : 1
+-1 2 : 1
+-2 3 : 1
+-4 4 : 1
+-4 5 : 1
+-4 6 : 1
+-0 7 : 1
+-0 8 : 1
+-0 9 : 1
++2 : 0.75
++---
++0 0 : 0.75
++1 1 : 1
++2 2 : 1
++0 3 : 0.25
++3 4 : 0.333333
++3 5 : 0.333333
++3 6 : 0.333333
++4 7 : 0.333333
++4 8 : 0.333333
++4 9 : 0.333333
++---
++0 0 : 1
++1 1 : 1
++2 2 : 1
++0 3 : 1
++3 4 : 1
++3 5 : 1
++3 6 : 1
++4 7 : 1
++4 8 : 1
++4 9 : 1
+ ---
+diff --git a/examples/simple/scg3.out b/examples/simple/scg3.out
+index 93ab8affe..34424f032 100644
+--- a/examples/simple/scg3.out
++++ b/examples/simple/scg3.out
+@@ -1,5 +1,5 @@
+ --------------------------------
+-0 3 3 2 1 1 1 1 1 1
++0 1 1 2 3 3 3 3 3 3
+ ---
+ 5.52892+0i
+ -0.493741+0i
+@@ -13,52 +13,52 @@
+ -0.125815+0i
+ -0.125815+0i
+ ---
++0 1
+ 0 2
+-0 3
++1 0
+ 1 3
+ 2 0
+-3 0
+ 3 1
+ ---
+ col 0: locations 0 to 2
+ 0 : 3
+-3 : -1
++1 : -1
+ 2 : -1
+-col 1: locations 3 to 4
+-1 : 1
+-3 : -3
+-col 2: locations 5 to 6
++col 1: locations 3 to 5
++1 : 4
++0 : -2
++3 : -1
++col 2: locations 6 to 7
+ 2 : 1
+ 0 : -1
+-col 3: locations 7 to 9
+-3 : 4
+-0 : -2
+-1 : -1
++col 3: locations 8 to 9
++3 : 1
++1 : -3
+ ---
+ 0 0 : 1
+-3 1 : 0.5
+-3 2 : 0.5
++1 1 : 0.5
++1 2 : 0.5
+ 2 3 : 1
+-1 4 : 0.166667
+-1 5 : 0.166667
+-1 6 : 0.166667
+-1 7 : 0.166667
+-1 8 : 0.166667
+-1 9 : 0.166667
++3 4 : 0.166667
++3 5 : 0.166667
++3 6 : 0.166667
++3 7 : 0.166667
++3 8 : 0.166667
++3 9 : 0.166667
+ ---
+ 0 0 : 1
+-3 1 : 1
+-3 2 : 1
++1 1 : 1
++1 2 : 1
+ 2 3 : 1
+-1 4 : 1
+-1 5 : 1
+-1 6 : 1
+-1 7 : 1
+-1 8 : 1
+-1 9 : 1
++3 4 : 1
++3 5 : 1
++3 6 : 1
++3 7 : 1
++3 8 : 1
++3 9 : 1
+ ---
+ --------------------------------
+-3 2 2 0 1 1 1 1 1 1
++0 1 1 2 3 3 3 3 3 3
+ ---
+ 2.83255+0i
+ 0.749697+0i
+@@ -72,52 +72,52 @@ col 3: locations 7 to 9
+ -0.145872+0i
+ -0.145872+0i
+ ---
+-0 3
+-1 2
+-2 1
+-2 3
+-3 0
+-3 2
++0 1
++0 2
++1 0
++1 3
++2 0
++3 1
+ ---
+-col 0: locations 0 to 1
+-0 : 1
+-3 : -1
+-col 1: locations 2 to 3
+-1 : 1
+-2 : -3
+-col 2: locations 4 to 6
+-2 : 4
+-3 : -2
++col 0: locations 0 to 2
++0 : 3
+ 1 : -1
+-col 3: locations 7 to 9
+-3 : 3
+ 2 : -1
++col 1: locations 3 to 5
++1 : 4
++0 : -2
++3 : -1
++col 2: locations 6 to 7
++2 : 1
+ 0 : -1
++col 3: locations 8 to 9
++3 : 1
++1 : -3
+ ---
+-3 0 : 1
+-2 1 : 0.5
+-2 2 : 0.5
+-0 3 : 1
+-1 4 : 0.166667
+-1 5 : 0.166667
+-1 6 : 0.166667
+-1 7 : 0.166667
+-1 8 : 0.166667
+-1 9 : 0.166667
+----
+-3 0 : 1
+-2 1 : 1
+-2 2 : 1
+-0 3 : 1
+-1 4 : 1
+-1 5 : 1
+-1 6 : 1
+-1 7 : 1
+-1 8 : 1
+-1 9 : 1
++0 0 : 1
++1 1 : 0.5
++1 2 : 0.5
++2 3 : 1
++3 4 : 0.166667
++3 5 : 0.166667
++3 6 : 0.166667
++3 7 : 0.166667
++3 8 : 0.166667
++3 9 : 0.166667
++---
++0 0 : 1
++1 1 : 1
++1 2 : 1
++2 3 : 1
++3 4 : 1
++3 5 : 1
++3 6 : 1
++3 7 : 1
++3 8 : 1
++3 9 : 1
+ ---
+ --------------------------------
+-0 3 3 2 1 1 1 1 1 1
++0 1 1 2 3 3 3 3 3 3
+ ---
+ 5.52892+0i 2.83255+0i
+ -0.493741+0i 0.749697+0i
+@@ -131,47 +131,47 @@ col 3: locations 7 to 9
+ -0.125815+0i -0.145872+0i
+ -0.125815+0i -0.145872+0i
+ ---
++0 1
+ 0 2
+-0 3
++1 0
+ 1 3
+ 2 0
+-3 0
+ 3 1
+ ---
+ col 0: locations 0 to 2
+ 0 : 3
+-3 : -1
++1 : -1
+ 2 : -1
+-col 1: locations 3 to 4
+-1 : 1
+-3 : -3
+-col 2: locations 5 to 6
++col 1: locations 3 to 5
++1 : 4
++0 : -2
++3 : -1
++col 2: locations 6 to 7
+ 2 : 1
+ 0 : -1
+-col 3: locations 7 to 9
+-3 : 4
+-0 : -2
+-1 : -1
++col 3: locations 8 to 9
++3 : 1
++1 : -3
+ ---
+ 0 0 : 1
+-3 1 : 0.5
+-3 2 : 0.5
++1 1 : 0.5
++1 2 : 0.5
+ 2 3 : 1
+-1 4 : 0.166667
+-1 5 : 0.166667
+-1 6 : 0.166667
+-1 7 : 0.166667
+-1 8 : 0.166667
+-1 9 : 0.166667
++3 4 : 0.166667
++3 5 : 0.166667
++3 6 : 0.166667
++3 7 : 0.166667
++3 8 : 0.166667
++3 9 : 0.166667
+ ---
+ 0 0 : 1
+-3 1 : 1
+-3 2 : 1
++1 1 : 1
++1 2 : 1
+ 2 3 : 1
+-1 4 : 1
+-1 5 : 1
+-1 6 : 1
+-1 7 : 1
+-1 8 : 1
+-1 9 : 1
++3 4 : 1
++3 5 : 1
++3 6 : 1
++3 7 : 1
++3 8 : 1
++3 9 : 1
+ ---
+diff --git a/src/scg.c b/src/scg.c
+index 64a2340f3..dde162270 100644
+--- a/src/scg.c
++++ b/src/scg.c
+@@ -79,6 +79,7 @@
+ #include "igraph_eigen.h"
+ #include "igraph_interface.h"
+ #include "igraph_structural.h"
++#include "igraph_community.h"
+ #include "igraph_constructors.h"
+ #include "igraph_conversion.h"
+ #include "igraph_memory.h"
+@@ -468,6 +469,8 @@ int igraph_scg_grouping(const igraph_matrix_t *V,
+     igraph_matrix_int_destroy(&gr_mat);
+     IGRAPH_FINALLY_CLEAN(1);
+ 
++    IGRAPH_CHECK(igraph_reindex_membership(groups, 0, 0));
++
+     return 0;
+ }
+ 


=====================================
debian/patches/06-canonical-scg-eigenvectors.patch
=====================================
@@ -0,0 +1,296 @@
+From 4af46a9fdfaba35b05e24f0d6d22cbd1818478bf Mon Sep 17 00:00:00 2001
+From: Tamas Nepusz <ntamas at gmail.com>
+Date: Fri, 17 Apr 2020 20:05:02 +0200
+Subject: [PATCH] more SCG test case fixes: canonicalize eigenvectors as well
+
+---
+ examples/simple/scg2.c            |  4 +-
+ examples/simple/scg2.out          | 40 ++++++-------
+ examples/simple/scg3.c            |  4 +-
+ examples/simple/scg3.out          | 40 ++++++-------
+ examples/tests/test_utilities.inc | 98 +++++++++++++++++++++++++++++--
+ 5 files changed, 138 insertions(+), 48 deletions(-)
+
+diff --git a/examples/simple/scg2.c b/examples/simple/scg2.c
+index f54fc8de6..65945a3ff 100644
+--- a/examples/simple/scg2.c
++++ b/examples/simple/scg2.c
+@@ -23,6 +23,8 @@
+ 
+ #include <igraph.h>
+ 
++#include "../tests/test_utilities.inc"
++
+ int main() {
+ 
+     igraph_t g;
+@@ -94,7 +96,7 @@ int main() {
+         igraph_vector_print(&groups);               \
+         printf("---\n");                        \
+         igraph_vector_complex_print(&eval);             \
+-        igraph_matrix_complex_print(&evec);             \
++        print_matrix_complex_first_row_positive(&evec);             \
+         printf("---\n");                        \
+         igraph_write_graph_edgelist(&scg_graph, stdout);        \
+         printf("---\n");                        \
+diff --git a/examples/simple/scg2.out b/examples/simple/scg2.out
+index 1a0a07e0d..b354eb1dd 100644
+--- a/examples/simple/scg2.out
++++ b/examples/simple/scg2.out
+@@ -2,16 +2,16 @@
+ 0 0 0 0 0 0 0 0 0 0
+ ---
+ 1+0i
+--0.316228+0i
+--0.316228+0i
+--0.316228+0i
+--0.316228+0i
+--0.316228+0i
+--0.316228+0i
+--0.316228+0i
+--0.316228+0i
+--0.316228+0i
+--0.316228+0i
++0.316228+0i
++0.316228+0i
++0.316228+0i
++0.316228+0i
++0.316228+0i
++0.316228+0i
++0.316228+0i
++0.316228+0i
++0.316228+0i
++0.316228+0i
+ ---
+ 0 0
+ ---
+@@ -106,16 +106,16 @@ col 4: locations 8 to 8
+ 0 1 2 0 3 3 3 4 4 4
+ ---
+ 1+0i 0.866025+0i
+--0.316228+0i 0+0i
+--0.316228+0i 0.316228+0i
+--0.316228+0i -0.316228+0i
+--0.316228+0i 0+0i
+--0.316228+0i 0.365148+0i
+--0.316228+0i 0.365148+0i
+--0.316228+0i 0.365148+0i
+--0.316228+0i -0.365148+0i
+--0.316228+0i -0.365148+0i
+--0.316228+0i -0.365148+0i
++0.316228+0i 0+0i
++0.316228+0i 0.316228+0i
++0.316228+0i -0.316228+0i
++0.316228+0i 0+0i
++0.316228+0i 0.365148+0i
++0.316228+0i 0.365148+0i
++0.316228+0i 0.365148+0i
++0.316228+0i -0.365148+0i
++0.316228+0i -0.365148+0i
++0.316228+0i -0.365148+0i
+ ---
+ 0 0
+ 0 1
+diff --git a/examples/simple/scg3.c b/examples/simple/scg3.c
+index 6e10461b1..ecbe57c35 100644
+--- a/examples/simple/scg3.c
++++ b/examples/simple/scg3.c
+@@ -23,6 +23,8 @@
+ 
+ #include <igraph.h>
+ 
++#include "../tests/test_utilities.inc"
++
+ int main() {
+ 
+     igraph_t g;
+@@ -67,7 +69,7 @@ int main() {
+         igraph_vector_print(&groups);               \
+         printf("---\n");                        \
+         igraph_vector_complex_print(&eval);             \
+-        igraph_matrix_complex_print(&evec);             \
++        print_matrix_complex_first_row_positive(&evec);             \
+         printf("---\n");                        \
+         igraph_write_graph_edgelist(&scg_graph, stdout);        \
+         printf("---\n");                        \
+diff --git a/examples/simple/scg3.out b/examples/simple/scg3.out
+index 34424f032..98708b322 100644
+--- a/examples/simple/scg3.out
++++ b/examples/simple/scg3.out
+@@ -2,16 +2,16 @@
+ 0 1 1 2 3 3 3 3 3 3
+ ---
+ 5.52892+0i
+--0.493741+0i
+-0.569806+0i
+-0.569806+0i
+-0.10902+0i
+--0.125815+0i
+--0.125815+0i
+--0.125815+0i
+--0.125815+0i
+--0.125815+0i
+--0.125815+0i
++0.493741+0i
++-0.569806+0i
++-0.569806+0i
++-0.10902+0i
++0.125815+0i
++0.125815+0i
++0.125815+0i
++0.125815+0i
++0.125815+0i
++0.125815+0i
+ ---
+ 0 1
+ 0 2
+@@ -120,16 +120,16 @@ col 3: locations 8 to 9
+ 0 1 1 2 3 3 3 3 3 3
+ ---
+ 5.52892+0i 2.83255+0i
+--0.493741+0i 0.749697+0i
+-0.569806+0i 0.267318+0i
+-0.569806+0i 0.267318+0i
+-0.10902+0i -0.4091+0i
+--0.125815+0i -0.145872+0i
+--0.125815+0i -0.145872+0i
+--0.125815+0i -0.145872+0i
+--0.125815+0i -0.145872+0i
+--0.125815+0i -0.145872+0i
+--0.125815+0i -0.145872+0i
++0.493741+0i 0.749697+0i
++-0.569806+0i 0.267318+0i
++-0.569806+0i 0.267318+0i
++-0.10902+0i -0.4091+0i
++0.125815+0i -0.145872+0i
++0.125815+0i -0.145872+0i
++0.125815+0i -0.145872+0i
++0.125815+0i -0.145872+0i
++0.125815+0i -0.145872+0i
++0.125815+0i -0.145872+0i
+ ---
+ 0 1
+ 0 2
+diff --git a/examples/tests/test_utilities.inc b/examples/tests/test_utilities.inc
+index 99140e2a4..2826d022a 100644
+--- a/examples/tests/test_utilities.inc
++++ b/examples/tests/test_utilities.inc
+@@ -57,8 +57,60 @@ void print_graph(const igraph_t *graph, FILE *f) {
+     fprintf(f, "}\n");
+ }
+ 
+-/* Print a matrix, ensuring that the first row contains positive elements only.
+- * Useful when the columns are eigenvectors. */
++/* Print a vector, ensuring that the first nonzero element is positive. */
++void print_vector_first_nonzero_element_positive(const igraph_vector_t *vector, const char* format) {
++    igraph_vector_t copy;
++    long i, n;
++
++    igraph_vector_copy(&copy, vector);
++
++    n = igraph_vector_size(&copy);
++
++    for (i = 0; i < n; i++) {
++        if (VECTOR(copy)[i] < 0) {
++            for (; i < n; i++) {
++                VECTOR(copy)[i] *= -1;
++            }
++            break;
++        } else if (VECTOR(copy)[i] > 0) {
++            break;
++        }
++    }
++
++    igraph_vector_printf(&copy, format);
++    igraph_vector_destroy(&copy);
++}
++
++/* Print a complex vector, ensuring that the first element with nonzero real
++ * part has a positive real part. */
++void print_vector_complex_first_nonzero_real_part_positive(const igraph_vector_complex_t *vector) {
++    igraph_vector_complex_t copy;
++    long i, n;
++
++    igraph_vector_complex_copy(&copy, vector);
++
++    n = igraph_vector_complex_size(&copy);
++
++    for (i = 0; i < n; i++) {
++        if (IGRAPH_REAL(VECTOR(copy)[i]) < 0) {
++            for (; i < n; i++) {
++                IGRAPH_REAL(VECTOR(copy)[i]) *= -1;
++				if (IGRAPH_IMAG(VECTOR(copy)[i]) != 0) {
++					IGRAPH_IMAG(VECTOR(copy)[i]) *= -1;
++				}
++            }
++            break;
++        } else if (IGRAPH_REAL(VECTOR(copy)[i]) > 0) {
++            break;
++        }
++    }
++
++    igraph_vector_complex_print(&copy);
++    igraph_vector_complex_destroy(&copy);
++}
++
++/* Print a matrix, ensuring that the first nonzero element in each column is
++ * positive. */
+ void print_matrix_first_row_positive(const igraph_matrix_t *matrix, const char* format) {
+     igraph_matrix_t copy;
+     long i, j, nrow, ncol;
+@@ -68,12 +120,15 @@ void print_matrix_first_row_positive(const igraph_matrix_t *matrix, const char*
+     nrow = igraph_matrix_nrow(&copy);
+     ncol = igraph_matrix_ncol(&copy);
+ 
+-    if (nrow > 0) {
+-        for (i = 0; i < ncol; i++) {
+-            if (MATRIX(copy, 0, i) < 0) {
+-                for (j = 0; j < nrow; j++) {
++    for (i = 0; i < ncol; i++) {
++        for (j = 0; j < nrow; j++) {
++            if (MATRIX(copy, j, i) < 0) {
++                for (; j < nrow; j++) {
+                     MATRIX(copy, j, i) *= -1;
+                 }
++                break;
++            } else if (MATRIX(copy, j, i) > 0) {
++                break;
+             }
+         }
+     }
+@@ -82,4 +137,35 @@ void print_matrix_first_row_positive(const igraph_matrix_t *matrix, const char*
+     igraph_matrix_destroy(&copy);
+ }
+ 
++/* Print a complex matrix, ensuring that the first element with nonzero real
++ * part in each column has a positive real part. */
++void print_matrix_complex_first_row_positive(const igraph_matrix_complex_t *matrix) {
++    igraph_matrix_complex_t copy;
++    long i, j, nrow, ncol;
++
++    igraph_matrix_complex_copy(&copy, matrix);
++
++    nrow = igraph_matrix_complex_nrow(&copy);
++    ncol = igraph_matrix_complex_ncol(&copy);
++
++    for (i = 0; i < ncol; i++) {
++        for (j = 0; j < nrow; j++) {
++            if (IGRAPH_REAL(MATRIX(copy, j, i)) < 0) {
++                for (; j < nrow; j++) {
++                    IGRAPH_REAL(MATRIX(copy, j, i)) *= -1;
++					if (IGRAPH_IMAG(MATRIX(copy, j, i)) != 0) {
++						IGRAPH_IMAG(MATRIX(copy, j, i)) *= -1;
++					}
++                }
++                break;
++            } else if (IGRAPH_REAL(MATRIX(copy, j, i)) > 0) {
++                break;
++            }
++        }
++    }
++
++    igraph_matrix_complex_print(&copy);
++    igraph_matrix_complex_destroy(&copy);
++}
++
+ #endif /* TEST_UTILITIES_INC */


=====================================
debian/patches/07-canonical-infomap.patch
=====================================
@@ -0,0 +1,57 @@
+From 2a644aa2935509ac2449ea29cd4e3bba4fbc9cd7 Mon Sep 17 00:00:00 2001
+From: Tamas Nepusz <ntamas at gmail.com>
+Date: Fri, 17 Apr 2020 20:42:43 +0200
+Subject: [PATCH] canonicalize the output of the Infomap algorithm as well
+
+---
+ examples/simple/igraph_community_infomap.out | 14 +++++++-------
+ src/infomap.cc                               |  3 +++
+ 2 files changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/examples/simple/igraph_community_infomap.out b/examples/simple/igraph_community_infomap.out
+index 7d4fc6362..c8d4b4efe 100644
+--- a/examples/simple/igraph_community_infomap.out
++++ b/examples/simple/igraph_community_infomap.out
+@@ -1,22 +1,22 @@
+ # Two triangles connected by one edge
+ Codelength: 2.51787 (in 2 modules)
+-Membership: 1 1 1 0 0 0 
++Membership: 0 0 0 1 1 1 
+ # Two 4-cliques (0123 and 4567) connected by two edges (0-4 and 1-5)
+ Codelength: 2.94884 (in 2 modules)
+-Membership: 1 1 1 1 0 0 0 0 
++Membership: 0 0 0 0 1 1 1 1 
+ # Two 4-cliques (0123 and 4567) connected by two edges (0-4 and 1-5)
+ Codelength: 2.96655 (in 2 modules)
+-Membership: 1 0 1 1 1 0 0 0 
++Membership: 0 1 0 0 0 1 1 1 
+ # Zachary Karate club
+ Codelength: 4.60606 (in 3 modules)
+-Membership: 1 1 1 1 2 2 2 1 0 1 2 1 1 1 0 0 2 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 
++Membership: 0 0 0 0 1 1 1 0 2 0 1 0 0 0 2 2 1 0 2 0 2 0 2 2 2 2 2 2 2 2 2 2 2 2 
+ # Flow (from infomap_dir.tgz)
+ Codelength: 3.32773 (in 4 modules)
+-Membership: 3 3 3 3 0 0 0 0 1 1 1 1 2 2 2 2 
++Membership: 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 
+ # MultiphysChemBioEco40W_weighted_dir.net (from infomap_dir.tgz)
+ Codelength: 3.87095 (in 5 modules)
+-Membership: 0 0 0 0 0 0 0 0 0 0 3 3 3 0 3 3 0 3 3 3 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 4 2 2 
++Membership: 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 0 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 3 3 
+ # Wiktionary english verbs (synonymy 2008)
+ |V|=7339 |E|=8293 directed=0
+ Codelength: 5.70863 (in 1444 modules)
+-Membership (1/100 of vertices): 392 200 6 14 2 126 106 3 32 95 98 136 86 67 61 159 142 396 607 54 272 194 213 157 794 616 170 866 36 13 205 98 25 280 460 302 87 911 243 804 835 399 807 953 1333 101 73 75 666 0 568 798 175 219 133 49 1080 179 525 199 197 517 109 1194 1218 827 733 214 38 881 522 1356 143 14 
++Membership (1/100 of vertices): 0 25 38 76 107 149 172 79 115 161 262 291 169 331 102 51 40 399 410 363 318 453 171 485 255 498 141 529 526 424 39 262 35 371 466 341 349 668 301 653 401 734 449 763 787 288 630 232 868 147 429 693 681 739 303 98 1033 528 923 245 459 1159 254 1210 1237 384 1276 97 214 579 1075 559 139 76 
+diff --git a/src/infomap.cc b/src/infomap.cc
+index 5d38cbd89..9b8084bb7 100644
+--- a/src/infomap.cc
++++ b/src/infomap.cc
+@@ -318,5 +318,8 @@ int igraph_community_infomap(const igraph_t * graph,
+ 
+     delete fgraph;
+     IGRAPH_FINALLY_CLEAN(1);
++
++	IGRAPH_CHECK(igraph_reindex_membership(membership, 0, 0));
++
+     return IGRAPH_SUCCESS;
+ }


=====================================
debian/patches/08-infomap-test-relaxation.patch
=====================================
@@ -0,0 +1,152 @@
+From c9c83a5240d249ee21f951bd84463c2698bb29af Mon Sep 17 00:00:00 2001
+From: Tamas Nepusz <ntamas at gmail.com>
+Date: Mon, 20 Apr 2020 15:12:00 +0200
+Subject: [PATCH] Infomap test: don't check the exact partition for the
+ Wiktionary example, it is platform-dependent
+
+---
+ examples/simple/igraph_community_infomap.c   | 48 +++++++++++++-------
+ examples/simple/igraph_community_infomap.out |  3 +-
+ 2 files changed, 32 insertions(+), 19 deletions(-)
+
+diff --git a/examples/simple/igraph_community_infomap.c b/examples/simple/igraph_community_infomap.c
+index 189e7b7d5..ca76cc430 100644
+--- a/examples/simple/igraph_community_infomap.c
++++ b/examples/simple/igraph_community_infomap.c
+@@ -25,7 +25,7 @@
+ #include <igraph.h>
+ 
+ 
+-void gsumary(const igraph_t * g) {
++void gsummary(const igraph_t * g) {
+     printf("|V|=%d |E|=%d directed=%d\n", (int)igraph_vcount(g), (int)igraph_ecount(g), (int)igraph_is_directed(g));
+ }
+ 
+@@ -49,31 +49,36 @@ void show_results_lite(igraph_vector_t * membership, igraph_real_t codelength) {
+     printf("\n");
+ }
+ 
+-void infomap_weighted_test(const igraph_t * g, const igraph_vector_t *weights) {
++igraph_real_t infomap_weighted_test(const igraph_t * g, const igraph_vector_t *weights, igraph_bool_t smoke_test) {
+     igraph_vector_t membership;
+     igraph_real_t codelength = 1000;
+     igraph_vector_init(&membership, 0);
+ 
+     igraph_community_infomap(/*in */ g, /*e_weight=*/ weights, NULL, /*nb_trials=*/5,
+                                      /*out*/ &membership, &codelength);
+-    if (igraph_vcount(g) > 500) {
+-        show_results_lite(&membership, codelength);
+-    } else {
+-        show_results(&membership, codelength);
++    if (!smoke_test) {
++        if (igraph_vcount(g) > 500) {
++            show_results_lite(&membership, codelength);
++        } else {
++            show_results(&membership, codelength);
++        }
+     }
+ 
+     igraph_vector_destroy(&membership);
++
++    return codelength;
+ }
+ 
+ 
+-void infomap_test(const igraph_t * g) {
+-    infomap_weighted_test(g, 0);
++igraph_real_t infomap_test(const igraph_t * g, igraph_bool_t smoke_test) {
++    return infomap_weighted_test(g, 0, smoke_test);
+ }
+ 
+ 
+ int main() {
+     igraph_t g;
+     igraph_vector_t weights;
++    igraph_real_t codelength;
+ 
+     igraph_rng_seed(igraph_rng_default(), 42);
+ 
+@@ -84,7 +89,7 @@ int main() {
+                  3, 4, 4, 5, 5, 3,
+                  0, 5,
+                  -1);
+-    infomap_test(&g);
++    infomap_test(&g, /* smoke_test = */ 0);
+     igraph_destroy(&g);
+     //return 0;
+ 
+@@ -95,12 +100,12 @@ int main() {
+                  7, 4,  7, 5,  7, 6,  4, 5,  4, 6,  5, 6, // 4-clique 4,5,6,7
+                  0, 4,  1, 5, //8, 0, 8, 4,
+                  -1);
+-    infomap_test(&g);
++    infomap_test(&g, /* smoke_test = */ 0);
+ 
+     printf("# Two 4-cliques (0123 and 4567) connected by two edges (0-4 and 1-5)\n");
+     igraph_add_edge(&g, 0, 4);
+     igraph_add_edge(&g, 1, 5);
+-    infomap_test(&g);
++    infomap_test(&g, /* smoke_test = */ 0);
+     igraph_destroy(&g);
+ 
+     /* Zachary Karate club -- this is just a quick smoke test */
+@@ -123,7 +128,7 @@ int main() {
+                  28, 33, 29, 32, 29, 33, 30, 32, 30, 33,
+                  31, 32, 31, 33, 32, 33,
+                  -1);
+-    infomap_test(&g);
++    infomap_test(&g, /* smoke_test = */ 0);
+     igraph_destroy(&g);
+ 
+     /* Flow.net that come in infomap_dir.tgz  */
+@@ -134,7 +139,7 @@ int main() {
+                  8, 9,     9, 10,  10, 11,  11, 8,    9, 12,
+                  12, 13,  13, 14,  14, 15,  15, 12,  13, 0,
+                  -1);
+-    infomap_test(&g);
++    infomap_test(&g, /* smoke_test = */ 0);
+     igraph_destroy(&g);
+ 
+     /* MultiphysChemBioEco40W_weighted_dir.net */
+@@ -237,17 +242,26 @@ int main() {
+                             9.0,  2.0,  2.0,  5.0,  4.0,  2.0,  7.0,  3.0,
+                             3.0,  5.0,  8.0,  14.0,  3.0,  38.0,  3.0,  9.0,
+                             2.0,  8.0,  21.0,  18.0,  58.0);
+-    infomap_weighted_test(&g, &weights);
++    infomap_weighted_test(&g, &weights, /* smoke_test = */ 0);
+     igraph_vector_destroy(&weights);
+     igraph_destroy(&g);
+ 
+-    /* Two triangles connected by one edge */
++    /* Wiktionary English verbs -- this one is a bit flaky, igraph reports
++     * 1444 or 1445 modules, depending on the platform, so let's just run it as
++     * a quick smoke test but don't check the results too thoroughly as some
++     * changes are expected. We only check the codelength of the partition,
++     * this is more reliable. */
+     printf("# Wiktionary english verbs (synonymy 2008)\n");
+     FILE *wikt = fopen("wikti_en_V_syn.elist", "r");
+     igraph_read_graph_edgelist(&g, wikt, 0, 0);
+     fclose(wikt);
+-    gsumary(&g);
+-    infomap_test(&g);
++    gsummary(&g);
++    codelength = infomap_test(&g, /* smoke_test = */ 1);
++    if (fabs(codelength - 5.708) >= 1e-3) {
++        printf("Codelength was %0.5f, expected %0.5f\n", codelength, 5.708);
++    } else {
++        printf("Codelength OK.\n");
++    }
+     igraph_destroy(&g);
+ 
+     return 0;
+diff --git a/examples/simple/igraph_community_infomap.out b/examples/simple/igraph_community_infomap.out
+index c8d4b4efe..48c7d66c5 100644
+--- a/examples/simple/igraph_community_infomap.out
++++ b/examples/simple/igraph_community_infomap.out
+@@ -18,5 +18,4 @@ Codelength: 3.87095 (in 5 modules)
+ Membership: 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 0 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 3 3 
+ # Wiktionary english verbs (synonymy 2008)
+ |V|=7339 |E|=8293 directed=0
+-Codelength: 5.70863 (in 1444 modules)
+-Membership (1/100 of vertices): 0 25 38 76 107 149 172 79 115 161 262 291 169 331 102 51 40 399 410 363 318 453 171 485 255 498 141 529 526 424 39 262 35 371 466 341 349 668 301 653 401 734 449 763 787 288 630 232 868 147 429 693 681 739 303 98 1033 528 923 245 459 1159 254 1210 1237 384 1276 97 214 579 1075 559 139 76 
++Codelength OK.


=====================================
debian/patches/09-hrg-test-relaxation.patch
=====================================
@@ -0,0 +1,132 @@
+From d44cd692ba41cf65fb0b934c6ecb79252513deb3 Mon Sep 17 00:00:00 2001
+From: Tamas Nepusz <ntamas at gmail.com>
+Date: Mon, 20 Apr 2020 15:57:09 +0200
+Subject: [PATCH] relaxed test cases for HRG model; results are not consistent
+ on i386
+
+---
+ examples/simple/igraph_hrg2.c   | 22 +++++++++++++++++++---
+ examples/simple/igraph_hrg2.out |  2 --
+ examples/simple/igraph_hrg3.c   | 24 +++++++++++++++++++-----
+ examples/simple/igraph_hrg3.out |  2 --
+ tests/hrg.at                    |  4 ++--
+ 5 files changed, 40 insertions(+), 14 deletions(-)
+ delete mode 100644 examples/simple/igraph_hrg2.out
+ delete mode 100644 examples/simple/igraph_hrg3.out
+
+diff --git a/examples/simple/igraph_hrg2.c b/examples/simple/igraph_hrg2.c
+index 67883d2dd..4652972eb 100644
+--- a/examples/simple/igraph_hrg2.c
++++ b/examples/simple/igraph_hrg2.c
+@@ -27,6 +27,7 @@
+ int main() {
+     igraph_t karate;
+     igraph_vector_t parents, weights;
++    long int i, n;
+ 
+     igraph_rng_seed(igraph_rng_default(), 42);
+ 
+@@ -65,9 +66,24 @@ int main() {
+     igraph_hrg_consensus(&karate, &parents, &weights, /* hrg= */ 0,
+                          /* start= */ 0, /* num_samples= */ 100);
+ 
+-    /* Check */
+-    igraph_vector_print(&parents);
+-    igraph_vector_print(&weights);
++    /* We do some simple validity tests on the resolts only; the exact results
++     * are different on i386 vs other platforms due to numerical inaccuracies */
++    if (igraph_vector_size(&weights) + igraph_vcount(&karate) != igraph_vector_size(&parents)) {
++        printf("Vector length mismatch: %ld + %ld != %ld\n",
++            (long int) igraph_vector_size(&weights), (long int) igraph_vcount(&karate),
++            (long int) igraph_vector_size(&parents)
++        );
++        return 1;
++    }
++
++    n = igraph_vector_size(&parents);
++    for (i = 0; i < n; i++) {
++        if (VECTOR(parents)[i] < -1 || VECTOR(parents)[i] >= igraph_vcount(&karate) + igraph_vector_size(&weights)) {
++            printf("Invalid parents vector:\n");
++            igraph_vector_print(&parents);
++			return 2;
++        }
++    }
+ 
+     igraph_vector_destroy(&parents);
+     igraph_vector_destroy(&weights);
+diff --git a/examples/simple/igraph_hrg2.out b/examples/simple/igraph_hrg2.out
+deleted file mode 100644
+index b066fcf12..000000000
+--- a/examples/simple/igraph_hrg2.out
++++ /dev/null
+@@ -1,2 +0,0 @@
+-37 37 37 37 36 36 36 37 34 37 36 37 37 37 37 37 36 37 37 37 37 37 37 37 35 35 37 37 37 37 34 37 37 37 37 37 37 -1
+-54 59 71 100
+diff --git a/examples/simple/igraph_hrg3.c b/examples/simple/igraph_hrg3.c
+index afeec3cf6..c6196d16e 100644
+--- a/examples/simple/igraph_hrg3.c
++++ b/examples/simple/igraph_hrg3.c
+@@ -27,6 +27,7 @@
+ int main() {
+     igraph_t karate;
+     igraph_vector_t edges, prob;
++    long int i, n;
+ 
+     igraph_rng_seed(igraph_rng_default(), 42);
+ 
+@@ -65,12 +66,25 @@ int main() {
+     igraph_hrg_predict(&karate, &edges, &prob, /* hrg= */ 0, /* start= */ 0,
+                        /* num_samples= */ 100, /* num_bins= */ 25);
+ 
+-    /* Check */
+-    igraph_vector_print(&edges);
+-    igraph_vector_print(&prob);
++    /* We do some simple validity tests on the resolts only; the exact results
++     * are different on i386 vs other platforms due to numerical inaccuracies */
++    n = igraph_vector_size(&edges);
++    for (i = 0; i < n; i++) {
++		if (VECTOR(edges)[i] < 0 || VECTOR(edges)[i] >= igraph_vcount(&karate)) {
++            printf("Invalid edges vector:\n");
++            igraph_vector_print(&edges);
++			return 1;
++		}
++	}
++    n = igraph_vector_size(&prob);
++    for (i = 0; i < n; i++) {
++		if (VECTOR(prob)[i] < 0 || VECTOR(prob)[i] > 1) {
++            printf("Invalid prob vector:\n");
++            igraph_vector_print(&prob);
++			return 2;
++		}
++	}
+ 
+-    igraph_vector_destroy(&edges);
+-    igraph_vector_destroy(&prob);
+     igraph_destroy(&karate);
+ 
+     return 0;
+diff --git a/examples/simple/igraph_hrg3.out b/examples/simple/igraph_hrg3.out
+deleted file mode 100644
+index 79442ebe7..000000000
+--- a/examples/simple/igraph_hrg3.out
++++ /dev/null
+@@ -1,2 +0,0 @@
+-28 32 0 16 27 32 9 32 26 32 4 5 4 16 10 16 6 10 1 12 2 17 2 19 2 21 2 18 2 31 2 30 2 29 2 23 2 20 2 33 2 15 2 22 2 14 2 26 2 12 3 17 3 21 7 13 3 19 2 24 2 25 23 26 24 33 27 29 0 26 25 33 2 11 0 25 2 16 2 4 2 5 2 6 2 10 1 11 26 27 9 24 14 25 25 30 25 29 20 25 18 25 22 25 25 32 15 25 25 28 8 25 0 9 0 27 0 22 0 32 0 33 0 14 0 28 0 15 0 29 0 18 0 30 0 20 0 23 9 25 24 26 14 24 15 24 22 24 24 29 23 24 24 28 18 24 20 24 24 30 24 32 8 24 25 27 25 26 0 24 12 13 7 12 12 21 12 17 12 19 3 11 9 27 7 19 26 30 23 31 8 27 26 31 27 28 9 31 18 26 8 26 15 26 7 17 14 26 20 26 27 30 26 28 27 31 8 14 29 31 22 26 20 27 14 27 7 21 8 9 13 19 18 23 15 27 30 31 8 31 9 30 22 27 8 23 11 16 28 29 14 23 9 29 9 26 13 21 6 11 19 25 17 24 19 24 19 26 1 24 3 24 13 24 9 19 15 19 19 20 19 31 19 28 19 23 18 19 19 30 8 19 19 32 19 29 19 27 14 19 23 30 19 22 12 24 7 24 9 23 21 24 17 25 3 25 1 25 18 27 13 25 8 28 9 11 12 25 11 26 5 11 7 25 6 26 11 18 3 26 11 14 11 22 6 25 11 31 11 23 11 20 11 27 11 32 3 9 11 33 11 29 11 15 11 28 11 30 8 11 3 15 21 25 3 29 3 22 3 23 17 26 1 26 3 18 3 33 9 17 3 8 3 32 9 28 3 31 1 9 3 30 3 28 3 14 3 20 13 26 9 13 3 27 13 32 13 18 1 18 17 22 1 27 1 31 1 8 17 18 17 29 13 22 8 17 17 30 17 23 1 20 1 29 1 14 17 32 13 28 13 15 13 20 8 13 14 17 17 31 13 23 13 31 15 17 1 28 13 30 17 20 1 33 20 29 1 23 17 33 1 32 13 27 17 27 1 22 13 14 17 28 1 15 13 29 7 26 13 17 8 29 7 9 9 21 15 31 21 26 7 14 18 21 7 22 15 21 8 21 21 29 7 29 21 32 21 22 7 30 7 23 20 21 7 33 7 27 7 18 21 23 21 33 7 8 21 30 7 20 21 31 7 28 7 31 21 27 14 21 7 15 7 32 21 28 15 28 9 12 12 26 12 22 12 30 8 22 12 15 12 23 12 14 12 18 12 33 8 12 12 28 12 20 18 28 12 27 12 31 12 29 12 32 16 24 5 26 10 12 5 25 29 30 23 28 11 24 20 30 20 23 11 25 4 24 8 18 6 24 10 24 5 24 28 30 12 16 15 23 8 20 10 26 9 15 16 25 22 31 20 28 9 22 10 11 9 14 4 26 14 31 16 26 9 16 4 25 9 18 16 18 16 20 16 33 16 23 8 16 16 32 16 28 15 16 16 30 16 27 16 29 16 31 16 22 14 16 5 9 9 10 18 29 4 9 3 16 6 9 4 32 5 28 5 32 4 8 6 8 10 20 4 20 6 30 6 14 4 15 4 27 5 15 10 31 4 22 6 33 10 32 5 14 5 20 10 15 4 30 6 23 5 29 6 29 4 14 5 18 5 27 6 15 10 27 4 23 5 22 14 28 4 31 5 23 5 33 6 20 4 33 10 14 10 29 6 28 10 23 6 31 10 30 6 18 10 18 4 28 4 18 10 22 8 10 6 22 6 32 17 19 5 8 4 29 5 31 10 28 10 33 10 25 5 30 6 27 22 29 14 29 9 20 22 23 22 30 16 17 16 19 1 16 18 30 16 21 11 12 13 16 7 16 15 29 6 12 8 15 19 21 4 12 20 31 17 21 18 31 15 30 14 30 22 28 4 11 5 12 18 22 14 22 11 19 11 17 7 11 3 10 3 6 3 4 3 5 15 20 10 17 15 18 14 20 10 19 11 13 11 21 14 18 1 10 10 21 10 13 7 10 4 17 5 17 6 17 18 20 4 19 20 22 5 19 6 19 1 4 5 13 6 13 1 6 6 7 5 7 6 21 5 21 4 13 4 21 1 5 4 7 15 22 14 15
+-0.719645 0.683752 0.595454 0.506803 0.485989 0.333764 0.322943 0.296878 0.29381 0.210965 0.195612 0.192923 0.192473 0.187386 0.187317 0.187287 0.187271 0.187263 0.187259 0.187257 0.187251 0.187239 0.187207 0.183749 0.180832 0.180023 0.178898 0.172966 0.17008 0.162812 0.161228 0.146531 0.14168 0.14086 0.140079 0.137672 0.136404 0.13489 0.132525 0.129325 0.129274 0.129251 0.129244 0.127252 0.121633 0.118454 0.115711 0.115706 0.115694 0.115683 0.115682 0.115657 0.115611 0.115604 0.115604 0.114481 0.114458 0.114109 0.114107 0.114102 0.11409 0.114085 0.114064 0.114043 0.114034 0.114031 0.114022 0.114013 0.114007 0.111269 0.110006 0.109708 0.109707 0.109704 0.109694 0.109681 0.109677 0.109661 0.109632 0.109603 0.109603 0.1093 0.106033 0.104809 0.0992668 0.0884375 0.082076 0.0716273 0.0712673 0.0708578 0.0572492 0.0572258 0.0548409 0.0516339 0.0516273 0.0516179 0.050817 0.0504033 0.0484469 0.0476284 0.047237 0.0464392 0.0464134 0.0452337 0.0448152 0.044808 0.0448008 0.0444422 0.0428334 0.042442 0.0420407 0.0412366 0.0404388 0.0388367 0.0388291 0.0388284 0.0384316 0.0384281 0.0384259 0.0380347 0.0376165 0.0372312 0.0368211 0.0364223 0.0360174 0.0356178 0.034807 0.0344143 0.0336229 0.0336045 0.0328007 0.0324309 0.0324261 0.0324191 0.0324163 0.0324147 0.0324068 0.0324002 0.0320294 0.0320259 0.0320247 0.0320217 0.0320193 0.0320179 0.0320174 0.0320164 0.032016 0.0320091 0.0320052 0.0320041 0.0320039 0.032001 0.0316184 0.0316037 0.0312305 0.0312223 0.0312223 0.0312184 0.0312173 0.0312057 0.0312007 0.0308168 0.0304284 0.0304253 0.0304241 0.0304122 0.0304104 0.0304093 0.0300288 0.0300273 0.0300273 0.0300262 0.0300229 0.0300227 0.0300217 0.0300215 0.0300211 0.0300183 0.0300174 0.030015 0.0300104 0.0300071 0.0300064 0.0300057 0.0300038 0.0296276 0.0296275 0.0296268 0.0296253 0.0296244 0.0296235 0.0296223 0.0296217 0.0296214 0.0296169 0.0296166 0.0296164 0.0296156 0.0296156 0.029613 0.0296129 0.0296124 0.029609 0.0296074 0.0296068 0.0296067 0.029601 0.0292285 0.0292281 0.029228 0.029227 0.0292264 0.0292253 0.0292247 0.029224 0.0292234 0.0292214 0.0292206 0.0292204 0.0292199 0.0292194 0.0292193 0.0292185 0.0292177 0.0292175 0.029215 0.0292149 0.0292143 0.0292138 0.0292135 0.0292134 0.0292131 0.0292131 0.0292129 0.0292124 0.0292124 0.0292109 0.0292097 0.0292094 0.0292069 0.0292067 0.0292065 0.0292057 0.0292055 0.0292054 0.029204 0.0292038 0.0292024 0.0288275 0.0288264 0.0288248 0.0288216 0.0288214 0.0288177 0.0288109 0.028428 0.0284278 0.0284269 0.0284265 0.0284252 0.0284206 0.0284198 0.0284189 0.0284187 0.0284185 0.0284165 0.0284155 0.0284155 0.0284151 0.0284146 0.0284142 0.028414 0.0284109 0.0284108 0.0284086 0.0284075 0.0284049 0.0284044 0.0284042 0.028403 0.0284029 0.0284028 0.0284005 0.0280205 0.0280151 0.0280087 0.0276275 0.0276274 0.0276265 0.0276218 0.0276199 0.0276192 0.0276182 0.0276174 0.0276123 0.0276102 0.0276097 0.0276094 0.0276089 0.0276079 0.0276054 0.0276023 0.0272245 0.0272132 0.027208 0.0268207 0.0268192 0.0264199 0.0264097 0.0264007 0.0264001 0.0260233 0.0260197 0.026016 0.0260091 0.0260072 0.0260005 0.0260003 0.0256047 0.0256043 0.0256007 0.0252222 0.025217 0.0252062 0.0252034 0.0252007 0.024803 0.0244133 0.0244056 0.0240202 0.024002 0.0236216 0.0236123 0.023611 0.0236066 0.0232214 0.0232209 0.0232176 0.0232161 0.0232137 0.0232132 0.0232124 0.0232119 0.0232118 0.0232104 0.0232091 0.0232062 0.0232045 0.0232042 0.0228161 0.0228156 0.022807 0.0228039 0.0228029 0.0228021 0.0224223 0.0224216 0.0224215 0.0224211 0.0224203 0.0224197 0.0224191 0.0224184 0.022417 0.0224165 0.0224151 0.0224148 0.0224143 0.0224142 0.0224142 0.0224141 0.0224134 0.0224131 0.0224131 0.0224129 0.0224128 0.0224125 0.0224125 0.0224124 0.0224123 0.0224121 0.0224121 0.0224114 0.022411 0.0224107 0.0224104 0.0224102 0.0224101 0.0224096 0.0224095 0.0224094 0.0224077 0.0224072 0.0224065 0.0224063 0.0224056 0.0224052 0.0224049 0.0224044 0.0224042 0.0224041 0.022404 0.0224037 0.0224036 0.0224034 0.0224032 0.0224031 0.022403 0.0224029 0.0224026 0.0224018 0.0224016 0.0224013 0.0224007 0.0216173 0.0216148 0.0216058 0.0212203 0.0212042 0.0208108 0.0200013 0.0196172 0.0196143 0.0196133 0.019607 0.0196048 0.0196009 0.0192092 0.0192003 0.018008 0.0176086 0.0172075 0.0168134 0.0156149 0.0156131 0.0156029 0.014807 0.0136058 0.0136001 0.0124021 0.0108058 0.0100088 0.010001 0.00960377 0.00960348 0.00960337 0.00800783 0.00800481 0.00800239 0.00760756 0.00760068 0.00720552 0.00720059 0.00680338 0.00680201 0.00680079 0.00640602 0.00640375 0.00640105 0.00640075 0.00640054 0.00600575 0.0060053 0.00600322 0.00600158 0.00520508 0.00520475 0.00520195 0.00520112 0.00480422 0.00480307 0.00480259 0.00480227 0.00480201 0.00480169 0.00480167 0.00480059 0.00480054 0.0048004 0.00480027 0.00480025 0.00400192 0.00360318
+diff --git a/tests/hrg.at b/tests/hrg.at
+index 317fc0c6c..2e33e7bec 100644
+--- a/tests/hrg.at
++++ b/tests/hrg.at
+@@ -28,10 +28,10 @@ AT_CLEANUP
+ 
+ AT_SETUP([Consensus tree (igraph_hrg_consensus) :])
+ AT_KEYWORDS([hierarchical random graph consensus tree])
+-AT_COMPILE_CHECK([simple/igraph_hrg2.c], [simple/igraph_hrg2.out])
++AT_COMPILE_CHECK([simple/igraph_hrg2.c])
+ AT_CLEANUP
+ 
+ AT_SETUP([Missing edge prediction (igraph_hrg_predict) :])
+ AT_KEYWORDS([hierarchical random graph missing edge prediction])
+-AT_COMPILE_CHECK([simple/igraph_hrg3.c], [simple/igraph_hrg3.out])
++AT_COMPILE_CHECK([simple/igraph_hrg3.c])
+ AT_CLEANUP


=====================================
debian/patches/series
=====================================
@@ -1,3 +1,12 @@
 skip_tests_accessing_remote.patch
 soversion.patch
 enable_removing_third_party_code.patch
+01-fix-adjacency-spectral-embedding.patch
+02-fix-scg2-test-case.patch
+03-fix-igraph-i-gml-tostring-static-var.patch
+04-fix-igraph-layout-merge2-test-case.patch
+05-canonical-scg-grouping.patch
+06-canonical-scg-eigenvectors.patch
+07-canonical-infomap.patch
+08-infomap-test-relaxation.patch
+09-hrg-test-relaxation.patch



View it on GitLab: https://salsa.debian.org/med-team/igraph/-/compare/544120c3f5513100bc5049596df55032c55d9944...8a4f570b5ef89ebb97a7cef7a0fcf142c7ca6bbd

-- 
View it on GitLab: https://salsa.debian.org/med-team/igraph/-/compare/544120c3f5513100bc5049596df55032c55d9944...8a4f570b5ef89ebb97a7cef7a0fcf142c7ca6bbd
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200420/09aa20e7/attachment-0001.html>


More information about the debian-med-commit mailing list