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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Mar 20 02:06:20 CET 2012


Author: edd
Date: 2012-03-20 02:06:20 +0100 (Tue, 20 Mar 2012)
New Revision: 3534

Added:
   pkg/RcppArmadillo/inst/include/armadillo_bits/constants_compat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_hist.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_histc.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/glue_hist_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/glue_hist_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/glue_histc_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/glue_histc_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_hist_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_hist_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/subview_elem2_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/subview_elem2_meat.hpp
Removed:
   pkg/RcppArmadillo/inst/include/armadillo_bits/itpp_wrap.hpp
Modified:
   pkg/RcppArmadillo/ChangeLog
   pkg/RcppArmadillo/DESCRIPTION
   pkg/RcppArmadillo/inst/NEWS
   pkg/RcppArmadillo/inst/include/armadillo
   pkg/RcppArmadillo/inst/include/armadillo_bits/Col_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Col_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Gen_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Gen_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Glue_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Op_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Proxy.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Row_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Row_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/arrayops_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/arrayops_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/auxlib_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/compiler_setup.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/constants.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/debug.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/diagview_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/diagview_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/eGlue_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/eGlue_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/eOp_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/eOp_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/eglue_core_meat.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/field_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/field_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_accu.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_conv_to.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_cumsum.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_det.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_eye.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_max.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_mean.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_median.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_min.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_misc.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_norm.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_ones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_prod.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_randn.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_randu.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_stddev.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_strans.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_sum.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_trans.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_var.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_zeros.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/forward_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/gemm.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/glue_mixed_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/glue_relational_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/glue_times_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/glue_times_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/injector_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/injector_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/mtGlue_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/mtOp_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_max_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_max_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_mean_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_mean_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_median_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_median_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_min_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_min_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_misc_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_prod_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_prod_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_relational_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_sum_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_var_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_var_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/operator_div.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/operator_minus.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/operator_plus.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/operator_times.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/podarray_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/podarray_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/restrictors.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/strip.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/subview_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/subview_cube_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/subview_cube_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/subview_elem1_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/subview_elem1_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/subview_field_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/subview_field_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/subview_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/traits.hpp
Log:
Armadillo release 2.99.1 -- currently triggering a unit test failure in runit.Armadillo.R from the test.wrap.R checks


Modified: pkg/RcppArmadillo/ChangeLog
===================================================================
--- pkg/RcppArmadillo/ChangeLog	2012-03-20 00:39:14 UTC (rev 3533)
+++ pkg/RcppArmadillo/ChangeLog	2012-03-20 01:06:20 UTC (rev 3534)
@@ -1,7 +1,11 @@
+2012-03-19  Dirk Eddelbuettel  <edd at debian.org>
+
+	* inst/include/*: Upgraded to new test release 2.99.1 of Armadillo
+
 2012-03-05  Dirk Eddelbuettel  <edd at debian.org>
 
-	* DESCRIPTION: Release 0.2.36 
-	
+	* DESCRIPTION: Release 0.2.36
+
 	* inst/include/*: Upgraded to new release 2.4.4 of Armadillo
 
 2012-02-17  Dirk Eddelbuettel  <edd at debian.org>

Modified: pkg/RcppArmadillo/DESCRIPTION
===================================================================
--- pkg/RcppArmadillo/DESCRIPTION	2012-03-20 00:39:14 UTC (rev 3533)
+++ pkg/RcppArmadillo/DESCRIPTION	2012-03-20 01:06:20 UTC (rev 3534)
@@ -1,7 +1,7 @@
 Package: RcppArmadillo
 Type: Package
 Title: Rcpp integration for Armadillo templated linear algebra library
-Version: 0.2.36
+Version: 0.2.37
 Date: $Date$
 Author: Romain Francois, Dirk Eddelbuettel and Doug Bates
 Maintainer: Romain Francois, Dirk Eddelbuettel and Doug Bates <RcppArmadillo-authors at r-enthusiasts.com>
@@ -21,7 +21,7 @@
  (due to speed and/or integration capabilities), rather than another language.
  .
  The RcppArmadillo package includes the header files from the templated
- Armadillo library (currently version 2.4.4). Thus users do not need to
+ Armadillo library (currently version 2.99.1). Thus users do not need to
  install Armadillo itself in order to use RcppArmadillo.
  .
  This Armadillo integration provides a nice illustration of the 

Modified: pkg/RcppArmadillo/inst/NEWS
===================================================================
--- pkg/RcppArmadillo/inst/NEWS	2012-03-20 00:39:14 UTC (rev 3533)
+++ pkg/RcppArmadillo/inst/NEWS	2012-03-20 01:06:20 UTC (rev 3534)
@@ -1,3 +1,15 @@
+0.2.37  2012-03-19
+
+    o   Upgraded to Armadillo test release 2.99.1 "Antarctic Chilli Ranch (Beta 1)"
+
+    	  * added non-contiguous submatrix views
+	  * added hist() and histc()
+	  * faster handling of submatrix views
+	  * faster generation of random numbers
+	  * faster element access in fixed size matrices
+	  * better detection of vector expressions by sum(), cumsum(),
+	    prod(), min(), max(), mean(), median(), stddev(), var() 
+
 0.2.36  2012-03-05
 
     o   Upgraded to Armadillo release 2.4.4

Modified: pkg/RcppArmadillo/inst/include/armadillo
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo	2012-03-20 00:39:14 UTC (rev 3533)
+++ pkg/RcppArmadillo/inst/include/armadillo	2012-03-20 01:06:20 UTC (rev 3534)
@@ -49,7 +49,6 @@
   #undef ARMA_USE_BOOST_DATE
 #endif
 
-
 #if defined(ARMA_USE_BOOST_DATE)
   #include <boost/date_time/posix_time/posix_time.hpp>
 #endif
@@ -77,7 +76,6 @@
 
 
 #include "armadillo_bits/include_atlas.hpp"
-#include "armadillo_bits/itpp_wrap.hpp"
 
 
 //! \namespace arma namespace for Armadillo classes and functions
@@ -100,6 +98,7 @@
   #include "armadillo_bits/access.hpp"
   #include "armadillo_bits/span.hpp"
   #include "armadillo_bits/constants.hpp"
+  #include "armadillo_bits/constants_compat.hpp"
   
   
   //
@@ -132,6 +131,7 @@
   #include "armadillo_bits/field_bones.hpp"
   #include "armadillo_bits/subview_bones.hpp"
   #include "armadillo_bits/subview_elem1_bones.hpp"
+  #include "armadillo_bits/subview_elem2_bones.hpp"
   #include "armadillo_bits/subview_field_bones.hpp"
   #include "armadillo_bits/subview_cube_bones.hpp"
   #include "armadillo_bits/diagview_bones.hpp"
@@ -198,6 +198,7 @@
   #include "armadillo_bits/op_trimat_bones.hpp"
   #include "armadillo_bits/op_cumsum_bones.hpp"
   #include "armadillo_bits/op_symmat_bones.hpp"
+  #include "armadillo_bits/op_hist_bones.hpp"
   
   #include "armadillo_bits/glue_times_bones.hpp"
   #include "armadillo_bits/glue_mixed_bones.hpp"
@@ -210,6 +211,8 @@
   #include "armadillo_bits/glue_solve_bones.hpp"
   #include "armadillo_bits/glue_conv_bones.hpp"
   #include "armadillo_bits/glue_toeplitz_bones.hpp"
+  #include "armadillo_bits/glue_hist_bones.hpp"
+  #include "armadillo_bits/glue_histc_bones.hpp"
   
   //
   // debugging functions
@@ -353,6 +356,8 @@
   #include "armadillo_bits/fn_cumsum.hpp"
   #include "armadillo_bits/fn_symmat.hpp"
   #include "armadillo_bits/fn_syl_lyap.hpp"
+  #include "armadillo_bits/fn_hist.hpp"
+  #include "armadillo_bits/fn_histc.hpp"
   
   //
   // class meat
@@ -377,6 +382,7 @@
   #include "armadillo_bits/field_meat.hpp"
   #include "armadillo_bits/subview_meat.hpp"
   #include "armadillo_bits/subview_elem1_meat.hpp"
+  #include "armadillo_bits/subview_elem2_meat.hpp"
   #include "armadillo_bits/subview_field_meat.hpp"
   #include "armadillo_bits/subview_cube_meat.hpp"
   #include "armadillo_bits/diagview_meat.hpp"
@@ -419,6 +425,7 @@
   #include "armadillo_bits/op_trimat_meat.hpp"
   #include "armadillo_bits/op_cumsum_meat.hpp"
   #include "armadillo_bits/op_symmat_meat.hpp"
+  #include "armadillo_bits/op_hist_meat.hpp"
   
   #include "armadillo_bits/glue_times_meat.hpp"
   #include "armadillo_bits/glue_mixed_meat.hpp"
@@ -431,6 +438,8 @@
   #include "armadillo_bits/glue_solve_meat.hpp"
   #include "armadillo_bits/glue_conv_meat.hpp"
   #include "armadillo_bits/glue_toeplitz_meat.hpp"
+  #include "armadillo_bits/glue_hist_meat.hpp"
+  #include "armadillo_bits/glue_histc_meat.hpp"
   }
   
 #endif

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Col_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Col_bones.hpp	2012-03-20 00:39:14 UTC (rev 3533)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Col_bones.hpp	2012-03-20 01:06:20 UTC (rev 3534)
@@ -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
@@ -24,6 +24,8 @@
   typedef eT                                elem_type;
   typedef typename get_pod_type<eT>::result pod_type;
   
+  static const bool is_col = true;
+  static const bool is_row = false;
   
   inline          Col();
   inline          Col(const Col<eT>& X);
@@ -61,6 +63,10 @@
   
   inline mat_injector<Col> operator<<(const eT val);
   
+  arma_inline const Op<Col<eT>,op_htrans>  t() const;
+  arma_inline const Op<Col<eT>,op_htrans> ht() const;
+  arma_inline const Op<Col<eT>,op_strans> st() const;
+  
   arma_inline eT& row(const uword row_num);
   arma_inline eT  row(const uword row_num) const;
   
@@ -120,7 +126,6 @@
     template<typename T1>              inline fixed(const Base<eT,T1>& A);
     template<typename T1, typename T2> inline fixed(const Base<pod_type,T1>& A, const Base<pod_type,T2>& B);
     
-    inline fixed(      eT* aux_mem, const bool copy_aux_mem = true);
     inline fixed(const eT* aux_mem);
     
     inline fixed(const char*        text);

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Col_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Col_meat.hpp	2012-03-20 00:39:14 UTC (rev 3533)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Col_meat.hpp	2012-03-20 01:06:20 UTC (rev 3534)
@@ -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
@@ -19,11 +19,9 @@
 template<typename eT>
 inline
 Col<eT>::Col()
-  : Mat<eT>(0, 1)
+  : Mat<eT>(arma_vec_indicator(), 1)
   {
   arma_extra_debug_sigprint();
-  
-  access::rw(Mat<eT>::vec_state) = 1;
   }
 
 
@@ -31,12 +29,10 @@
 template<typename eT>
 inline
 Col<eT>::Col(const Col<eT>& X)
-  : Mat<eT>(X.n_elem, 1)
+  : Mat<eT>(arma_vec_indicator(), X.n_elem, 1, 1)
   {
   arma_extra_debug_sigprint();
   
-  access::rw(Mat<eT>::vec_state) = 1;
-  
   arrayops::copy((*this).memptr(), X.memptr(), X.n_elem);
   }
 
@@ -46,11 +42,9 @@
 template<typename eT>
 inline
 Col<eT>::Col(const uword in_n_elem)
-  : Mat<eT>(in_n_elem, 1)
+  : Mat<eT>(arma_vec_indicator(), in_n_elem, 1, 1)
   {
   arma_extra_debug_sigprint();
-  
-  access::rw(Mat<eT>::vec_state) = 1;
   }
 
 
@@ -58,11 +52,10 @@
 template<typename eT>
 inline
 Col<eT>::Col(const uword in_n_rows, const uword in_n_cols)
+  : Mat<eT>(arma_vec_indicator(), 0, 0, 1)
   {
   arma_extra_debug_sigprint();
   
-  access::rw(Mat<eT>::vec_state) = 1;
-  
   Mat<eT>::init_warm(in_n_rows, in_n_cols);
   }
 
@@ -205,11 +198,10 @@
 template<typename T1>
 inline
 Col<eT>::Col(const Base<eT,T1>& X)
+  : Mat<eT>(arma_vec_indicator(), 1)
   {
   arma_extra_debug_sigprint();
   
-  access::rw(Mat<eT>::vec_state) = 1;
-  
   Mat<eT>::operator=(X.get_ref());
   }
 
@@ -342,6 +334,36 @@
 
 template<typename eT>
 arma_inline
+const Op<Col<eT>,op_htrans>
+Col<eT>::t() const
+  {
+  return Op<Col<eT>,op_htrans>(*this);
+  }
+
+
+
+template<typename eT>
+arma_inline
+const Op<Col<eT>,op_htrans>
+Col<eT>::ht() const
+  {
+  return Op<Col<eT>,op_htrans>(*this);
+  }
+
+
+
+template<typename eT>
+arma_inline
+const Op<Col<eT>,op_strans>
+Col<eT>::st() const
+  {
+  return Op<Col<eT>,op_strans>(*this);
+  }
+
+
+
+template<typename eT>
+arma_inline
 eT&
 Col<eT>::row(const uword row_num)
   {
@@ -771,35 +793,6 @@
 template<typename eT>
 template<uword fixed_n_elem>
 inline
-Col<eT>::fixed<fixed_n_elem>::fixed(eT* aux_mem, const bool copy_aux_mem)
-  {
-  arma_extra_debug_sigprint_this(this);
-  
-  access::rw(Mat<eT>::n_rows)    = fixed_n_elem;
-  access::rw(Mat<eT>::n_cols)    = 1;
-  access::rw(Mat<eT>::n_elem)    = fixed_n_elem;
-  access::rw(Mat<eT>::vec_state) = 1;
-  access::rw(Mat<eT>::mem_state) = 3;
-  
-  if(copy_aux_mem == true)
-    {
-    eT* dest = (use_extra) ? mem_local_extra : Mat<eT>::mem_local;
-    
-    access::rw(Mat<eT>::mem) = dest;
-    
-    arrayops::copy( dest, aux_mem, fixed_n_elem );
-    }
-  else
-    {
-    access::rw(Mat<eT>::mem) = aux_mem;
-    }
-  }
-
-
-
-template<typename eT>
-template<uword fixed_n_elem>
-inline
 Col<eT>::fixed<fixed_n_elem>::fixed(const eT* aux_mem)
   {
   arma_extra_debug_sigprint_this(this);
@@ -1009,7 +1002,7 @@
 eT&
 Col<eT>::fixed<fixed_n_elem>::operator[] (const uword i)
   {
-  return access::rw( Mat<eT>::mem[i] );
+  return (use_extra) ? mem_local_extra[i] : Mat<eT>::mem_local[i];
   }
 
 
@@ -1021,7 +1014,7 @@
 eT
 Col<eT>::fixed<fixed_n_elem>::operator[] (const uword i) const
   {
-  return ( Mat<eT>::mem[i] );
+  return (use_extra) ? mem_local_extra[i] : Mat<eT>::mem_local[i];
   }
 
 
@@ -1033,7 +1026,7 @@
 eT&
 Col<eT>::fixed<fixed_n_elem>::at(const uword i)
   {
-  return access::rw( Mat<eT>::mem[i] );
+  return (use_extra) ? mem_local_extra[i] : Mat<eT>::mem_local[i];
   }
 
 
@@ -1045,7 +1038,7 @@
 eT
 Col<eT>::fixed<fixed_n_elem>::at(const uword i) const
   {
-  return ( Mat<eT>::mem[i] );
+  return (use_extra) ? mem_local_extra[i] : Mat<eT>::mem_local[i];
   }
 
 
@@ -1057,9 +1050,9 @@
 eT&
 Col<eT>::fixed<fixed_n_elem>::operator() (const uword i)
   {
-  arma_debug_check( (i >= fixed_n_elem), "Col::fixed::operator(): out of bounds");
+  arma_debug_check( (i >= fixed_n_elem), "Col::operator(): out of bounds");
   
-  return access::rw( Mat<eT>::mem[i] );
+  return (use_extra) ? mem_local_extra[i] : Mat<eT>::mem_local[i];
   }
 
 
@@ -1071,9 +1064,9 @@
 eT
 Col<eT>::fixed<fixed_n_elem>::operator() (const uword i) const
   {
-  arma_debug_check( (i >= fixed_n_elem), "Col::fixed::operator(): out of bounds");
+  arma_debug_check( (i >= fixed_n_elem), "Col::operator(): out of bounds");
   
-  return ( Mat<eT>::mem[i] );
+  return (use_extra) ? mem_local_extra[i] : Mat<eT>::mem_local[i];
   }
 
 
@@ -1085,7 +1078,7 @@
 eT&
 Col<eT>::fixed<fixed_n_elem>::at(const uword in_row, const uword in_col)
   {
-  return access::rw( Mat<eT>::mem[in_row] );
+  return (use_extra) ? mem_local_extra[in_row] : Mat<eT>::mem_local[in_row];
   }
 
 
@@ -1097,7 +1090,7 @@
 eT
 Col<eT>::fixed<fixed_n_elem>::at(const uword in_row, const uword in_col) const
   {
-  return ( Mat<eT>::mem[in_row] );
+  return (use_extra) ? mem_local_extra[in_row] : Mat<eT>::mem_local[in_row];
   }
 
 
@@ -1109,9 +1102,9 @@
 eT&
 Col<eT>::fixed<fixed_n_elem>::operator() (const uword in_row, const uword in_col)
   {
-  arma_debug_check( ((in_row >= fixed_n_elem) || (in_col >= 1)), "Col::fixed::operator(): out of bounds" );
+  arma_debug_check( ((in_row >= fixed_n_elem) || (in_col > 0)), "Col::operator(): out of bounds" );
   
-  return access::rw( Mat<eT>::mem[in_row] );
+  return (use_extra) ? mem_local_extra[in_row] : Mat<eT>::mem_local[in_row];
   }
 
 
@@ -1123,9 +1116,9 @@
 eT
 Col<eT>::fixed<fixed_n_elem>::operator() (const uword in_row, const uword in_col) const
   {
-  arma_debug_check( ((in_row >= fixed_n_elem) || (in_col >= 1)), "Col::fixed::operator(): out of bounds" );
+  arma_debug_check( ((in_row >= fixed_n_elem) || (in_col > 0)), "Col::operator(): out of bounds" );
   
-  return ( Mat<eT>::mem[in_row] );
+  return (use_extra) ? mem_local_extra[in_row] : Mat<eT>::mem_local[in_row];
   }
 
 
@@ -1139,8 +1132,10 @@
   {
   arma_extra_debug_sigprint();
   
-  arrayops::inplace_set( const_cast<eT*>(Mat<eT>::mem), val, fixed_n_elem );
+  eT* mem_use = (use_extra) ? &(mem_local_extra[0]) : &(Mat<eT>::mem_local[0]);
   
+  arrayops::inplace_set_fixed<eT,fixed_n_elem>( mem_use, val );
+  
   return *this;
   }
 
@@ -1155,8 +1150,10 @@
   {
   arma_extra_debug_sigprint();
   
-  arrayops::inplace_set( const_cast<eT*>(Mat<eT>::mem), eT(0), fixed_n_elem );
+  eT* mem_use = (use_extra) ? &(mem_local_extra[0]) : &(Mat<eT>::mem_local[0]);
   
+  arrayops::inplace_set_fixed<eT,fixed_n_elem>( mem_use, eT(0) );
+  
   return *this;
   }
 
@@ -1171,8 +1168,10 @@
   {
   arma_extra_debug_sigprint();
   
-  arrayops::inplace_set( const_cast<eT*>(Mat<eT>::mem), eT(1), fixed_n_elem );
+  eT* mem_use = (use_extra) ? &(mem_local_extra[0]) : &(Mat<eT>::mem_local[0]);
   
+  arrayops::inplace_set_fixed<eT,fixed_n_elem>( mem_use, eT(1) );
+  
   return *this;
   }
 

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Gen_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Gen_bones.hpp	2012-03-20 00:39:14 UTC (rev 3533)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Gen_bones.hpp	2012-03-20 01:06:20 UTC (rev 3534)
@@ -1,5 +1,5 @@
-// Copyright (C) 2011 NICTA (www.nicta.com.au)
-// Copyright (C) 2011 Conrad Sanderson
+// Copyright (C) 2011-2012 NICTA (www.nicta.com.au)
+// Copyright (C) 2011-2012 Conrad Sanderson
 // 
 // This file is part of the Armadillo C++ library.
 // It is provided without any warranty of fitness
@@ -16,16 +16,20 @@
 
 
 //! support class for generator functions (eg. zeros, randu, randn, ...)
-template<typename eT, typename gen_type>
-class Gen : public Base<eT, Gen<eT, gen_type> >
+template<typename T1, typename gen_type>
+class Gen : public Base<typename T1::elem_type, Gen<T1, gen_type> >
   {
   public:
   
-  typedef          eT                              elem_type;
+  typedef typename T1::elem_type                   eT;
+  typedef typename T1::elem_type                   elem_type;
   typedef typename get_pod_type<elem_type>::result pod_type;
   
   static const bool prefer_at_accessor = (is_same_type<gen_type, gen_ones_diag>::value) ? true : false;
   
+  static const bool is_row = T1::is_row;
+  static const bool is_col = T1::is_col;
+  
   arma_aligned const uword n_rows;
   arma_aligned const uword n_cols;
   

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Gen_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Gen_meat.hpp	2012-03-20 00:39:14 UTC (rev 3533)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Gen_meat.hpp	2012-03-20 01:06:20 UTC (rev 3534)
@@ -1,5 +1,5 @@
-// Copyright (C) 2011 NICTA (www.nicta.com.au)
-// Copyright (C) 2011 Conrad Sanderson
+// Copyright (C) 2011-2012 NICTA (www.nicta.com.au)
+// Copyright (C) 2011-2012 Conrad Sanderson
 // 
 // This file is part of the Armadillo C++ library.
 // It is provided without any warranty of fitness
@@ -16,9 +16,9 @@
 
 
 
-template<typename eT, typename gen_type>
+template<typename T1, typename gen_type>
 arma_inline
-Gen<eT, gen_type>::Gen(const uword in_n_rows, const uword in_n_cols)
+Gen<T1, gen_type>::Gen(const uword in_n_rows, const uword in_n_cols)
   : n_rows(in_n_rows)
   , n_cols(in_n_cols)
   {
@@ -27,20 +27,22 @@
 
 
 
-template<typename eT, typename gen_type>
+template<typename T1, typename gen_type>
 arma_inline
-Gen<eT, gen_type>::~Gen()
+Gen<T1, gen_type>::~Gen()
   {
   arma_extra_debug_sigprint();
   }
 
 
 
-template<typename eT, typename gen_type>
+template<typename T1, typename gen_type>
 arma_inline
-eT
-Gen<eT, gen_type>::generate()
+typename T1::elem_type
+Gen<T1, gen_type>::generate()
   {
+  typedef typename T1::elem_type eT;
+  
        if(is_same_type<gen_type, gen_ones_full>::value == true) { return eT(1);                   }
   else if(is_same_type<gen_type, gen_zeros    >::value == true) { return eT(0);                   }
   else if(is_same_type<gen_type, gen_randu    >::value == true) { return eT(eop_aux_randu<eT>()); }
@@ -50,44 +52,48 @@
 
 
 
-template<typename eT, typename gen_type>
+template<typename T1, typename gen_type>
 arma_inline
-eT
-Gen<eT, gen_type>::operator[](const uword i) const
+typename T1::elem_type
+Gen<T1, gen_type>::operator[](const uword i) const
   {
+  typedef typename T1::elem_type eT;
+  
   if(is_same_type<gen_type, gen_ones_diag>::value == true)
     {
     return ((i % n_rows) == (i / n_rows)) ? eT(1) : eT(0);
     }
   else
     {
-    return Gen<eT, gen_type>::generate();
+    return Gen<T1, gen_type>::generate();
     }
   }
 
 
 
-template<typename eT, typename gen_type>
+template<typename T1, typename gen_type>
 arma_inline
-eT
-Gen<eT, gen_type>::at(const uword row, const uword col) const
+typename T1::elem_type
+Gen<T1, gen_type>::at(const uword row, const uword col) const
   {
+  typedef typename T1::elem_type eT;
+  
   if(is_same_type<gen_type, gen_ones_diag>::value == true)
     {
     return (row == col) ? eT(1) : eT(0);
     }
   else
     {
-    return Gen<eT, gen_type>::generate();
+    return Gen<T1, gen_type>::generate();
     }
   }
 
 
 
-template<typename eT, typename gen_type>
+template<typename T1, typename gen_type>
 inline
 void
-Gen<eT, gen_type>::apply(Mat<eT>& out) const
+Gen<T1, gen_type>::apply(Mat<typename T1::elem_type>& out) const
   {
   arma_extra_debug_sigprint();
   
@@ -103,16 +109,18 @@
 
 
 
-template<typename eT, typename gen_type>
+template<typename T1, typename gen_type>
 inline
 void
-Gen<eT, gen_type>::apply_inplace_plus(Mat<eT>& out) const
+Gen<T1, gen_type>::apply_inplace_plus(Mat<typename T1::elem_type>& out) const
   {
   arma_extra_debug_sigprint();
   
   arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "addition");
   
+  typedef typename T1::elem_type eT;
   
+  
   if(is_same_type<gen_type, gen_ones_diag>::value == true)
     {
     const uword N = (std::min)(n_rows, n_cols);
@@ -131,8 +139,8 @@
     
     for(i=0, j=1; j<n_elem; i+=2, j+=2)
       {
-      const eT tmp_i = Gen<eT, gen_type>::generate();
-      const eT tmp_j = Gen<eT, gen_type>::generate();
+      const eT tmp_i = Gen<T1, gen_type>::generate();
+      const eT tmp_j = Gen<T1, gen_type>::generate();
       
       out_mem[i] += tmp_i;
       out_mem[j] += tmp_j;
@@ -140,7 +148,7 @@
     
     if(i < n_elem)
       {
-      out_mem[i] += Gen<eT, gen_type>::generate();
+      out_mem[i] += Gen<T1, gen_type>::generate();
       }
     }
   
@@ -149,16 +157,18 @@
 
 
 
-template<typename eT, typename gen_type>
+template<typename T1, typename gen_type>
 inline
 void
-Gen<eT, gen_type>::apply_inplace_minus(Mat<eT>& out) const
+Gen<T1, gen_type>::apply_inplace_minus(Mat<typename T1::elem_type>& out) const
   {
   arma_extra_debug_sigprint();
   
   arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "subtraction");
   
+  typedef typename T1::elem_type eT;
   
+  
   if(is_same_type<gen_type, gen_ones_diag>::value == true)
     {
     const uword N = (std::min)(n_rows, n_cols);
@@ -177,8 +187,8 @@
     
     for(i=0, j=1; j<n_elem; i+=2, j+=2)
       {
-      const eT tmp_i = Gen<eT, gen_type>::generate();
-      const eT tmp_j = Gen<eT, gen_type>::generate();
+      const eT tmp_i = Gen<T1, gen_type>::generate();
+      const eT tmp_j = Gen<T1, gen_type>::generate();
       
       out_mem[i] -= tmp_i;
       out_mem[j] -= tmp_j;
@@ -186,7 +196,7 @@
     
     if(i < n_elem)
       {
-      out_mem[i] -= Gen<eT, gen_type>::generate();
+      out_mem[i] -= Gen<T1, gen_type>::generate();
       }
     }
   
@@ -195,16 +205,18 @@
 
 
 
-template<typename eT, typename gen_type>
+template<typename T1, typename gen_type>
 inline
 void
-Gen<eT, gen_type>::apply_inplace_schur(Mat<eT>& out) const
+Gen<T1, gen_type>::apply_inplace_schur(Mat<typename T1::elem_type>& out) const
   {
   arma_extra_debug_sigprint();
   
   arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "element-wise multiplication");
   
+  typedef typename T1::elem_type eT;
   
+  
   if(is_same_type<gen_type, gen_ones_diag>::value == true)
     {
     const uword N = (std::min)(n_rows, n_cols);
@@ -224,8 +236,8 @@
     
     for(i=0, j=1; j<n_elem; i+=2, j+=2)
       {
-      const eT tmp_i = Gen<eT, gen_type>::generate();
-      const eT tmp_j = Gen<eT, gen_type>::generate();
+      const eT tmp_i = Gen<T1, gen_type>::generate();
+      const eT tmp_j = Gen<T1, gen_type>::generate();
       
       out_mem[i] *= tmp_i;
       out_mem[j] *= tmp_j;
@@ -233,7 +245,7 @@
     
     if(i < n_elem)
       {
-      out_mem[i] *= Gen<eT, gen_type>::generate();
+      out_mem[i] *= Gen<T1, gen_type>::generate();
       }
     }
   
@@ -242,16 +254,18 @@
 
 
 
-template<typename eT, typename gen_type>
+template<typename T1, typename gen_type>
 inline
 void
-Gen<eT, gen_type>::apply_inplace_div(Mat<eT>& out) const
+Gen<T1, gen_type>::apply_inplace_div(Mat<typename T1::elem_type>& out) const
   {
   arma_extra_debug_sigprint();
   
   arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "element-wise division");
   
+  typedef typename T1::elem_type eT;
   
+  
   if(is_same_type<gen_type, gen_ones_diag>::value == true)
     {
     const uword N = (std::min)(n_rows, n_cols);
@@ -273,8 +287,8 @@
     
     for(i=0, j=1; j<n_elem; i+=2, j+=2)
       {
-      const eT tmp_i = Gen<eT, gen_type>::generate();
-      const eT tmp_j = Gen<eT, gen_type>::generate();
+      const eT tmp_i = Gen<T1, gen_type>::generate();
+      const eT tmp_j = Gen<T1, gen_type>::generate();
       
       out_mem[i] /= tmp_i;
       out_mem[j] /= tmp_j;
@@ -282,7 +296,7 @@
     
     if(i < n_elem)
       {
-      out_mem[i] /= Gen<eT, gen_type>::generate();
+      out_mem[i] /= Gen<T1, gen_type>::generate();
       }
     }
   
@@ -292,3 +306,4 @@
 
 
 //! @}
+

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Glue_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Glue_bones.hpp	2012-03-20 00:39:14 UTC (rev 3533)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Glue_bones.hpp	2012-03-20 01:06:20 UTC (rev 3534)
@@ -1,5 +1,5 @@
-// Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
-// Copyright (C) 2008-2010 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
@@ -37,6 +37,9 @@
   typedef typename T1::elem_type                   elem_type;
   typedef typename get_pod_type<elem_type>::result pod_type;
   
+  static const bool is_row = (is_same_type<glue_type, glue_times>::value) ? T1::is_row : false;
+  static const bool is_col = (is_same_type<glue_type, glue_times>::value) ? T2::is_col : false;
+  
   arma_inline  Glue(const T1& in_A, const T2& in_B);
   arma_inline  Glue(const T1& in_A, const T2& in_B, const uword in_aux_uword);
   arma_inline ~Glue();

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_bones.hpp	2012-03-20 00:39:14 UTC (rev 3533)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_bones.hpp	2012-03-20 01:06:20 UTC (rev 3534)
@@ -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
@@ -26,6 +26,10 @@
   typedef eT                                elem_type;  //!< the type of elements stored in the matrix
   typedef typename get_pod_type<eT>::result pod_type;   //!< if eT is non-complex, pod_type is same as eT. otherwise, pod_type is the underlying type used by std::complex
   
+  static const bool is_col = false;
+  static const bool is_row = false;
+  
+  
   const uword  n_rows;    //!< number of rows in the matrix (read-only)
   const uword  n_cols;    //!< number of columns in the matrix (read-only)
   const uword  n_elem;    //!< number of elements in the matrix (read-only)
@@ -123,9 +127,17 @@
   template<typename T1> inline const Mat& operator%=(const subview_elem1<eT,T1>& X);
   template<typename T1> inline const Mat& operator/=(const subview_elem1<eT,T1>& X);
   
+  template<typename T1, typename T2> inline                   Mat(const subview_elem2<eT,T1,T2>& X);
+  template<typename T1, typename T2> inline const Mat& operator= (const subview_elem2<eT,T1,T2>& X);
+  template<typename T1, typename T2> inline const Mat& operator+=(const subview_elem2<eT,T1,T2>& X);
+  template<typename T1, typename T2> inline const Mat& operator-=(const subview_elem2<eT,T1,T2>& X);
+  template<typename T1, typename T2> inline const Mat& operator*=(const subview_elem2<eT,T1,T2>& X);
+  template<typename T1, typename T2> inline const Mat& operator%=(const subview_elem2<eT,T1,T2>& X);
+  template<typename T1, typename T2> inline const Mat& operator/=(const subview_elem2<eT,T1,T2>& X);
   
+  
   inline mat_injector<Mat> operator<<(const eT val);
-  inline mat_injector<Mat> operator<<(const injector_end_of_row& x);
+  inline mat_injector<Mat> operator<<(const injector_end_of_row<>& x);
   
   
   arma_inline       subview_row<eT> row(const uword row_num);
@@ -165,10 +177,24 @@
   template<typename T1> arma_inline       subview_elem1<eT,T1> elem(const Base<uword,T1>& a);
   template<typename T1> arma_inline const subview_elem1<eT,T1> elem(const Base<uword,T1>& a) const;
   
-  // template<typename T1, typename T2> arma_inline       subview_elem2<eT,T1,T2> submat(const Base<uword,T1>& a, const Base<uword,T2>& b);
-  // template<typename T1, typename T2> arma_inline const subview_elem2<eT,T1,T2> submat(const Base<uword,T1>& a, const Base<uword,T2>& b) const;
   
+  template<typename T1, typename T2> arma_inline       subview_elem2<eT,T1,T2> elem(const Base<uword,T1>& ri, const Base<uword,T2>& ci);
+  template<typename T1, typename T2> arma_inline const subview_elem2<eT,T1,T2> elem(const Base<uword,T1>& ri, const Base<uword,T2>& ci) const;
   
+  template<typename T1, typename T2> arma_inline       subview_elem2<eT,T1,T2> submat(const Base<uword,T1>& ri, const Base<uword,T2>& ci);
+  template<typename T1, typename T2> arma_inline const subview_elem2<eT,T1,T2> submat(const Base<uword,T1>& ri, const Base<uword,T2>& ci) const;
+  
+  template<typename T1, typename T2> arma_inline       subview_elem2<eT,T1,T2> operator()(const Base<uword,T1>& ri, const Base<uword,T2>& ci);
+  template<typename T1, typename T2> arma_inline const subview_elem2<eT,T1,T2> operator()(const Base<uword,T1>& ri, const Base<uword,T2>& ci) const;
+  
+  template<typename T1> arma_inline       subview_elem2<eT,T1,T1> rows(const Base<uword,T1>& ri);
+  template<typename T1> arma_inline const subview_elem2<eT,T1,T1> rows(const Base<uword,T1>& ri) const;
+  
+  template<typename T2> arma_inline       subview_elem2<eT,T2,T2> cols(const Base<uword,T2>& ci);
+  template<typename T2> arma_inline const subview_elem2<eT,T2,T2> cols(const Base<uword,T2>& ci) const;
+  
+  
+  
   arma_inline       diagview<eT> diag(const sword in_id = 0);
   arma_inline const diagview<eT> diag(const sword in_id = 0) const;
   
@@ -189,13 +215,13 @@
   template<typename T1> inline void insert_cols(const uword col_num, const Base<eT,T1>& X);
   
   
-  template<typename gen_type> inline                   Mat(const Gen<eT, gen_type>& X);
-  template<typename gen_type> inline const Mat&  operator=(const Gen<eT, gen_type>& X);
-  template<typename gen_type> inline const Mat& operator+=(const Gen<eT, gen_type>& X);
-  template<typename gen_type> inline const Mat& operator-=(const Gen<eT, gen_type>& X);
-  template<typename gen_type> inline const Mat& operator*=(const Gen<eT, gen_type>& X);
-  template<typename gen_type> inline const Mat& operator%=(const Gen<eT, gen_type>& X);
-  template<typename gen_type> inline const Mat& operator/=(const Gen<eT, gen_type>& X);
+  template<typename T1, typename gen_type> inline                   Mat(const Gen<T1, gen_type>& X);
+  template<typename T1, typename gen_type> inline const Mat&  operator=(const Gen<T1, gen_type>& X);
+  template<typename T1, typename gen_type> inline const Mat& operator+=(const Gen<T1, gen_type>& X);
+  template<typename T1, typename gen_type> inline const Mat& operator-=(const Gen<T1, gen_type>& X);
+  template<typename T1, typename gen_type> inline const Mat& operator*=(const Gen<T1, gen_type>& X);
+  template<typename T1, typename gen_type> inline const Mat& operator%=(const Gen<T1, gen_type>& X);
+  template<typename T1, typename gen_type> inline const Mat& operator/=(const Gen<T1, gen_type>& X);
   
   template<typename T1, typename op_type> inline                   Mat(const Op<T1, op_type>& X);
   template<typename T1, typename op_type> inline const Mat&  operator=(const Op<T1, op_type>& X);
@@ -302,8 +328,8 @@
   inline void impl_raw_print_trans(std::ostream& user_stream, const std::string& extra_text) const;
   
   
-  template<typename eT2>
-  inline void copy_size(const Mat<eT2>& m);
+  template<typename eT2, typename expr>
+  inline void copy_size(const Base<eT2,expr>& X);
   
   inline void set_size(const uword in_elem);
   inline void set_size(const uword in_rows, const uword in_cols);
@@ -469,7 +495,6 @@
     template<typename T1>              inline fixed(const Base<eT,T1>& A);
     template<typename T1, typename T2> inline fixed(const Base<pod_type,T1>& A, const Base<pod_type,T2>& B);
     
-    inline fixed(      eT* aux_mem, const bool copy_aux_mem = true);
     inline fixed(const eT* aux_mem);
     
     inline fixed(const char*        text);
@@ -513,6 +538,10 @@
     };
   
   
+  
+  inline void steal_mem(Mat& X);  //!< don't use this unless you're writing code internal to Armadillo
+  
+  
   protected:
   
   inline void init_cold();
@@ -527,17 +556,17 @@
   template<typename T1, typename T2>
   inline void init(const Base<pod_type,T1>& A, const Base<pod_type,T2>& B);
   
-  inline void steal_mem(Mat& X);
-  
   inline Mat(const char junk, const eT* aux_mem, const uword aux_n_rows, const uword aux_n_cols);
   
+  inline Mat(const arma_vec_indicator&, const uhword in_vec_state);
+  inline Mat(const arma_vec_indicator&, const uword in_n_rows, const uword in_n_cols, const uhword in_vec_state);
+
   friend class Cube<eT>;
   friend class glue_join;
   friend class op_strans;
   friend class op_htrans;
   friend class op_resize;
   
-  
   public:
   
   #ifdef ARMA_EXTRA_MAT_PROTO

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_meat.hpp	2012-03-20 00:39:14 UTC (rev 3533)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_meat.hpp	2012-03-20 01:06:20 UTC (rev 3534)
@@ -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
@@ -80,8 +80,42 @@
 
 
 
+//! constructor used by Row and Col classes
 template<typename eT>
 inline
+Mat<eT>::Mat(const arma_vec_indicator&, const uhword in_vec_state)
+  : n_rows( (in_vec_state == 2) ? 1 : 0 )
+  , n_cols( (in_vec_state == 1) ? 1 : 0 )
+  , n_elem(0)
+  , vec_state(in_vec_state)
+  , mem_state(0)
+  , mem()
+  {
+  arma_extra_debug_sigprint_this(this);
+  }
+
+
+
+//! constructor used by Row and Col classes
+template<typename eT>
+inline
+Mat<eT>::Mat(const arma_vec_indicator&, const uword in_n_rows, const uword in_n_cols, const uhword in_vec_state)
+  : n_rows(in_n_rows)
+  , n_cols(in_n_cols)
+  , n_elem(in_n_rows*in_n_cols)
+  , vec_state(in_vec_state)
+  , mem_state(0)
+  , mem()
+  {
+  arma_extra_debug_sigprint_this(this);
+  
+  init_cold();
+  }
+
+
+
+template<typename eT>
+inline
 void
 Mat<eT>::init_cold()
   {
@@ -587,37 +621,58 @@
 void
[TRUNCATED]

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


More information about the Rcpp-commits mailing list