SCM

SCM Repository

[matrix] Diff of /pkg/src/Csparse.c
ViewVC logotype

Diff of /pkg/src/Csparse.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2299, Fri Oct 17 16:07:38 2008 UTC revision 2304, Sun Oct 26 15:27:45 2008 UTC
# Line 69  Line 69 
69              }              }
70      }      }
71      if (!sorted) {      if (!sorted) {
72          CHM_SP chx = (CHM_SP) alloca(sizeof(cholmod_sparse));          return mkString(_("row indices are not sorted within columns"));
         R_CheckStack();  
         as_cholmod_sparse(chx, x, FALSE, TRUE); /* includes cholmod_l_sort() ! */  
         /* as chx = AS_CHM_SP__(x)  but  ^^^^  sorting x in_place (no copying)*/  
   
         /* Now re-check that row indices are *strictly* increasing  
          * (and not just increasing) within each column : */  
         for (j = 0; j < ncol; j++) {  
             for (k = xp[j] + 1; k < xp[j + 1]; k++)  
                 if (xi[k] == xi[k - 1])  
                     return mkString(_("slot i is not *strictly* increasing inside a column (even after cholmod_l_sort)"));  
         }  
   
73      } else if(!strictly) {  /* sorted, but not strictly */      } else if(!strictly) {  /* sorted, but not strictly */
74          return mkString(_("slot i is not *strictly* increasing inside a column"));          return mkString(_("slot i is not *strictly* increasing inside a column"));
75      }      }

Legend:
Removed from v.2299  
changed lines
  Added in v.2304

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge