[Rcpp-commits] r1910 - in pkg/RcppArmadillo: . inst inst/include/armadillo_bits

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Aug 5 04:43:15 CEST 2010


Author: edd
Date: 2010-08-05 04:43:12 +0200 (Thu, 05 Aug 2010)
New Revision: 1910

Modified:
   pkg/RcppArmadillo/DESCRIPTION
   pkg/RcppArmadillo/inst/ChangeLog
   pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/config.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/eop_aux.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/eop_core_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/eop_cube_core_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_eps.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_misc.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/restrictors.hpp
Log:
upgraded to Armadillo release 0.9.60


Modified: pkg/RcppArmadillo/DESCRIPTION
===================================================================
--- pkg/RcppArmadillo/DESCRIPTION	2010-08-04 08:27:34 UTC (rev 1909)
+++ pkg/RcppArmadillo/DESCRIPTION	2010-08-05 02:43:12 UTC (rev 1910)
@@ -1,7 +1,7 @@
 Package: RcppArmadillo
 Type: Package
 Title: Rcpp integration for Armadillo templated linear algebra library
-Version: 0.2.4.12
+Version: 0.2.4.24
 Date: $Date$
 Author: Romain Francois, Dirk Eddelbuettel and Doug Bates
 Maintainer: Romain, Dirk and Doug <RcppArmadillo-authors at r-enthusiasts.com>

Modified: pkg/RcppArmadillo/inst/ChangeLog
===================================================================
--- pkg/RcppArmadillo/inst/ChangeLog	2010-08-04 08:27:34 UTC (rev 1909)
+++ pkg/RcppArmadillo/inst/ChangeLog	2010-08-05 02:43:12 UTC (rev 1910)
@@ -1,3 +1,20 @@
+2010-08-04  Dirk Eddelbuettel  <edd at debian.org>
+
+	* Upgraded to Armadillo 0.9.60 "Killer Bush Turkey" with changes:
+	  - More flexible reshape(), allowing significantly different
+	    matrix sizes
+	  - Added matrix initialisation via the << operator
+	  - Fixes for compilation issues under Mac OS X with GCC 4.2/4.0
+	    hybrid
+
+2010-08-03   Romain Francois <romain at r-enthusiasts.com>
+
+	* Upgraded to Armadillo 0.9.58 beta for testing purposes
+
+        * inst/include/armadillo: Reworked so that armadillo_bits/
+	  directory can be included as is without minor tweaks to
+	  armadillo_bits/config.hpp
+
 2010-07-28  Dirk Eddelbuettel  <edd at debian.org>
 
 	* DESCRIPTION: Release 0.2.4

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp	2010-08-04 08:27:34 UTC (rev 1909)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp	2010-08-05 02:43:12 UTC (rev 1910)
@@ -21,7 +21,7 @@
 
 #define ARMA_VERSION_MAJOR 0
 #define ARMA_VERSION_MINOR 9
-#define ARMA_VERSION_PATCH 58
+#define ARMA_VERSION_PATCH 60
 #define ARMA_VERSION_NAME  "Killer Bush Turkey"
 // http://en.wikipedia.org/wiki/Australian_Brush-turkey
 

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/config.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/config.hpp	2010-08-04 08:27:34 UTC (rev 1909)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/config.hpp	2010-08-05 02:43:12 UTC (rev 1910)
@@ -13,6 +13,8 @@
 // of the License or (at your option) any later version.
 // (see http://www.opensource.org/licenses for more info)
 
+
+
 #if !defined(ARMA_USE_LAPACK)
 // #define ARMA_USE_LAPACK
 #endif
@@ -40,4 +42,3 @@
 
 // #define ARMA_EXTRA_DEBUG
 // #define ARMA_NO_DEBUG
-

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/eop_aux.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/eop_aux.hpp	2010-08-04 08:27:34 UTC (rev 1909)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/eop_aux.hpp	2010-08-05 02:43:12 UTC (rev 1910)
@@ -123,51 +123,53 @@
   {
   public:
   
-  template<typename eT> arma_inline static typename arma_integral_only<eT>::result    acos  (const eT& x) { return std::acos(double(x)); }
-  template<typename eT> arma_inline static typename arma_integral_only<eT>::result    asin  (const eT& x) { return std::asin(double(x)); }
-  template<typename eT> arma_inline static typename arma_integral_only<eT>::result    atan  (const eT& x) { return std::atan(double(x)); }
+  template<typename eT> arma_inline static typename arma_integral_only<eT>::result    acos  (const eT x) { return eT( std::acos(double(x)) ); }
+  template<typename eT> arma_inline static typename arma_integral_only<eT>::result    asin  (const eT x) { return eT( std::asin(double(x)) ); }
+  template<typename eT> arma_inline static typename arma_integral_only<eT>::result    atan  (const eT x) { return eT( std::atan(double(x)) ); }
   
-  template<typename eT> arma_inline static typename arma_float_only<eT>::result       acos  (const eT& x) { return std::acos(x); }
-  template<typename eT> arma_inline static typename arma_float_only<eT>::result       asin  (const eT& x) { return std::asin(x); }
-  template<typename eT> arma_inline static typename arma_float_only<eT>::result       atan  (const eT& x) { return std::atan(x); }
+  template<typename eT> arma_inline static typename arma_float_only<eT>::result       acos  (const eT x) { return std::acos(x); }
+  template<typename eT> arma_inline static typename arma_float_only<eT>::result       asin  (const eT x) { return std::asin(x); }
+  template<typename eT> arma_inline static typename arma_float_only<eT>::result       atan  (const eT x) { return std::atan(x); }
   
-  template<typename eT> arma_inline static typename arma_cx_only<eT>::result          acos  (const eT& x) { return arma_acos(x); }
-  template<typename eT> arma_inline static typename arma_cx_only<eT>::result          asin  (const eT& x) { return arma_asin(x); }
-  template<typename eT> arma_inline static typename arma_cx_only<eT>::result          atan  (const eT& x) { return arma_atan(x); }
+  template<typename eT> arma_inline static typename arma_cx_only<eT>::result          acos  (const eT x) { return arma_acos(x); }
+  template<typename eT> arma_inline static typename arma_cx_only<eT>::result          asin  (const eT x) { return arma_asin(x); }
+  template<typename eT> arma_inline static typename arma_cx_only<eT>::result          atan  (const eT x) { return arma_atan(x); }
   
-  template<typename eT> arma_inline static typename arma_integral_only<eT>::result    acosh (const eT& x) { return arma_acosh(double(x)); }
-  template<typename eT> arma_inline static typename arma_integral_only<eT>::result    asinh (const eT& x) { return arma_asinh(double(x)); }
-  template<typename eT> arma_inline static typename arma_integral_only<eT>::result    atanh (const eT& x) { return arma_atanh(double(x)); }
+  template<typename eT> arma_inline static typename arma_integral_only<eT>::result    acosh (const eT x) { return eT( arma_acosh(double(x)) ); }
+  template<typename eT> arma_inline static typename arma_integral_only<eT>::result    asinh (const eT x) { return eT( arma_asinh(double(x)) ); }
+  template<typename eT> arma_inline static typename arma_integral_only<eT>::result    atanh (const eT x) { return eT( arma_atanh(double(x)) ); }
   
-  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result acosh (const eT& x) { return arma_acosh(x); }
-  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result asinh (const eT& x) { return arma_asinh(x); }
-  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result atanh (const eT& x) { return arma_atanh(x); }
+  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result acosh (const eT x) { return arma_acosh(x); }
+  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result asinh (const eT x) { return arma_asinh(x); }
+  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result atanh (const eT x) { return arma_atanh(x); }
   
-  template<typename eT> arma_inline static eT              conj(const eT&              x) { return x;            }
-  template<typename  T> arma_inline static std::complex<T> conj(const std::complex<T>& x) { return std::conj(x); }
+  template<typename eT> arma_inline static typename arma_not_cx<eT>::result conj(const eT              x) { return x;            }
+  template<typename  T> arma_inline static          std::complex<T>         conj(const std::complex<T> x) { return std::conj(x); }
   
-  template<typename eT> arma_inline static typename arma_integral_only<eT>::result sqrt  (const eT& x) { return std::sqrt (double(x)); }
-  template<typename eT> arma_inline static typename arma_integral_only<eT>::result log10 (const eT& x) { return std::log10(double(x)); }
-  template<typename eT> arma_inline static typename arma_integral_only<eT>::result log   (const eT& x) { return std::log  (double(x)); }
-  template<typename eT> arma_inline static typename arma_integral_only<eT>::result exp   (const eT& x) { return std::exp  (double(x)); }
-  template<typename eT> arma_inline static typename arma_integral_only<eT>::result cos   (const eT& x) { return std::cos  (double(x)); }
-  template<typename eT> arma_inline static typename arma_integral_only<eT>::result sin   (const eT& x) { return std::sin  (double(x)); }
-  template<typename eT> arma_inline static typename arma_integral_only<eT>::result tan   (const eT& x) { return std::tan  (double(x)); }
-  template<typename eT> arma_inline static typename arma_integral_only<eT>::result cosh  (const eT& x) { return std::cosh (double(x)); }
-  template<typename eT> arma_inline static typename arma_integral_only<eT>::result sinh  (const eT& x) { return std::sinh (double(x)); }
-  template<typename eT> arma_inline static typename arma_integral_only<eT>::result tanh  (const eT& x) { return std::tanh (double(x)); }
+  template<typename eT> arma_inline static typename arma_integral_only<eT>::result sqrt  (const eT x) { return eT( std::sqrt (double(x)) ); }
+  template<typename eT> arma_inline static typename arma_integral_only<eT>::result log10 (const eT x) { return eT( std::log10(double(x)) ); }
+  template<typename eT> arma_inline static typename arma_integral_only<eT>::result log   (const eT x) { return eT( std::log  (double(x)) ); }
+  template<typename eT> arma_inline static typename arma_integral_only<eT>::result exp   (const eT x) { return eT( std::exp  (double(x)) ); }
+  template<typename eT> arma_inline static typename arma_integral_only<eT>::result cos   (const eT x) { return eT( std::cos  (double(x)) ); }
+  template<typename eT> arma_inline static typename arma_integral_only<eT>::result sin   (const eT x) { return eT( std::sin  (double(x)) ); }
+  template<typename eT> arma_inline static typename arma_integral_only<eT>::result tan   (const eT x) { return eT( std::tan  (double(x)) ); }
+  template<typename eT> arma_inline static typename arma_integral_only<eT>::result cosh  (const eT x) { return eT( std::cosh (double(x)) ); }
+  template<typename eT> arma_inline static typename arma_integral_only<eT>::result sinh  (const eT x) { return eT( std::sinh (double(x)) ); }
+  template<typename eT> arma_inline static typename arma_integral_only<eT>::result tanh  (const eT x) { return eT( std::tanh (double(x)) ); }
   
-  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result sqrt  (const eT& x) { return std::sqrt (x); }
-  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result log10 (const eT& x) { return std::log10(x); }
-  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result log   (const eT& x) { return std::log  (x); }
-  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result exp   (const eT& x) { return std::exp  (x); }
-  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result cos   (const eT& x) { return std::cos  (x); }
-  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result sin   (const eT& x) { return std::sin  (x); }
-  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result tan   (const eT& x) { return std::tan  (x); }
-  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result cosh  (const eT& x) { return std::cosh (x); }
-  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result sinh  (const eT& x) { return std::sinh (x); }
-  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result tanh  (const eT& x) { return std::tanh (x); }
+  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result sqrt  (const eT x) { return std::sqrt (x); }
+  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result log10 (const eT x) { return std::log10(x); }
+  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result log   (const eT x) { return std::log  (x); }
+  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result exp   (const eT x) { return std::exp  (x); }
+  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result cos   (const eT x) { return std::cos  (x); }
+  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result sin   (const eT x) { return std::sin  (x); }
+  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result tan   (const eT x) { return std::tan  (x); }
+  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result cosh  (const eT x) { return std::cosh (x); }
+  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result sinh  (const eT x) { return std::sinh (x); }
+  template<typename eT> arma_inline static typename arma_float_or_cx_only<eT>::result tanh  (const eT x) { return std::tanh (x); }
   
+  template<typename eT> arma_inline static typename arma_unsigned_integral_only<eT>::result neg (const eT x) { return  x; }
+  template<typename eT> arma_inline static typename arma_signed_only<eT>::result            neg (const eT x) { return -x; }
   
   
   template<typename T1, typename T2>
@@ -218,7 +220,7 @@
   arma_inline
   static
   typename arma_integral_only<eT>::result
-  direct_eps(const eT& x)
+  direct_eps(const eT x)
     {
     return eT(0);
     }
@@ -229,7 +231,7 @@
   inline
   static
   typename arma_float_only<eT>::result
-  direct_eps(const eT& x)
+  direct_eps(const eT x)
     {
     //arma_extra_debug_sigprint();
     
@@ -252,7 +254,7 @@
   inline
   static
   typename arma_float_only<T>::result
-  direct_eps(const std::complex<T>& x)
+  direct_eps(const std::complex<T> x)
     {
     //arma_extra_debug_sigprint();
     
@@ -268,16 +270,16 @@
   
   //! work around a bug in GCC 4.4
   template<typename eT> arma_inline static
-  typename arma_unsigned_integral_only<eT>::result arma_abs(const eT& x)              { return x;           }
+  typename arma_unsigned_integral_only<eT>::result arma_abs(const eT x)              { return x;           }
   
   template<typename eT> arma_inline static
-  typename arma_signed_integral_only<eT>::result   arma_abs(const eT& x)              { return std::abs(x); }
+  typename arma_signed_integral_only<eT>::result   arma_abs(const eT x)              { return std::abs(x); }
   
   template<typename eT> arma_inline static
-  typename arma_float_only<eT>::result             arma_abs(const eT& x)              { return std::abs(x); }
+  typename arma_float_only<eT>::result             arma_abs(const eT x)              { return std::abs(x); }
   
   template<typename T> arma_inline static
-  typename arma_float_only<T>::result              arma_abs(const std::complex<T>& x) { return std::abs(x); }
+  typename arma_float_only<T>::result              arma_abs(const std::complex<T> x) { return std::abs(x); }
   
   
   

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/eop_core_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/eop_core_meat.hpp	2010-08-04 08:27:34 UTC (rev 1909)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/eop_core_meat.hpp	2010-08-05 02:43:12 UTC (rev 1910)
@@ -62,14 +62,14 @@
   
   // the optimiser will keep only one return statement
   
-       if(is_same_type<eop_type, eop_neg              >::value == true) { return -val;                     }
-  else if(is_same_type<eop_type, eop_scalar_plus      >::value == true) { return val + x.aux;              }
+       if(is_same_type<eop_type, eop_scalar_plus      >::value == true) { return val + x.aux;              }
   else if(is_same_type<eop_type, eop_scalar_minus_pre >::value == true) { return x.aux - val;              }
   else if(is_same_type<eop_type, eop_scalar_minus_post>::value == true) { return val - x.aux;              }
   else if(is_same_type<eop_type, eop_scalar_times     >::value == true) { return val * x.aux;              }
   else if(is_same_type<eop_type, eop_scalar_div_pre   >::value == true) { return x.aux / val;              }
   else if(is_same_type<eop_type, eop_scalar_div_post  >::value == true) { return val / x.aux;              }
   else if(is_same_type<eop_type, eop_square           >::value == true) { return val*val;                  }
+  else if(is_same_type<eop_type, eop_neg              >::value == true) { return eop_aux::neg(val);        }
   else if(is_same_type<eop_type, eop_sqrt             >::value == true) { return eop_aux::sqrt(val);       }
   else if(is_same_type<eop_type, eop_log10            >::value == true) { return eop_aux::log10(val);      }
   else if(is_same_type<eop_type, eop_log              >::value == true) { return eop_aux::log(val);        }

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/eop_cube_core_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/eop_cube_core_meat.hpp	2010-08-04 08:27:34 UTC (rev 1909)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/eop_cube_core_meat.hpp	2010-08-05 02:43:12 UTC (rev 1910)
@@ -60,14 +60,14 @@
   
   // the optimiser will keep only one return statement
   
-       if(is_same_type<eop_cube_type, eop_cube_neg              >::value == true) { return -val;                    }
-  else if(is_same_type<eop_cube_type, eop_cube_scalar_plus      >::value == true) { return val + x.aux;             }
+       if(is_same_type<eop_cube_type, eop_cube_scalar_plus      >::value == true) { return val + x.aux;             }
   else if(is_same_type<eop_cube_type, eop_cube_scalar_minus_pre >::value == true) { return x.aux - val;             }
   else if(is_same_type<eop_cube_type, eop_cube_scalar_minus_post>::value == true) { return val - x.aux;             }
   else if(is_same_type<eop_cube_type, eop_cube_scalar_times     >::value == true) { return val * x.aux;             }
   else if(is_same_type<eop_cube_type, eop_cube_scalar_div_pre   >::value == true) { return x.aux / val;             }
   else if(is_same_type<eop_cube_type, eop_cube_scalar_div_post  >::value == true) { return val / x.aux;             }
   else if(is_same_type<eop_cube_type, eop_cube_square           >::value == true) { return val*val;                 }
+  else if(is_same_type<eop_cube_type, eop_cube_neg              >::value == true) { return eop_aux::neg(val);       }
   else if(is_same_type<eop_cube_type, eop_cube_sqrt             >::value == true) { return eop_aux::sqrt(val);      }
   else if(is_same_type<eop_cube_type, eop_cube_log10            >::value == true) { return eop_aux::log10(val);     }
   else if(is_same_type<eop_cube_type, eop_cube_log              >::value == true) { return eop_aux::log(val);       }

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/fn_eps.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/fn_eps.hpp	2010-08-04 08:27:34 UTC (rev 1909)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/fn_eps.hpp	2010-08-05 02:43:12 UTC (rev 1910)
@@ -26,7 +26,7 @@
 template<typename T1>
 inline
 const eOp<T1, eop_eps>
-eps(const Base<typename T1::elem_type, T1>& X)
+eps(const Base<typename T1::elem_type, T1>& X, const typename arma_not_cx<typename T1::elem_type>::result* junk = 0)
   {
   arma_extra_debug_sigprint();
   
@@ -42,7 +42,7 @@
 template<typename T1>
 inline
 Mat< typename T1::pod_type >
-eps(const Base< std::complex<typename T1::pod_type>, T1>& X)
+eps(const Base< std::complex<typename T1::pod_type>, T1>& X, const typename arma_cx_only<typename T1::elem_type>::result* junk = 0)
   {
   arma_extra_debug_sigprint();
   

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/fn_misc.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/fn_misc.hpp	2010-08-04 08:27:34 UTC (rev 1909)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/fn_misc.hpp	2010-08-05 02:43:12 UTC (rev 1910)
@@ -357,7 +357,7 @@
 template<typename T1>
 arma_inline
 const eOp<T1, eop_abs>
-abs(const Base<typename T1::elem_type,T1>& X)
+abs(const Base<typename T1::elem_type,T1>& X, const typename arma_not_cx<typename T1::elem_type>::result* junk = 0)
   {
   arma_extra_debug_sigprint();
   
@@ -369,7 +369,7 @@
 template<typename T1>
 arma_inline
 const eOpCube<T1, eop_cube_abs>
-abs(const BaseCube<typename T1::elem_type,T1>& X)
+abs(const BaseCube<typename T1::elem_type,T1>& X, const typename arma_not_cx<typename T1::elem_type>::result* junk = 0)
   {
   arma_extra_debug_sigprint();
   
@@ -381,7 +381,7 @@
 template<typename T1>
 inline
 const mtOp<typename T1::pod_type, T1, op_abs>
-abs(const Base<std::complex<typename T1::pod_type>, T1>& X)
+abs(const Base<std::complex<typename T1::pod_type>, T1>& X, const typename arma_cx_only<typename T1::elem_type>::result* junk = 0)
   {
   arma_extra_debug_sigprint();
   
@@ -392,8 +392,8 @@
 
 template<typename T1>
 inline
-Mat<typename T1::pod_type>
-abs(const BaseCube< std::complex<typename T1::pod_type>,T1>& X)
+Cube<typename T1::pod_type>
+abs(const BaseCube< std::complex<typename T1::pod_type>,T1>& X, const typename arma_cx_only<typename T1::elem_type>::result* junk = 0)
   {
   arma_extra_debug_sigprint();
   
@@ -426,7 +426,7 @@
 template<typename T1>
 arma_inline
 const eOp<T1, eop_abs>
-fabs(const Base<typename T1::pod_type,T1>& X)
+fabs(const Base<typename T1::pod_type,T1>& X, const typename arma_not_cx<typename T1::elem_type>::result* junk = 0)
   {
   arma_extra_debug_sigprint();
   
@@ -438,7 +438,7 @@
 template<typename T1>
 arma_inline
 const eOpCube<T1, eop_cube_abs>
-fabs(const BaseCube<typename T1::pod_type,T1>& X)
+fabs(const BaseCube<typename T1::pod_type,T1>& X, const typename arma_not_cx<typename T1::elem_type>::result* junk = 0)
   {
   arma_extra_debug_sigprint();
   
@@ -450,7 +450,7 @@
 template<typename T1>
 inline
 const mtOp<typename T1::pod_type, T1, op_abs>
-fabs(const Base<std::complex<typename T1::pod_type>, T1>& X)
+fabs(const Base<std::complex<typename T1::pod_type>, T1>& X, const typename arma_cx_only<typename T1::elem_type>::result* junk = 0)
   {
   arma_extra_debug_sigprint();
   
@@ -461,8 +461,8 @@
 
 template<typename T1>
 arma_inline
-Mat<typename T1::pod_type>
-fabs(const BaseCube< std::complex<typename T1::pod_type>,T1>& X)
+Cube<typename T1::pod_type>
+fabs(const BaseCube< std::complex<typename T1::pod_type>,T1>& X, const typename arma_cx_only<typename T1::elem_type>::result* junk = 0)
   {
   arma_extra_debug_sigprint();
   

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/restrictors.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/restrictors.hpp	2010-08-04 08:27:34 UTC (rev 1909)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/restrictors.hpp	2010-08-05 02:43:12 UTC (rev 1910)
@@ -74,6 +74,19 @@
 
 
 
+template<typename T> struct arma_signed_only { };
+
+template<> struct arma_signed_only<char>   { typedef char   result; };
+template<> struct arma_signed_only<short>  { typedef short  result; };
+template<> struct arma_signed_only<int>    { typedef int    result; };
+template<> struct arma_signed_only<long>   { typedef long   result; };
+template<> struct arma_signed_only<float>  { typedef float  result; };
+template<> struct arma_signed_only<double> { typedef double result; };
+
+template<typename T> struct arma_signed_only< std::complex<T> > { typedef std::complex<T> result; };
+
+
+
 template<typename T> struct arma_float_only { };
 
 template<> struct arma_float_only<float>  { typedef float  result; };



More information about the Rcpp-commits mailing list