search for: sfloat

Displaying 5 results from an estimated 5 matches for "sfloat".

Did you mean: float
2003 Sep 19
1
Weird problem with my code....
...7.1 Here is the C code (save as CScalFn.c and compiled using R CMD SHLIB, then dyn.load("CScalFn.so") ) Many thanks, Guy ---------------------- #include <R.h> #define MAX(a,b) ( (a) < (b) ? (b) : (a)) #define MIN(a,b) ( (a) < (b) ? (a) : (b)) void CScalFn(Sfloat *v, Sfloat *ans, Sint *res, Sfloat *H, Sint *lengthH) { int k,n; Sfloat sum; Sint b,e; for(n=0; n< *res; ++n) { sum = 0.0; b = MAX(0, (n+1- *lengthH)/2); e = MIN(*res, n/2); /* if (n < 100) Rprintf("%d %d\n", b,e); */ for(k=b; k<= e; +...
2001 Mar 01
0
Finalization and external pointer objects
...ct data type. Most imaging functions in my library have a form like this IMAGE *imquickthresh(const IMAGE *src, IMAGE *target, float p1, int p2); the target parameter is optional and never used from R. This is made appropriate for a .C call like this Rimquickthresh(IMAGE **output, IMAGE **src, Sfloat *p1, Sint *p2) { IMAGE *dummy; dummy = imquickthresh(*src, NULL, (float)(*p1), (int)(*p2)); *output = dummy; } the R code calling this looks like function(src, p1, p2) { if (!is.image(src)) stop("Parameter 'src' should be an image.") output <- POINTER output...
2008 Jun 04
1
Splus/R typedef for C equivalent of S "integer"
We've been working on making it easier to write packages that work in both R and Splus. One issue is that R and Splus use different internal representations of integers and this makes a difference on their 64-bit versions: R uses ints (32 bits on 32-bit and 64-bit versions of R) and Splus uses longs (32 bits on 32-bit Splus and 64 bits on 64-bit Splus). The obvious ways to deal with the
2023 Apr 21
0
[Rd] R 4.3.0 is released
...call Fortran code from C/C++ without using R's headers and without allowing for these arguments.) C-LEVEL FACILITIES: * The deprecated S-compatibility macros DOUBLE_* in R_ext/Constants.h (included by R.h) have been removed. * The deprecated legacy typedefs of Sint and Sfloat in header R.h are no longer defined, and that header no longer includes header limits.h from C nor climits from C++. * New macro CAD5R() is provided in Rinternals.h and used in a few places in the R sources. * ALTREP now supports VECSXP vectors. Contributed by Gabor Csar...
2023 Apr 21
0
[Rd] R 4.3.0 is released
...call Fortran code from C/C++ without using R's headers and without allowing for these arguments.) C-LEVEL FACILITIES: * The deprecated S-compatibility macros DOUBLE_* in R_ext/Constants.h (included by R.h) have been removed. * The deprecated legacy typedefs of Sint and Sfloat in header R.h are no longer defined, and that header no longer includes header limits.h from C nor climits from C++. * New macro CAD5R() is provided in Rinternals.h and used in a few places in the R sources. * ALTREP now supports VECSXP vectors. Contributed by Gabor Csar...