[Rcpp-commits] r996 - in pkg/RcppGsl: R inst/include inst/unitTests man src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Apr 6 01:47:45 CEST 2010


Author: edd
Date: 2010-04-06 01:47:45 +0200 (Tue, 06 Apr 2010)
New Revision: 996

Added:
   pkg/RcppGsl/inst/include/RcppGSL.h
   pkg/RcppGsl/man/RcppGSL-package.Rd
   pkg/RcppGsl/src/RcppGSL.cpp
Removed:
   pkg/RcppGsl/inst/include/RcppGsl.h
   pkg/RcppGsl/man/RcppGsl-package.Rd
   pkg/RcppGsl/src/RcppGsl.cpp
Modified:
   pkg/RcppGsl/R/unit.test.R
   pkg/RcppGsl/inst/unitTests/runTests.R
   pkg/RcppGsl/inst/unitTests/runit.gsl.R
Log:
more RcppGsl to RcppGSL renaming


Modified: pkg/RcppGsl/R/unit.test.R
===================================================================
--- pkg/RcppGsl/R/unit.test.R	2010-04-05 22:36:48 UTC (rev 995)
+++ pkg/RcppGsl/R/unit.test.R	2010-04-05 23:47:45 UTC (rev 996)
@@ -1,19 +1,19 @@
-# Copyright (C)        2010 Romain Francois
+# Copyright (C)        2010 Romain Francois and Dirk Eddelbuettel
 #
-# This file is part of RcppGsl.
+# This file is part of RcppGSL.
 #
-# RcppGsl is free software: you can redistribute it and/or modify it
+# RcppGSL is free software: you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
 # the Free Software Foundation, either version 2 of the License, or
 # (at your option) any later version.
 #
-# RcppGsl is distributed in the hope that it will be useful, but
+# RcppGSL is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with RcppGsl.  If not, see <http://www.gnu.org/licenses/>.
+# along with RcppGSL.  If not, see <http://www.gnu.org/licenses/>.
 
 test <- function( output = if( file.exists( "/tmp" ) ) "/tmp" else getwd() ){
 	if( !file.exists( output ) ){ stop( "output directory does not exist" ) }

Copied: pkg/RcppGsl/inst/include/RcppGSL.h (from rev 995, pkg/RcppGsl/inst/include/RcppGsl.h)
===================================================================
--- pkg/RcppGsl/inst/include/RcppGSL.h	                        (rev 0)
+++ pkg/RcppGsl/inst/include/RcppGSL.h	2010-04-05 23:47:45 UTC (rev 996)
@@ -0,0 +1,51 @@
+// RcppGSL.h: Rcpp/GSL glue
+//
+// Copyright (C)  2010 Romain Francois and Dirk Eddelbuettel
+//
+// This file is part of RcppGSL.
+//
+// RcppGSL is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//                           
+// RcppGSL is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with RcppGSL.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPPGSL__RCPPGSL_H
+#define RCPPGSL__RCPPGSL_H
+
+#include <RcppCommon.h>
+#include <gsl/gsl_vector.h>
+
+/* forward declarations */
+namespace Rcpp{
+	template <> SEXP wrap( const gsl_vector& ) ;
+}
+
+/* implementations */
+#include <Rcpp.h>
+
+namespace Rcpp{
+	
+// namespace RcppGSL{
+// 
+// template <typename T> struct gsl_vector_type_traits ;
+// template <> struct gsl_vector_type_traits<gsl_vector> {
+// 	typedef double type ;
+// } ;
+// 
+// } // namespace RcppGSL
+
+template <> SEXP wrap( const gsl_vector& x){
+	return wrap( x.data, x.data + x.size ) ;
+}
+
+} 
+
+#endif

Deleted: pkg/RcppGsl/inst/include/RcppGsl.h
===================================================================
--- pkg/RcppGsl/inst/include/RcppGsl.h	2010-04-05 22:36:48 UTC (rev 995)
+++ pkg/RcppGsl/inst/include/RcppGsl.h	2010-04-05 23:47:45 UTC (rev 996)
@@ -1,51 +0,0 @@
-// RcppGsl.h: Rcpp/gsl glue
-//
-// Copyright (C)  2010 Romain Francois
-//
-// This file is part of RcppGsl.
-//
-// RcppGsl is free software: you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//                           
-// RcppGsl is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with RcppGsl.  If not, see <http://www.gnu.org/licenses/>.
-
-#ifndef RCPPGSL__RCPPGSL_H
-#define RCPPGSL__RCPPGSL_H
-
-#include <RcppCommon.h>
-#include <gsl/gsl_vector.h>
-
-/* forward declarations */
-namespace Rcpp{
-	template <> SEXP wrap( const gsl_vector& ) ;
-}
-
-/* implementations */
-#include <Rcpp.h>
-
-namespace Rcpp{
-	
-// namespace RcppGsl{
-// 
-// template <typename T> struct gsl_vector_type_traits ;
-// template <> struct gsl_vector_type_traits<gsl_vector> {
-// 	typedef double type ;
-// } ;
-// 
-// } // namespace RcppGsl
-
-template <> SEXP wrap( const gsl_vector& x){
-	return wrap( x.data, x.data + x.size ) ;
-}
-
-} 
-
-#endif

Modified: pkg/RcppGsl/inst/unitTests/runTests.R
===================================================================
--- pkg/RcppGsl/inst/unitTests/runTests.R	2010-04-05 22:36:48 UTC (rev 995)
+++ pkg/RcppGsl/inst/unitTests/runTests.R	2010-04-05 23:47:45 UTC (rev 996)
@@ -1,4 +1,4 @@
-pkg <- "RcppGsl"
+pkg <- "RcppGSL"
 
 if(require("RUnit", quietly = TRUE)) {
 
@@ -8,7 +8,7 @@
     	FALSE
     }
     if( is_local() ) path <- getwd()
-    
+
     library(package=pkg, character.only = TRUE)
     if(!(exists("path") && file.exists(path)))
         path <- system.file("unitTests", package = pkg)
@@ -28,9 +28,9 @@
     } else { ## run from shell / Rscript / R CMD Batch / ...
         ## Run
         tests <- runTestSuite(testSuite)
-        
+
         output <- NULL
-        
+
         process_args <- function(argv){
         	if( !is.null(argv) && length(argv) > 0 ){
         		rx <- "^--output=(.*)$"
@@ -40,9 +40,9 @@
         		}
         	}
         }
-        
-        # give a chance to the user to customize where he/she wants 
-        # the unit tests results to be stored with the --output= command 
+
+        # give a chance to the user to customize where he/she wants
+        # the unit tests results to be stored with the --output= command
         # line argument
         if( exists( "argv",  globalenv() ) ){
         	# littler
@@ -51,7 +51,7 @@
         	# Rscript
         	output <- process_args(commandArgs(TRUE))
         }
-        
+
         # if it did not work, try to use /tmp
         if( is.null(output) ){
         	if( file.exists( "/tmp" ) ){
@@ -60,14 +60,14 @@
         		output <- getwd()
         	}
         }
-        
+
         ## Print results
         output.txt  <- file.path( output, sprintf("%s-unitTests.txt", pkg))
         output.html <- file.path( output, sprintf("%s-unitTests.html", pkg))
-       
+
         printTextProtocol(tests, fileName=output.txt)
         message( sprintf( "saving txt unit test report to '%s'", output.txt ) )
-        
+
         ## Print HTML version to a file
         ## printHTMLProtocol has problems on Mac OS X
         if (Sys.info()["sysname"] != "Darwin"){

Modified: pkg/RcppGsl/inst/unitTests/runit.gsl.R
===================================================================
--- pkg/RcppGsl/inst/unitTests/runit.gsl.R	2010-04-05 22:36:48 UTC (rev 995)
+++ pkg/RcppGsl/inst/unitTests/runit.gsl.R	2010-04-05 23:47:45 UTC (rev 996)
@@ -1,24 +1,24 @@
 #!/usr/bin/r -t
 #
-# Copyright (C) 2010	Romain Francois
+# Copyright (C) 2010	Romain Francois and Dirk Eddelbuettel
 #
-# This file is part of RcppGsl.
+# This file is part of RcppGSL.
 #
-# RcppGsl is free software: you can redistribute it and/or modify it
+# RcppGSL is free software: you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
 # the Free Software Foundation, either version 2 of the License, or
 # (at your option) any later version.
 #
-# RcppGsl is distributed in the hope that it will be useful, but
+# RcppGSL is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with RcppGsl.  If not, see <http://www.gnu.org/licenses/>.
+# along with RcppGSL.  If not, see <http://www.gnu.org/licenses/>.
 
 test.gsl.vector <- function(){
-	res <- .Call( "test_gsl_vector", PACKAGE = "RcppGsl" )
+	res <- .Call( "test_gsl_vector", PACKAGE = "RcppGSL" )
 	checkEquals( res, numeric(10) , msg = "wrap( gsl_vector )" )
 }
 

Copied: pkg/RcppGsl/man/RcppGSL-package.Rd (from rev 995, pkg/RcppGsl/man/RcppGsl-package.Rd)
===================================================================
--- pkg/RcppGsl/man/RcppGSL-package.Rd	                        (rev 0)
+++ pkg/RcppGsl/man/RcppGSL-package.Rd	2010-04-05 23:47:45 UTC (rev 996)
@@ -0,0 +1,30 @@
+\name{RcppGSL-package}
+\alias{RcppGSL-package}
+\alias{RcppGSL}
+\docType{package}
+\title{
+  Glue between Rcpp and the GNU GSL
+}
+\description{
+  Glue between Rcpp and the GNU GSL
+}
+\details{
+  \tabular{ll}{
+	Package: \tab RcppGSL\cr
+	Type: \tab Package\cr
+	Version: \tab 0.0\cr
+	Date: \tab 2010-04-04\cr
+	License: \tab GPL (>= 2)\cr
+	LazyLoad: \tab yes\cr
+  }
+}
+\author{
+  Romain Francois and Dirk Eddelbuettel
+
+  Maintainer: Dirk Eddelbuettel and Romain Francois <RomainAndDirk at r-enthusiasts.com>
+}
+\references{
+  GSL: GNU Scientific Library: \url{http://www.gnu.org/software/gsl/}
+}
+\keyword{ package }
+

Deleted: pkg/RcppGsl/man/RcppGsl-package.Rd
===================================================================
--- pkg/RcppGsl/man/RcppGsl-package.Rd	2010-04-05 22:36:48 UTC (rev 995)
+++ pkg/RcppGsl/man/RcppGsl-package.Rd	2010-04-05 23:47:45 UTC (rev 996)
@@ -1,30 +0,0 @@
-\name{RcppGsl-package}
-\alias{RcppGsl-package}
-\alias{RcppGsl}
-\docType{package}
-\title{
-glue between Rcpp and gsl
-}
-\description{
-glue between Rcpp and gsl
-}
-\details{
-\tabular{ll}{
-Package: \tab RcppGsl\cr
-Type: \tab Package\cr
-Version: \tab 0.0\cr
-Date: \tab 2010-04-04\cr
-License: \tab GPL (>= 2)\cr
-LazyLoad: \tab yes\cr
-}
-}
-\author{
- Romain Francois
-
-Maintainer: Romain Francois <romain at r-enthusiasts.com>
-}
-\references{
-	GSL: Gnu scientific library: \url{http://www.gnu.org/software/gsl/}
-}
-\keyword{ package }
-

Copied: pkg/RcppGsl/src/RcppGSL.cpp (from rev 995, pkg/RcppGsl/src/RcppGsl.cpp)
===================================================================
--- pkg/RcppGsl/src/RcppGSL.cpp	                        (rev 0)
+++ pkg/RcppGsl/src/RcppGSL.cpp	2010-04-05 23:47:45 UTC (rev 996)
@@ -0,0 +1,15 @@
+#include <RcppGSL.h>
+
+extern "C" SEXP test_gsl_vector(){
+	gsl_vector * x = gsl_vector_alloc (10);
+	gsl_vector_set_zero( x ) ;
+	
+	// we cannot have Rcpp::NumericVector xx = x ; 
+	// because this does not involve the assignment operator
+	// but the constructor and Vector only had templated assignement
+	// operator, not templated constructor, so we have to do this in two steps
+	Rcpp::NumericVector xx ;
+	xx = *x  ;
+	gsl_vector_free (x);
+	return xx ;
+}

Deleted: pkg/RcppGsl/src/RcppGsl.cpp
===================================================================
--- pkg/RcppGsl/src/RcppGsl.cpp	2010-04-05 22:36:48 UTC (rev 995)
+++ pkg/RcppGsl/src/RcppGsl.cpp	2010-04-05 23:47:45 UTC (rev 996)
@@ -1,15 +0,0 @@
-#include <RcppGsl.h>
-
-extern "C" SEXP test_gsl_vector(){
-	gsl_vector * x = gsl_vector_alloc (10);
-	gsl_vector_set_zero( x ) ;
-	
-	// we cannot have Rcpp::NumericVector xx = x ; 
-	// because this does not involve the assignment operator
-	// but the constructor and Vector only had templated assignement
-	// operator, not templated constructor, so we have to do this in two steps
-	Rcpp::NumericVector xx ;
-	xx = *x  ;
-	gsl_vector_free (x);
-	return xx ;
-}



More information about the Rcpp-commits mailing list