[Rcpp-commits] r2526 - pkg/Rcpp/inst/doc/Rcpp-modules
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Nov 26 10:49:11 CET 2010
Author: romain
Date: 2010-11-26 10:49:11 +0100 (Fri, 26 Nov 2010)
New Revision: 2526
Modified:
pkg/Rcpp/inst/doc/Rcpp-modules/Rcpp-modules.Rnw
Log:
s/width/range
Modified: pkg/Rcpp/inst/doc/Rcpp-modules/Rcpp-modules.Rnw
===================================================================
--- pkg/Rcpp/inst/doc/Rcpp-modules/Rcpp-modules.Rnw 2010-11-25 16:07:39 UTC (rev 2525)
+++ pkg/Rcpp/inst/doc/Rcpp-modules/Rcpp-modules.Rnw 2010-11-26 09:49:11 UTC (rev 2526)
@@ -427,8 +427,6 @@
A class is exposed using the \texttt{class\_} class. The \texttt{World}
class may be exposed to \proglang{R} :
-%% [Dirk:] should 'width' be 'range' ?
-
<<lang=cpp>>=
using namespace Rcpp ;
class Uniform {
@@ -443,7 +441,7 @@
double min, max ;
};
-double width( Uniform* w){
+double range( Uniform* w){
return w->max - w->min ;
}
@@ -457,7 +455,7 @@
.field( "max", &Uniform::max )
.method( "draw", &World::draw )
- .method( "width", &width )
+ .method( "range", &range )
;
}
@@ -478,7 +476,7 @@
double min, max ;
};
-double width( Uniform* w){
+double range( Uniform* w){
return w->max - w->min ;
}
@@ -492,7 +490,7 @@
.field( "max", &Uniform::max )
.method( "draw", &Uniform::draw )
- .method( "width", &width )
+ .method( "range", &range )
;
}
@@ -503,9 +501,9 @@
Uniform <- unif_module$Uniform
u <- new( Uniform, 0, 10 )
u$draw( 10L )
-u$width()
+u$range()
u$max <- 1
-u$width()
+u$range()
u$draw( 10 )
@
More information about the Rcpp-commits
mailing list