[Vegan-commits] r1813 - in branches/2.0: inst src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Sep 9 14:45:39 CEST 2011


Author: jarioksa
Date: 2011-09-09 14:45:39 +0200 (Fri, 09 Sep 2011)
New Revision: 1813

Modified:
   branches/2.0/inst/ChangeLog
   branches/2.0/src/
   branches/2.0/src/monoMDS.f
   branches/2.0/src/nestedness.c
   branches/2.0/src/ordering.f
Log:
merge r1800:1801 -pedantic -Wall & netstedness.c bug

Modified: branches/2.0/inst/ChangeLog
===================================================================
--- branches/2.0/inst/ChangeLog	2011-09-09 09:51:20 UTC (rev 1812)
+++ branches/2.0/inst/ChangeLog	2011-09-09 12:45:39 UTC (rev 1813)
@@ -3,6 +3,9 @@
 VEGAN RELEASE VERSIONS at http://cran.r-project.org/
 
 Version 2.0-1 (opened September 8, 2011)
+
+	* merge r1811: permatswap bug fix in nestedness.c.
+	* merge r1810: -pedatic -Wall fixes in monoMDS.f, ordering.f
 	
 Version 2.0-0 (released September 8, 2011)
 


Property changes on: branches/2.0/src
___________________________________________________________________
Deleted: svn:mergeinfo
   - 

Modified: branches/2.0/src/monoMDS.f
===================================================================
--- branches/2.0/src/monoMDS.f	2011-09-09 09:51:20 UTC (rev 1812)
+++ branches/2.0/src/monoMDS.f	2011-09-09 12:45:39 UTC (rev 1813)
@@ -596,9 +596,9 @@
 C
       ELSE
         FACTR1=4.0**COSAV
-        FACTR2=1.6/( (1.0+(MIN(1.0,SRATAV))**5) *
+        FACTR2=1.6/( (1.0+(MIN(1D0,SRATAV))**5) *
      .    (1.0+ACOSAV-ABS(COSAV)) )
-        FACTR3=SQRT(MIN(1.0,SRATIO))
+        FACTR3=SQRT(MIN(1D0,SRATIO))
         STEP=STEP*FACTR1*FACTR2*FACTR3
       ENDIF
       RETURN

Modified: branches/2.0/src/nestedness.c
===================================================================
--- branches/2.0/src/nestedness.c	2011-09-09 09:51:20 UTC (rev 1812)
+++ branches/2.0/src/nestedness.c	2011-09-09 12:45:39 UTC (rev 1813)
@@ -175,7 +175,7 @@
     double choose[2];
 
     /* sX: number of non-zero cells */
-    for (i = 0, sX = 0; i++; i < 4)
+    for (i = 0, sX = 0; i < 4; i++)
 	    if (sm[i] > 0)
 		    sX++;
 
@@ -316,7 +316,7 @@
     int i, sX;
 
     /* sX: number of non-zero cells */
-    for (i = 0, sX = 0; i++; i < 4)
+    for (i = 0, sX = 0; i < 4; i++)
 	if (sm[i] > 0)
 	    sX++;
 
@@ -348,7 +348,7 @@
 	 ij[1] = INDX(row[1], col[0], *nr);
 	 ij[2] = INDX(row[0], col[1], *nr);
 	 ij[3] = INDX(row[1], col[1], *nr);
-	 for (k = 0; k < 4; k ++)
+	 for (k = 0; k < 4; k++)
 	      sm[k] = m[ij[k]];
 	 ev = isDiagSimple(sm);
 	 /* Swap */

Modified: branches/2.0/src/ordering.f
===================================================================
--- branches/2.0/src/ordering.f	2011-09-09 09:51:20 UTC (rev 1812)
+++ branches/2.0/src/ordering.f	2011-09-09 12:45:39 UTC (rev 1813)
@@ -7,8 +7,8 @@
 C We compute the principal coordinate of the first axis only.
 C Set the precision level for eigenvalue estimation
       Integer mat(n,k)
-      Real sumrow(n),sumtot
-      real*8 rowscore(n),colscore(n),toler,epsilon
+      double precision sumrow(n), sumtot
+      double precision rowscore(n),colscore(n),toler,epsilon
       epsilon=0.000001
       toler=  0.000001
       if(n.gt.1000) then
@@ -26,8 +26,8 @@
 
       Subroutine Centre(mat, n, k, sumrow, sumtot)
       Integer mat(n,k)
-      Real d
-      Real sumrow(n),sumtot
+      double precision d
+      double precision sumrow(n),sumtot
       do i=1,n
          sumrow(i)=0.0
          enddo
@@ -56,7 +56,7 @@
 C Compute a simple matching coefficient from a table of K-means results (integers).
 C The 'n' rows are the objects; the 'k' columns are the partitions.
       Integer mat(n,k)
-      Real d
+      double precision d
 C
       a = 0.0
       do kk=1,k
@@ -69,8 +69,8 @@
      +                toler,epsilon)
       Integer n, niter
       Integer mat(n,k)
-      Real sumrow(n),sumtot,d
-      Real*8 rowscore(n),colscore(n),epsilon,oldS,newS,toler,
+      double precision sumrow(n),sumtot,d
+      double precision rowscore(n),colscore(n),epsilon,oldS,newS,toler,
      +       oldrowsc(n)
       niter=1000
 C      Step 2: Take the column order as arbitrary initial site scores
@@ -123,7 +123,7 @@
 C  101 format(' Convergence not reached for axis:',i3/
 C     +       ' Increase NITER or lower TOLER')
 C  102 format(' N. iterations to reach convergence for axis',i3,' =',i4)
-  103 format(' There are',i4,' eigenvalues different from 0')
+C  103 format(' There are',i4,' eigenvalues different from 0')
 C  104 format(' Eigenvector',i3,' is complex [multiply values*Sqrt(-1)]')
 C  105 format(" Tolerance is: ", F12.8, "  NIter is: ", i4)
 
@@ -134,7 +134,7 @@
 
       Subroutine NormTWWS(rowscore,n,newS)
       Integer n
-      Real*8 rowscore(n),s2,newS
+      double precision rowscore(n),s2,newS
 C      Normalization for two-way weighted summation algorithm for PCA
 C      (ter Braak 1987: 123)
 C      On output, vector 'rowscore' has length = 1.



More information about the Vegan-commits mailing list