[Rcpp-commits] r3484 - in pkg/RcppArmadillo: . R inst inst/include inst/include/armadillo_bits man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Feb 17 15:19:51 CET 2012


Author: edd
Date: 2012-02-17 15:19:51 +0100 (Fri, 17 Feb 2012)
New Revision: 3484

Modified:
   pkg/RcppArmadillo/ChangeLog
   pkg/RcppArmadillo/DESCRIPTION
   pkg/RcppArmadillo/R/armadillo_version.R
   pkg/RcppArmadillo/inst/NEWS
   pkg/RcppArmadillo/inst/include/RcppArmadilloConfig.h
   pkg/RcppArmadillo/inst/include/armadillo_bits/Base_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Base_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Proxy.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/ProxyCube.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/config.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/constants.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/debug.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/field_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_trans.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/glue_relational_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_relational_meat.hpp
   pkg/RcppArmadillo/man/RcppArmadillo-package.Rd
Log:
RcppArmadillo 0.2.25 including Armadillo 2.4.3
plus one minor config fix sent to Conrad by email


Modified: pkg/RcppArmadillo/ChangeLog
===================================================================
--- pkg/RcppArmadillo/ChangeLog	2012-02-16 21:04:54 UTC (rev 3483)
+++ pkg/RcppArmadillo/ChangeLog	2012-02-17 14:19:51 UTC (rev 3484)
@@ -1,23 +1,26 @@
+2012-02-17  Dirk Eddelbuettel  <edd at debian.org>
+
+	* DESCRIPTION: Release 0.2.35 (depending on Rcpp 0.9.10)
+
+	* inst/include/*: Upgraded to new release 2.4.3 of Armadillo
+
 2012-02-01  Romain Francois <romain at r-enthusiasts.com>
 
-    * inst/include/armadillo_bits/Cube_meat.hpp : changes related to std::cout -> Rcpp::Rcout
-    
-    * inst/include/armadillo_bits/Mat_meat.hpp : idem
-    
-    * inst/include/armadillo_bits/config.hpp : idem
-                                                
-    * inst/include/armadillo_bits/debug.hpp : idem
-    
-    * inst/include/armadillo_bits/field_meat.hpp : idem
-    
-    * inst/include/armadillo_bits/forward_bones.hpp : idem
-    
-    * DESCRIPTION: depends on Rcpp 0.9.1.2
+	* inst/include/armadillo_bits/Cube_meat.hpp : changes related to
+	std::cout -> Rcpp::Rcout
 
-2012-01-27  Dirk Eddelbuettel  <edd at debian.org>
+	* inst/include/armadillo_bits/Mat_meat.hpp : idem
 
-	* DESCRIPTION: Release 0.2.35
+	* inst/include/armadillo_bits/config.hpp : idem
 
+	* inst/include/armadillo_bits/debug.hpp : idem
+
+	* inst/include/armadillo_bits/field_meat.hpp : idem
+
+	* inst/include/armadillo_bits/forward_bones.hpp : idem
+
+	* DESCRIPTION: depends on Rcpp 0.9.10
+
 2011-12-31  Dirk Eddelbuettel  <edd at debian.org>
 
 	* inst/include/RcppArmadillo/Mat_meat.h: Add missing semicolon in

Modified: pkg/RcppArmadillo/DESCRIPTION
===================================================================
--- pkg/RcppArmadillo/DESCRIPTION	2012-02-16 21:04:54 UTC (rev 3483)
+++ pkg/RcppArmadillo/DESCRIPTION	2012-02-17 14:19:51 UTC (rev 3484)
@@ -32,7 +32,7 @@
  the GNU GPL version 2 or later, as is the rest of Rcpp.
 License: GPL (>= 2)
 LazyLoad: yes
-Depends: R (>= 2.14.0), Rcpp (>= 0.9.9.2)
+Depends: R (>= 2.14.0), Rcpp (>= 0.9.10)
 LinkingTo: Rcpp
 Suggests: inline, RUnit
 URL: http://arma.sourceforge.net/, http://dirk.eddelbuettel.com/code/rcpp.armadillo.html, http://romainfrancois.blog.free.fr/index.php?category/R-package/RcppArmadillo

Modified: pkg/RcppArmadillo/R/armadillo_version.R
===================================================================
--- pkg/RcppArmadillo/R/armadillo_version.R	2012-02-16 21:04:54 UTC (rev 3483)
+++ pkg/RcppArmadillo/R/armadillo_version.R	2012-02-17 14:19:51 UTC (rev 3484)
@@ -1,4 +1,4 @@
-## Copyright (C)       2010 Dirk Eddelbuettel, Romain Francois and Douglas Bates
+## Copyright (C) 2010 - 2012  Dirk Eddelbuettel, Romain Francois and Douglas Bates
 ##
 ## This file is part of RcppArmadillo.
 ##
@@ -16,6 +16,6 @@
 ## along with RcppArmadillo.  If not, see <http://www.gnu.org/licenses/>.
 
 armadillo_version <- function(single = FALSE){
-	.Call( "armadillo_version", isTRUE(single), PACKAGE = "RcppArmadillo" )
+    .Call( "armadillo_version", isTRUE(single), PACKAGE = "RcppArmadillo" )
 }
 

Modified: pkg/RcppArmadillo/inst/NEWS
===================================================================
--- pkg/RcppArmadillo/inst/NEWS	2012-02-16 21:04:54 UTC (rev 3483)
+++ pkg/RcppArmadillo/inst/NEWS	2012-02-17 14:19:51 UTC (rev 3484)
@@ -1,7 +1,11 @@
-0.2.35  2012-01-27
+0.2.35  2012-02-17
 
-    o  Minor bug fix release improving corner cases affecting builds:
+    o   Upgraded to Armadillo release 2.4.3
 
+          * Support for ARMA_DEFAULT_OSTREAM using Rcpp::Rcout added
+
+    o   Minor bug fix release improving corner cases affecting builds:
+
           * Missing semicolon added in Mat_meat (when in C++0x mode), with
 	    thanks to Teo Guo Ci 
           * Armadillo version vars now instantiated in RcppArmadillo.cpp

Modified: pkg/RcppArmadillo/inst/include/RcppArmadilloConfig.h
===================================================================
--- pkg/RcppArmadillo/inst/include/RcppArmadilloConfig.h	2012-02-16 21:04:54 UTC (rev 3483)
+++ pkg/RcppArmadillo/inst/include/RcppArmadilloConfig.h	2012-02-17 14:19:51 UTC (rev 3484)
@@ -60,7 +60,8 @@
 #endif
 
 // Rcpp has its own stream object which cooperates more nicely with R's i/o
-#define ARMA_DEFAULT_STREAM Rcpp::Rcout
+// And as of Armadillo 2.4.3, we can use this stream object as well 
+#define ARMA_DEFAULT_OSTREAM Rcpp::Rcout
 
 #endif
 

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Base_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Base_bones.hpp	2012-02-16 21:04:54 UTC (rev 3483)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Base_bones.hpp	2012-02-17 14:19:51 UTC (rev 3484)
@@ -1,5 +1,5 @@
-// Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
-// Copyright (C) 2008-2011 Conrad Sanderson
+// Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
+// Copyright (C) 2008-2012 Conrad Sanderson
 // 
 // This file is part of the Armadillo C++ library.
 // It is provided without any warranty of fitness
@@ -27,6 +27,7 @@
   arma_inline const derived& get_ref() const;
   
   arma_inline const Op<derived,op_htrans>  t() const;
+  arma_inline const Op<derived,op_htrans> ht() const;
   arma_inline const Op<derived,op_strans> st() const;
   
   inline void print(const std::string extra_text = "") const;

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Base_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Base_meat.hpp	2012-02-16 21:04:54 UTC (rev 3483)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Base_meat.hpp	2012-02-17 14:19:51 UTC (rev 3484)
@@ -1,5 +1,5 @@
-// Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
-// Copyright (C) 2008-2011 Conrad Sanderson
+// Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
+// Copyright (C) 2008-2012 Conrad Sanderson
 // 
 // This file is part of the Armadillo C++ library.
 // It is provided without any warranty of fitness
@@ -38,6 +38,16 @@
 
 template<typename elem_type, typename derived>
 arma_inline
+const Op<derived,op_htrans>
+Base<elem_type,derived>::ht() const
+  {
+  return Op<derived,op_htrans>( (*this).get_ref() );
+  }
+
+
+
+template<typename elem_type, typename derived>
+arma_inline
 const Op<derived,op_strans>
 Base<elem_type,derived>::st() const
   {

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_bones.hpp	2012-02-16 21:04:54 UTC (rev 3483)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_bones.hpp	2012-02-17 14:19:51 UTC (rev 3484)
@@ -36,7 +36,7 @@
   
   const uword  n_rows;       //!< number of rows in each slice (read-only)
   const uword  n_cols;       //!< number of columns in each slice (read-only)
-  const uword  n_elem_slice; //!< DEPRECATED: do not use this member variable -- it will be _removed_ in version 3.0
+  const uword  n_elem_slice; //!< number of elements in each slice (read-only)
   const uword  n_slices;     //!< number of slices in the cube (read-only)
   const uword  n_elem;       //!< number of elements in the cube (read-only)
   const uword  mem_state;

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_meat.hpp	2012-02-16 21:04:54 UTC (rev 3483)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_meat.hpp	2012-02-17 14:19:51 UTC (rev 3484)
@@ -2337,10 +2337,10 @@
   
   if(extra_text.length() != 0)
     {
-    ARMA_DEFAULT_STREAM << extra_text << '\n';
+    ARMA_DEFAULT_OSTREAM << extra_text << '\n';
     }
   
-  arma_ostream::print(ARMA_DEFAULT_STREAM, *this, true);
+  arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this, true);
   }
 
 
@@ -2378,10 +2378,10 @@
   
   if(extra_text.length() != 0)
     {
-    ARMA_DEFAULT_STREAM << extra_text << '\n';
+    ARMA_DEFAULT_OSTREAM << extra_text << '\n';
     }
   
-  arma_ostream::print(ARMA_DEFAULT_STREAM, *this, false);
+  arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this, false);
   }
 
 

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_meat.hpp	2012-02-16 21:04:54 UTC (rev 3483)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_meat.hpp	2012-02-17 14:19:51 UTC (rev 3484)
@@ -4053,14 +4053,14 @@
   
   if(extra_text.length() != 0)
     {
-    const std::streamsize orig_width = ARMA_DEFAULT_STREAM.width();
+    const std::streamsize orig_width = ARMA_DEFAULT_OSTREAM.width();
     
-    ARMA_DEFAULT_STREAM << extra_text << '\n';
+    ARMA_DEFAULT_OSTREAM << extra_text << '\n';
   
-    ARMA_DEFAULT_STREAM.width(orig_width);
+    ARMA_DEFAULT_OSTREAM.width(orig_width);
     }
   
-  arma_ostream::print(ARMA_DEFAULT_STREAM, *this, true);
+  arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this, true);
   }
 
 
@@ -4135,14 +4135,14 @@
   
   if(extra_text.length() != 0)
     {
-    const std::streamsize orig_width = ARMA_DEFAULT_STREAM.width();
+    const std::streamsize orig_width = ARMA_DEFAULT_OSTREAM.width();
     
-    ARMA_DEFAULT_STREAM << extra_text << '\n';
+    ARMA_DEFAULT_OSTREAM << extra_text << '\n';
   
-    ARMA_DEFAULT_STREAM.width(orig_width);
+    ARMA_DEFAULT_OSTREAM.width(orig_width);
     }
   
-  arma_ostream::print(ARMA_DEFAULT_STREAM, *this, false);
+  arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this, false);
   }
 
 

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Proxy.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Proxy.hpp	2012-02-16 21:04:54 UTC (rev 3483)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Proxy.hpp	2012-02-17 14:19:51 UTC (rev 3484)
@@ -1,5 +1,5 @@
-// Copyright (C) 2010-2011 NICTA (www.nicta.com.au)
-// Copyright (C) 2010-2011 Conrad Sanderson
+// Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
+// Copyright (C) 2010-2012 Conrad Sanderson
 // 
 // This file is part of the Armadillo C++ library.
 // It is provided without any warranty of fitness
@@ -59,8 +59,10 @@
   arma_inline elem_type operator[] (const uword i)                    const { return Q[i];           }
   arma_inline elem_type at         (const uword row, const uword col) const { return Q.at(row, col); }
   
-  arma_inline ea_type get_ea()                   const { return Q.memptr(); }
-  arma_inline bool    is_alias(const Mat<eT>& X) const { return (&Q == &X); }
+  arma_inline ea_type get_ea() const { return Q.memptr(); }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&Q) == void_ptr(&X)); }
   };
 
 
@@ -93,8 +95,10 @@
   arma_inline elem_type operator[] (const uword i)                    const { return Q[i];           }
   arma_inline elem_type at         (const uword row, const uword col) const { return Q.at(row, col); }
   
-  arma_inline ea_type get_ea()                   const { return Q.memptr(); }
-  arma_inline bool    is_alias(const Mat<eT>& X) const { return (&Q == &X); }
+  arma_inline ea_type get_ea() const { return Q.memptr(); }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&Q) == void_ptr(&X)); }
   };
 
 
@@ -127,8 +131,10 @@
   arma_inline elem_type operator[] (const uword i)                    const { return Q[i];           }
   arma_inline elem_type at         (const uword row, const uword col) const { return Q.at(row, col); }
   
-  arma_inline ea_type get_ea()                   const { return Q.memptr(); }
-  arma_inline bool    is_alias(const Mat<eT>& X) const { return (&Q == &X); }
+  arma_inline ea_type get_ea() const { return Q.memptr(); }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&Q) == void_ptr(&X)); }
   };
 
 
@@ -161,8 +167,10 @@
   arma_inline elem_type operator[] (const uword i)                    const { return Q[i];           }
   arma_inline elem_type at         (const uword row, const uword col) const { return Q.at(row, col); }
   
-  arma_inline ea_type get_ea()                        const { return Q;     }
-  arma_inline bool    is_alias(const Mat<elem_type>&) const { return false; }
+  arma_inline ea_type get_ea() const { return Q; }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Mat<eT2>&) const { return false; }
   };
 
 
@@ -195,8 +203,10 @@
   arma_inline elem_type operator[] (const uword i)                    const { return Q[i];           }
   arma_inline elem_type at         (const uword row, const uword col) const { return Q.at(row, col); }
   
-  arma_inline ea_type get_ea()                        const { return Q.memptr(); }
-  arma_inline bool    is_alias(const Mat<elem_type>&) const { return false;      }
+  arma_inline ea_type get_ea() const { return Q.memptr(); }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Mat<eT2>&) const { return false; }
   };
 
 
@@ -229,8 +239,10 @@
   arma_inline elem_type operator[] (const uword i)                    const { return Q[i];           }
   arma_inline elem_type at         (const uword row, const uword col) const { return Q.at(row, col); }
   
-  arma_inline ea_type get_ea()                        const { return Q.memptr(); }
-  arma_inline bool    is_alias(const Mat<elem_type>&) const { return false;      }
+  arma_inline ea_type get_ea() const { return Q.memptr(); }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Mat<eT2>&) const { return false; }
   };
 
 
@@ -263,8 +275,10 @@
   arma_inline elem_type operator[] (const uword i)                    const { return Q[i];           }
   arma_inline elem_type at         (const uword row, const uword col) const { return Q.at(row, col); }
   
-  arma_inline ea_type get_ea()                   const { return Q;              }
-  arma_inline bool    is_alias(const Mat<eT>& X) const { return (&(Q.m) == &X); }
+  arma_inline ea_type get_ea() const { return Q; }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&(Q.m)) == void_ptr(&X)); }
   };
 
 
@@ -297,8 +311,10 @@
   arma_inline elem_type operator[] (const uword i)                    const { return Q[i];           }
   arma_inline elem_type at         (const uword row, const uword col) const { return Q.at(row, col); }
   
-  arma_inline ea_type get_ea()                 const { return Q.memptr(); }
-  arma_inline bool    is_alias(const Mat<eT>&) const { return false;      }
+  arma_inline ea_type get_ea() const { return Q.memptr(); }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Mat<eT2>&) const { return false; }
   };
 
 
@@ -331,8 +347,10 @@
   arma_inline elem_type operator[] (const uword i)                    const { return Q[i];           }
   arma_inline elem_type at         (const uword row, const uword col) const { return Q.at(row, col); }
   
-  arma_inline ea_type get_ea()                   const { return Q;              }
-  arma_inline bool    is_alias(const Mat<eT>& X) const { return (&(Q.m) == &X); }
+  arma_inline ea_type get_ea() const { return Q; }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&(Q.m)) == void_ptr(&X)); }
   };
 
 
@@ -366,8 +384,10 @@
   arma_inline elem_type operator[] (const uword i)                    const { return Q[i];           }
   arma_inline elem_type at         (const uword row, const uword col) const { return Q.at(row, col); }
   
-  arma_inline ea_type get_ea()                          const { return Q;               }
-  arma_inline bool    is_alias(const Mat<elem_type>& X) const { return Q.P.is_alias(X); }
+  arma_inline ea_type get_ea() const { return Q; }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Mat<eT2>& X) const { return Q.P.is_alias(X); }
   };
 
 
@@ -400,8 +420,10 @@
   arma_inline elem_type operator[] (const uword i)                    const { return Q[i];           }
   arma_inline elem_type at         (const uword row, const uword col) const { return Q.at(row, col); }
   
-  arma_inline ea_type get_ea()                          const { return Q;                                      }
-  arma_inline bool    is_alias(const Mat<elem_type>& X) const { return (Q.P1.is_alias(X) || Q.P2.is_alias(X)); }
+  arma_inline ea_type get_ea() const { return Q; }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Mat<eT2>& X) const { return (Q.P1.is_alias(X) || Q.P2.is_alias(X)); }
   };
 
 
@@ -434,8 +456,10 @@
   arma_inline elem_type operator[] (const uword i)                    const { return Q[i];          }
   arma_inline elem_type at         (const uword row, const uword col) const { return Q.at(row,col); }
   
-  arma_inline ea_type get_ea()                     const { return Q.memptr(); }
-  arma_inline bool    is_alias(const Mat<out_eT>&) const { return false;      }
+  arma_inline ea_type get_ea() const { return Q.memptr(); }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Mat<eT2>&) const { return false; }
   };
 
 
@@ -468,8 +492,10 @@
   arma_inline elem_type operator[] (const uword i)                    const { return Q[i];          }
   arma_inline elem_type at         (const uword row, const uword col) const { return Q.at(row,col); }
   
-  arma_inline ea_type get_ea()                     const { return Q.memptr(); }
-  arma_inline bool    is_alias(const Mat<out_eT>&) const { return false;      }
+  arma_inline ea_type get_ea() const { return Q.memptr(); }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Mat<eT2>&) const { return false; }
   };
 
 

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/ProxyCube.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/ProxyCube.hpp	2012-02-16 21:04:54 UTC (rev 3483)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/ProxyCube.hpp	2012-02-17 14:19:51 UTC (rev 3484)
@@ -1,5 +1,5 @@
-// Copyright (C) 2010-2011 NICTA (www.nicta.com.au)
-// Copyright (C) 2010-2011 Conrad Sanderson
+// Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
+// Copyright (C) 2010-2012 Conrad Sanderson
 // 
 // This file is part of the Armadillo C++ library.
 // It is provided without any warranty of fitness
@@ -61,8 +61,10 @@
   arma_inline elem_type operator[] (const uword i)                                       const { return Q[i];                  }
   arma_inline elem_type at         (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); }
   
-  arma_inline ea_type get_ea()                           const { return Q.memptr(); }
-  arma_inline bool    is_alias(const Cube<elem_type>& X) const { return (&Q == &X); }
+  arma_inline ea_type get_ea() const { return Q.memptr(); }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Cube<eT2>& X) const { return (void_ptr(&Q) == void_ptr(&X)); }
   };
 
 
@@ -97,8 +99,10 @@
   arma_inline elem_type operator[] (const uword i)                                       const { return Q[i];                  }
   arma_inline elem_type at         (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); }
   
-  arma_inline ea_type get_ea()                         const { return Q;     }
-  arma_inline bool    is_alias(const Cube<elem_type>&) const { return false; }
+  arma_inline ea_type get_ea() const { return Q; }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Cube<eT2>&) const { return false; }
   };
 
 
@@ -133,8 +137,10 @@
   arma_inline elem_type operator[] (const uword i)                                       const { return Q[i];                  }
   arma_inline elem_type at         (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); }
   
-  arma_inline ea_type get_ea()                         const { return Q.memptr(); }
-  arma_inline bool    is_alias(const Cube<elem_type>&) const { return false;      }
+  arma_inline ea_type get_ea() const { return Q.memptr(); }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Cube<eT2>&) const { return false; }
   };
 
 
@@ -169,8 +175,10 @@
   arma_inline elem_type operator[] (const uword i)                                       const { return Q[i];                  }
   arma_inline elem_type at         (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); }
   
-  arma_inline ea_type get_ea()                         const { return Q.memptr(); }
-  arma_inline bool    is_alias(const Cube<elem_type>&) const { return false;      }
+  arma_inline ea_type get_ea() const { return Q.memptr(); }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Cube<eT2>&) const { return false; }
   };
 
 
@@ -205,8 +213,10 @@
   arma_inline elem_type operator[] (const uword i)                                       const { return Q[i];                  }
   arma_inline elem_type at         (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); }
   
-  arma_inline ea_type get_ea()                           const { return Q;              }
-  arma_inline bool    is_alias(const Cube<elem_type>& X) const { return (&(Q.m) == &X); }
+  arma_inline ea_type get_ea() const { return Q; }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Cube<eT2>& X) const { return (void_ptr(&(Q.m)) == void_ptr(&X)); }
   };
 
 
@@ -241,8 +251,10 @@
   arma_inline elem_type operator[] (const uword i)                                       const { return Q[i];                  }
   arma_inline elem_type at         (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); }
   
-  arma_inline ea_type get_ea()                           const { return Q;               }
-  arma_inline bool    is_alias(const Cube<elem_type>& X) const { return Q.P.is_alias(X); }
+  arma_inline ea_type get_ea() const { return Q; }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Cube<eT2>& X) const { return Q.P.is_alias(X); }
   };
 
 
@@ -277,8 +289,10 @@
   arma_inline elem_type operator[] (const uword i)                                       const { return Q[i];                  }
   arma_inline elem_type at         (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); }
   
-  arma_inline ea_type get_ea()                           const { return Q;                                      }
-  arma_inline bool    is_alias(const Cube<elem_type>& X) const { return (Q.P1.is_alias(X) || Q.P2.is_alias(X)); }
+  arma_inline ea_type get_ea() const { return Q; }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Cube<eT2>& X) const { return (Q.P1.is_alias(X) || Q.P2.is_alias(X)); }
   };
 
 
@@ -313,8 +327,10 @@
   arma_inline elem_type operator[] (const uword i)                                       const { return Q[i];                  }
   arma_inline elem_type at         (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); }
   
-  arma_inline ea_type get_ea()                      const { return Q.memptr(); }
-  arma_inline bool    is_alias(const Cube<out_eT>&) const { return false;      }
+  arma_inline ea_type get_ea() const { return Q.memptr(); }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Cube<eT2>&) const { return false; }
   };
 
 
@@ -349,8 +365,10 @@
   arma_inline elem_type operator[] (const uword i)                                       const { return Q[i];                  }
   arma_inline elem_type at         (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); }
   
-  arma_inline ea_type get_ea()                      const { return Q.memptr(); }
-  arma_inline bool    is_alias(const Cube<out_eT>&) const { return false;      }
+  arma_inline ea_type get_ea() const { return Q.memptr(); }
+  
+  template<typename eT2>
+  arma_inline bool is_alias(const Cube<eT2>&) const { return false; }
   };
 
 

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp	2012-02-16 21:04:54 UTC (rev 3483)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp	2012-02-17 14:19:51 UTC (rev 3484)
@@ -18,7 +18,7 @@
 
 #define ARMA_VERSION_MAJOR 2
 #define ARMA_VERSION_MINOR 4
-#define ARMA_VERSION_PATCH 2
+#define ARMA_VERSION_PATCH 3
 #define ARMA_VERSION_NAME  "Loco Lounge Lizard"
 
 

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/config.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/config.hpp	2012-02-16 21:04:54 UTC (rev 3483)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/config.hpp	2012-02-17 14:19:51 UTC (rev 3484)
@@ -1,5 +1,5 @@
-// Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
-// Copyright (C) 2008-2011 Conrad Sanderson
+// Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
+// Copyright (C) 2008-2012 Conrad Sanderson
 // 
 // This file is part of the Armadillo C++ library.
 // It is provided without any warranty of fitness
@@ -10,6 +10,8 @@
 // of the License or (at your option) any later version.
 // (see http://www.opensource.org/licenses for more info)
 
+
+
 // #define ARMA_64BIT_WORD
 //// Uncomment the above line if you require matrices/vectors capable of holding more than 4 billion elements.
 //// Your machine and compiler must have support for 64 bit integers (eg. via "long" or "long long")
@@ -67,6 +69,10 @@
 // #define ARMA_USE_BOOST_DATE
 // #define ARMA_USE_WRAPPER
 
+#if !defined(ARMA_DEFAULT_OSTREAM)
+  #define ARMA_DEFAULT_OSTREAM std::cout
+#endif
+
 #define ARMA_PRINT_LOGIC_ERRORS
 #define ARMA_PRINT_RUNTIME_ERRORS
 

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/constants.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/constants.hpp	2012-02-16 21:04:54 UTC (rev 3483)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/constants.hpp	2012-02-17 14:19:51 UTC (rev 3484)
@@ -175,7 +175,7 @@
   static eT a_0()       { return eT(0.52917720859e-10); }
   
   //! Bohr magneton
-  static eT mu_B()      { return(927.400915e-26); }
+  static eT mu_B()      { return eT(927.400915e-26); }
   
   //! characteristic impedance of vacuum (in ohms)
   static eT Z_0()       { return eT(3.76730313461771e-2); }

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/debug.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/debug.hpp	2012-02-16 21:04:54 UTC (rev 3483)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/debug.hpp	2012-02-17 14:19:51 UTC (rev 3484)
@@ -22,7 +22,7 @@
 std::ostream&
 arma_stream_err1(std::ostream* user_stream)
   {
-  static std::ostream* stream_err1 = &(ARMA_DEFAULT_STREAM);
+  static std::ostream* stream_err1 = &(ARMA_DEFAULT_OSTREAM);
   
   if(user_stream != NULL)
     {
@@ -39,7 +39,7 @@
 std::ostream&
 arma_stream_err2(std::ostream* user_stream)
   {
-  static std::ostream* stream_err2 = &(ARMA_DEFAULT_STREAM);
+  static std::ostream* stream_err2 = &(ARMA_DEFAULT_OSTREAM);
   
   if(user_stream != NULL)
     {

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/field_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/field_meat.hpp	2012-02-16 21:04:54 UTC (rev 3483)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/field_meat.hpp	2012-02-17 14:19:51 UTC (rev 3484)
@@ -624,14 +624,14 @@
   
   if(extra_text.length() != 0)
     {
-    const std::streamsize orig_width = ARMA_DEFAULT_STREAM.width();
+    const std::streamsize orig_width = ARMA_DEFAULT_OSTREAM.width();
     
-    ARMA_DEFAULT_STREAM << extra_text << '\n';
+    ARMA_DEFAULT_OSTREAM << extra_text << '\n';
   
-    ARMA_DEFAULT_STREAM.width(orig_width);
+    ARMA_DEFAULT_OSTREAM.width(orig_width);
     }
   
-  arma_ostream::print(ARMA_DEFAULT_STREAM, *this);
+  arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this);
   }
 
 

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/fn_trans.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/fn_trans.hpp	2012-02-16 21:04:54 UTC (rev 3483)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/fn_trans.hpp	2012-02-17 14:19:51 UTC (rev 3484)
@@ -43,7 +43,6 @@
 
 template<typename T1>
 arma_inline
-arma_deprecated
 const Op<T1, op_htrans>
 htrans(const Base<typename T1::elem_type,T1>& X)
   {

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/glue_relational_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/glue_relational_meat.hpp	2012-02-16 21:04:54 UTC (rev 3483)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/glue_relational_meat.hpp	2012-02-17 14:19:51 UTC (rev 3484)
@@ -1,5 +1,5 @@
-// Copyright (C) 2009-2011 NICTA (www.nicta.com.au)
-// Copyright (C) 2009-2011 Conrad Sanderson
+// Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
+// Copyright (C) 2009-2012 Conrad Sanderson
 // 
 // This file is part of the Armadillo C++ library.
 // It is provided without any warranty of fitness
@@ -30,39 +30,50 @@
   \
   arma_debug_assert_same_size(P1, P2, operator_str);\
   \
-  const uword n_rows = P1.get_n_rows();\
-  const uword n_cols = P1.get_n_cols();\
+  const bool bad_alias = (Proxy<T1>::has_subview && P1.is_alias(out)) || (Proxy<T2>::has_subview && P2.is_alias(out));\
   \
-  out.set_size(n_rows, n_cols);\
-  \
-  uword* out_mem = out.memptr();\
-  \
-  const bool prefer_at_accessor = (Proxy<T1>::prefer_at_accessor || Proxy<T2>::prefer_at_accessor);\
-  \
-  if(prefer_at_accessor == false)\
+  if(bad_alias == false)\
     {\
-    typename Proxy<T1>::ea_type A = P1.get_ea();\
-    typename Proxy<T2>::ea_type B = P2.get_ea();\
     \
-    const uword n_elem = out.n_elem;\
+    const uword n_rows = P1.get_n_rows();\
+    const uword n_cols = P1.get_n_cols();\
     \
-    for(uword i=0; i<n_elem; ++i)\
+    out.set_size(n_rows, n_cols);\
+    \
+    uword* out_mem = out.memptr();\
+    \
+    const bool prefer_at_accessor = (Proxy<T1>::prefer_at_accessor || Proxy<T2>::prefer_at_accessor);\
+    \
+    if(prefer_at_accessor == false)\
       {\
-      out_mem[i] = (A[i] operator_rel B[i]) ? uword(1) : uword(0);\
+      typename Proxy<T1>::ea_type A = P1.get_ea();\
+      typename Proxy<T2>::ea_type B = P2.get_ea();\
+      \
+      const uword n_elem = out.n_elem;\
+      \
+      for(uword i=0; i<n_elem; ++i)\
+        {\
+        out_mem[i] = (A[i] operator_rel B[i]) ? uword(1) : uword(0);\
+        }\
       }\
-    }\
-  else\
-    {\
-    uword count = 0;\
-    \
-    for(uword col=0; col<n_cols; ++col)\
+    else\
       {\
+      uword count = 0;\
+      \
+      for(uword col=0; col<n_cols; ++col)\
       for(uword row=0; row<n_rows; ++row, ++count)\
         {\
         out_mem[count] = (P1.at(row,col) operator_rel P2.at(row,col)) ? uword(1) : uword(0);\
         }\
       }\
     }\
+  else\
+    {\
+    const unwrap<typename Proxy<T1>::stored_type> tmp1(P1.Q);\
+    const unwrap<typename Proxy<T2>::stored_type> tmp2(P2.Q);\
+    \
+    out = (tmp1.M) operator_rel (tmp2.M);\
+    }\
   }
 
 
@@ -75,38 +86,51 @@
   \
   arma_debug_assert_same_size(P1, P2, operator_str);\
   \
-  const uword n_rows   = P1.get_n_rows();\
-  const uword n_cols   = P1.get_n_cols();\
-  const uword n_slices = P1.get_n_slices();\
+  const bool bad_alias = (ProxyCube<T1>::has_subview && P1.is_alias(out)) || (ProxyCube<T2>::has_subview && P2.is_alias(out));\
   \
-  out.set_size(n_rows, n_cols, n_slices);\
-  \
-  uword* out_mem = out.memptr();\
-  \
-  const bool prefer_at_accessor = (ProxyCube<T1>::prefer_at_accessor || ProxyCube<T2>::prefer_at_accessor);\
-  \
-  if(prefer_at_accessor == false)\
+  if(bad_alias == false)\
     {\
-    typename ProxyCube<T1>::ea_type A = P1.get_ea();\
-    typename ProxyCube<T2>::ea_type B = P2.get_ea();\
     \
-    const uword n_elem = out.n_elem;\
+    const uword n_rows   = P1.get_n_rows();\
+    const uword n_cols   = P1.get_n_cols();\
+    const uword n_slices = P1.get_n_slices();\
     \
-    for(uword i=0; i<n_elem; ++i)\
+    out.set_size(n_rows, n_cols, n_slices);\
+    \
+    uword* out_mem = out.memptr();\
+    \
+    const bool prefer_at_accessor = (ProxyCube<T1>::prefer_at_accessor || ProxyCube<T2>::prefer_at_accessor);\
+    \
+    if(prefer_at_accessor == false)\
       {\
-      out_mem[i] = (A[i] operator_rel B[i]) ? uword(1) : uword(0);\
+      typename ProxyCube<T1>::ea_type A = P1.get_ea();\
+      typename ProxyCube<T2>::ea_type B = P2.get_ea();\
+      \
+      const uword n_elem = out.n_elem;\
+      \
+      for(uword i=0; i<n_elem; ++i)\
+        {\
+        out_mem[i] = (A[i] operator_rel B[i]) ? uword(1) : uword(0);\
+        }\
       }\
+    else\
+      {\
+      uword count = 0;\
+      \
+      for(uword slice = 0; slice < n_slices; ++slice)\
+      for(uword col   = 0; col   < n_cols;   ++col)\
+      for(uword row   = 0; row   < n_rows;   ++row, ++count)\
+        {\
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/rcpp -r 3484


More information about the Rcpp-commits mailing list