[Scipy-svn] r4571 - trunk/scipy/cluster/src

scipy-svn@scip... scipy-svn@scip...
Tue Jul 29 00:16:42 CDT 2008


Author: cdavid
Date: 2008-07-29 00:16:38 -0500 (Tue, 29 Jul 2008)
New Revision: 4571

Modified:
   trunk/scipy/cluster/src/hierarchy.c
Log:
Use memset instead of deprecated bzero in cluster/hiearchical.

Modified: trunk/scipy/cluster/src/hierarchy.c
===================================================================
--- trunk/scipy/cluster/src/hierarchy.c	2008-07-29 00:06:51 UTC (rev 4570)
+++ trunk/scipy/cluster/src/hierarchy.c	2008-07-29 05:16:38 UTC (rev 4571)
@@ -949,8 +949,8 @@
   curNode[k] = (n * 2) - 2;
   left[k] = 0;
   nc2 = NCHOOSE2(n);
-  bzero(lvisited, bff);
-  bzero(rvisited, bff);
+  memset(lvisited, 0, bff);
+  memset(rvisited, 0, bff);
 
   while (k >= 0) {
     ndid = curNode[k];
@@ -1041,8 +1041,8 @@
     levelSum = 0.0;
     levelCnt = 0;
     levelStdSum = 0.0;
-    bzero(lvisited, bff);
-    bzero(rvisited, bff);
+    memset(lvisited, 0, bff);
+    memset(rvisited, 0, bff);
     curNode[0] = i;
     for (k = 0; k >= 0;) {
       ndid = curNode[k];
@@ -1135,8 +1135,8 @@
   rvisited = (unsigned char*)malloc(bff);
   curNode[k] = (n * 2) - 2;
   left[k] = 0;
-  bzero(lvisited, bff);
-  bzero(rvisited, bff);
+  memset(lvisited, 0, bff);
+  memset(rvisited, 0, bff);
 
   while (k >= 0) {
     ndid = curNode[k];
@@ -1234,8 +1234,8 @@
   ms = -1;
   k = 0;
   curNode[k] = (n * 2) - 2;
-  bzero(lvisited, bff);
-  bzero(rvisited, bff);
+  memset(lvisited, 0, bff);
+  memset(rvisited, 0, bff);
   ms = -1;
   while (k >= 0) {
     ndid = curNode[k];
@@ -1312,8 +1312,8 @@
   lvisited = (unsigned char*)malloc(bff);
   rvisited = (unsigned char*)malloc(bff);
   curNode[k] = (n * 2) - 2;
-  bzero(lvisited, bff);
-  bzero(rvisited, bff);
+  memset(lvisited, 0, bff);
+  memset(rvisited, 0, bff);
 
   /** number of clusters formed so far. */
   nc = 0;
@@ -1332,8 +1332,8 @@
     }
     k = 0;
     curNode[k] = (n * 2) - 2;
-    bzero(lvisited, bff);
-    bzero(rvisited, bff);
+    memset(lvisited, 0, bff);
+    memset(rvisited, 0, bff);
     nc = 0;
     ms = -1;
     /** See if the threshold MD[g] works. **/
@@ -1416,8 +1416,8 @@
   lvisited = (unsigned char*)malloc(bff);
   rvisited = (unsigned char*)malloc(bff);
   curNode[k] = (n * 2) - 2;
-  bzero(lvisited, bff);
-  bzero(rvisited, bff);
+  memset(lvisited, 0, bff);
+  memset(rvisited, 0, bff);
   while (k >= 0) {
     ndid = curNode[k];
     Zrow = Z + ((ndid-n) * CPY_LIS);
@@ -1468,8 +1468,8 @@
   lvisited = (unsigned char*)malloc(bff);
   rvisited = (unsigned char*)malloc(bff);
   curNode[k] = (n * 2) - 2;
-  bzero(lvisited, bff);
-  bzero(rvisited, bff);
+  memset(lvisited, 0, bff);
+  memset(rvisited, 0, bff);
   while (k >= 0) {
     ndid = curNode[k];
     Zrow = Z + ((ndid-n) * CPY_LIS);
@@ -1529,8 +1529,8 @@
   nc = 0;
   k = 0;
   curNode[k] = (n * 2) - 2;
-  bzero(lvisited, bff);
-  bzero(rvisited, bff);
+  memset(lvisited, 0, bff);
+  memset(rvisited, 0, bff);
   while (k >= 0) {
     ndid = curNode[k];
     Zrow = Z + ((ndid-n) * CPY_LIS);



More information about the Scipy-svn mailing list