[Vegan-commits] r1857 - pkg/vegan/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Sep 19 18:06:09 CEST 2011


Author: jarioksa
Date: 2011-09-19 18:06:09 +0200 (Mon, 19 Sep 2011)
New Revision: 1857

Modified:
   pkg/vegan/src/nestedness.c
Log:
use dedicated isDiagFill in swapcount: a bit faster

Modified: pkg/vegan/src/nestedness.c
===================================================================
--- pkg/vegan/src/nestedness.c	2011-09-19 15:36:05 UTC (rev 1856)
+++ pkg/vegan/src/nestedness.c	2011-09-19 16:06:09 UTC (rev 1857)
@@ -348,10 +348,8 @@
 	for (k = 0; k < 4; k ++)
 	    sm[k] = m[ij[k]];
 	/* The largest value that can be swapped */
-/*	ev = isDiagFill(sm);
- 	if (ev != 0) { */
-	ev = isDiag(sm, &got);
-	if (ev != 0 && got == 0) {
+	ev = isDiagFill(sm);
+ 	if (ev != 0) { 
 		for (k = 0; k < 4; k++)
 			m[ij[k]] += pm[k]*ev;
 		changed++;



More information about the Vegan-commits mailing list