Anonymous avatar Anonymous committed 83c160d

made some todos more visible

Comments (0)

Files changed (2)

src/packedmatrix.c

   for (i=0; i< M->nrows; i++ ) {
     printf("[");
     row = M->values + M->rowswap[i];
-    /* TODO: This is not correct */
-    for (j=0; j< (M->ncols+M->offset)/RADIX; j++) {
-      m4ri_word_to_str(temp, row[j], 1);
-      printf("%s ", temp);
+    if(M->offset == 0) {
+      for (j=0; j< M->width-1; j++) {
+        m4ri_word_to_str(temp, row[j], 1);
+        printf("%s ", temp);
+      }
+      row = row + M->width - 1;
+      for (j=0; j< (size_t)(M->ncols%RADIX); j++) {
+        if (GET_BIT(*row, j)) 
+          printf("1");
+        else
+          printf(" ");
+        if (((j % 4)==3) && (j!=RADIX-1))
+          printf(":");
+      }
+    } else {
+      for (j=0; j< M->ncols; j++) {
+        if(mzd_read_bit(M, i, j))
+          printf("1");
+        else
+          printf(" ");
+        if (((j % 4)==3) && (j!=RADIX-1))
+          printf(":");
+      }
     }
-    row = row + M->width - 1;
-    for (j=0; j< (size_t)((M->ncols+M->offset)%RADIX); j++) {
-      if (GET_BIT(*row, j)) 
-        printf("1");
-      else
-        printf(" ");
-      if (((j % 4)==3) && (j!=RADIX-1))
-        printf(":");
-    }
-    if (M->ncols%RADIX)
-      printf("]\n");
-    else
-      printf("]\n");
+    printf("]\n");
   }
 }
 
       }
     }
     size_t i, j, p_truerow, n_truerow;
-    /* TODO: This is wrong */
+    /**
+     * \todo This is wrong 
+     */
     int trailingdim =  RADIX - p->ncols - p->offset;
 
     if (trailingdim >= 0) {
     for (size_t i=1; i < mb; ++i) {
       
       /* Computes X_i = B_i + L_{i,0..i-1} X_{0..i-1}  */
-      /** TODO: Need to be optimized !!! **/ 
+      /**
+       * \todo needs to be optimized!
+       **/ 
       size_t Lidx = L->rowswap[i];
       size_t Bidx = B->rowswap[i];
 
 
     for (size_t i=1; i < mb; ++i) {
       /* Computes X_i = B_i + L_{i,0..i-1} X_{0..i-1}  */
-      /** TODO: Need to be optimized !!! **/
+      /**
+       * \todo needs to be optimized!
+       **/ 
       size_t Lidx = L->rowswap[i];
       size_t Bidx = B->rowswap[i];
 
 
       for (size_t i=1; i < mb; ++i) {
 	/* Computes X_i = B_i + L_{i,0..i-1} X_{0..i-1}  */
-	/** TODO: Need to be optimized !!! **/
+        /**
+         * \todo needs to be optimized!
+         **/ 
 	size_t Lidx = L->rowswap[i];
 	size_t Bidx = B->rowswap[i];
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.