SCM

SCM Repository

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

Diff of /pkg/src/Mutils.h

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

revision 738, Tue May 17 17:25:31 2005 UTC revision 796, Mon Jul 4 14:57:28 2005 UTC
# Line 53  Line 53 
53                  int ap[], int ai[], double ax[]);                  int ap[], int ai[], double ax[]);
54  void ssc_symbolic_permute(int n, int upper, const int perm[],  void ssc_symbolic_permute(int n, int upper, const int perm[],
55                            int Ap[], int Ai[]);                            int Ap[], int Ai[]);
 double *nlme_symmetrize(double *a, const int nc);  
 void nlme_check_Lapack_error(int info, const char *laName);  
 SEXP nlme_replaceSlot(SEXP obj, SEXP names, SEXP value);  
 SEXP nlme_weight_matrix_list(SEXP MLin, SEXP wts, SEXP adjst, SEXP MLout);  
56  SEXP Matrix_make_named(int TYP, char **names);  SEXP Matrix_make_named(int TYP, char **names);
57  SEXP check_scalar_string(SEXP sP, char *vals, char *nm);  SEXP check_scalar_string(SEXP sP, char *vals, char *nm);
58  double *packed_to_full(double *dest, const double *src, int n,  double *packed_to_full(double *dest, const double *src, int n,
# Line 243  Line 239 
239    
240  SEXP Matrix_expand_pointers(SEXP pP);  SEXP Matrix_expand_pointers(SEXP pP);
241    
242    
243    /**
244     * Elementwise increment dest by src
245     *
246     * @param dest vector to be incremented
247     * @param src vector to be added to dest
248     * @param n length of vectors
249     *
250     * @return dest
251     */
252    static R_INLINE double*
253    vecIncrement(double dest[], const double src[], int n) {
254        int i;
255        for (i = 0; i < n; i++) dest[i] += src[i];
256        return dest;
257    }
258    
259    /**
260     * Elementwise sum of src1 and src2 into dest
261     *
262     * @param dest vector to be incremented
263     * @param src1 vector to be added
264     * @param src1 second vector to be added
265     * @param n length of vectors
266     *
267     * @return dest
268     */
269    static R_INLINE double*
270    vecSum(double dest[], const double src1[], const double src2[],
271           int n) {
272        int i;
273        for (i = 0; i < n; i++) dest[i] = src1[i] + src2[i];
274        return dest;
275    }
276    
277  #ifdef __cplusplus  #ifdef __cplusplus
278  }  }
279  #endif  #endif

Legend:
Removed from v.738  
changed lines
  Added in v.796

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