SCM

SCM Repository

[matrix] Diff of /pkg/Matrix/src/Mutils.h
ViewVC logotype

Diff of /pkg/Matrix/src/Mutils.h

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

revision 2174, Wed Apr 23 11:21:37 2008 UTC revision 2175, Wed Apr 23 11:23:50 2008 UTC
# Line 204  Line 204 
204      return mj;      return mj;
205  }  }
206    
207    /**
208     * Check if  obj@x  contains any NA (or NaN).
209     *
210     * @param obj   a 'Matrix' object with an 'x' slot.
211     *
212     * @return Rboolean :== any(is.na( obj @ x) )
213     */
214    static R_INLINE
215    Rboolean any_NA(SEXP obj)
216    {
217        double *x = REAL(GET_SLOT(obj, Matrix_xSym));
218        int i, n = LENGTH(GET_SLOT(obj, Matrix_xSym));
219        for(i=0; i < n; i++)
220            if(ISNAN(x[i])) return TRUE;
221        /* else */
222        return FALSE;
223    }
224    
225    
226  void make_d_matrix_triangular(double *x, SEXP from);  void make_d_matrix_triangular(double *x, SEXP from);
227  void make_i_matrix_triangular(   int *x, SEXP from);  void make_i_matrix_triangular(   int *x, SEXP from);
228    

Legend:
Removed from v.2174  
changed lines
  Added in v.2175

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