From 0a38ea847fd061fc4ad563b76208c2ceda83477e Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 21 Jan 2025 18:16:09 +0100 Subject: [PATCH 1/2] Update graphobject.c - reverse cutoff, normalized args --- src/_igraph/graphobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_igraph/graphobject.c b/src/_igraph/graphobject.c index 95a29e5ff..e06befbfd 100644 --- a/src/_igraph/graphobject.c +++ b/src/_igraph/graphobject.c @@ -4832,7 +4832,7 @@ PyObject *igraphmodule_Graph_closeness(igraphmodule_GraphObject * self, return NULL; } if (igraph_closeness_cutoff(&self->g, &res, NULL, NULL, vs, mode, weights, - PyObject_IsTrue(normalized_o), PyFloat_AsDouble(cutoff_num))) { + PyFloat_AsDouble(cutoff_num), PyObject_IsTrue(normalized_o))) { igraph_vs_destroy(&vs); igraph_vector_destroy(&res); if (weights) { igraph_vector_destroy(weights); free(weights); } @@ -4912,7 +4912,7 @@ PyObject *igraphmodule_Graph_harmonic_centrality(igraphmodule_GraphObject * self return NULL; } if (igraph_harmonic_centrality_cutoff(&self->g, &res, vs, mode, weights, - PyFloat_AsDouble(cutoff_num), PyObject_IsTrue(normalized_o))) { + PyObject_IsTrue(normalized_o), PyFloat_AsDouble(cutoff_num))) { igraph_vs_destroy(&vs); igraph_vector_destroy(&res); if (weights) { igraph_vector_destroy(weights); free(weights); } From c062c45a70eefce265de08e875dd9e4937c094fa Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Wed, 22 Jan 2025 12:12:29 +0100 Subject: [PATCH 2/2] Update graphobject.c --- src/_igraph/graphobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_igraph/graphobject.c b/src/_igraph/graphobject.c index e06befbfd..894e35d26 100644 --- a/src/_igraph/graphobject.c +++ b/src/_igraph/graphobject.c @@ -4832,7 +4832,7 @@ PyObject *igraphmodule_Graph_closeness(igraphmodule_GraphObject * self, return NULL; } if (igraph_closeness_cutoff(&self->g, &res, NULL, NULL, vs, mode, weights, - PyFloat_AsDouble(cutoff_num), PyObject_IsTrue(normalized_o))) { + PyObject_IsTrue(normalized_o), PyFloat_AsDouble(cutoff_num))) { igraph_vs_destroy(&vs); igraph_vector_destroy(&res); if (weights) { igraph_vector_destroy(weights); free(weights); }