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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Aug 31 00:32:21 CEST 2012


Author: edd
Date: 2012-08-31 00:32:20 +0200 (Fri, 31 Aug 2012)
New Revision: 3747

Added:
   pkg/RcppArmadillo/inst/include/armadillo_bits/SpBase_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/SpBase_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/SpCol_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/SpCol_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/SpGlue_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/SpGlue_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/SpMat_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/SpMat_iterators_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/SpMat_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/SpOp_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/SpOp_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/SpProxy.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/SpRow_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/SpRow_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/SpSubview_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/SpSubview_iterators_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/SpSubview_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/SpValProxy_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/SpValProxy_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_n_unique.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_speye.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_spones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_sprandn.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_sprandu.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/hdf5_misc.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/spglue_minus_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/spglue_minus_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/spglue_plus_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/spglue_plus_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/spglue_times_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/spglue_times_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/spop_htrans_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/spop_htrans_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/spop_max_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/spop_max_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/spop_min_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/spop_min_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/spop_misc_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/spop_misc_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/spop_strans_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/spop_strans_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/spop_sum_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/spop_sum_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/subview_each_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/subview_each_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/unwrap_spmat.hpp
Modified:
   pkg/RcppArmadillo/ChangeLog
   pkg/RcppArmadillo/DESCRIPTION
   pkg/RcppArmadillo/inst/NEWS
   pkg/RcppArmadillo/inst/include/armadillo
   pkg/RcppArmadillo/inst/include/armadillo_bits/Col_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_meat.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/Row_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/access.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/arma_config.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/arma_ostream_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/arma_ostream_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_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/auxlib_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/config.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/diskio_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/diskio_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/eGlue_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/eop_aux.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_accu.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_as_scalar.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_dot.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_max.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_min.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_qr.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_svd.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_trace.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_trans.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/forward_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/gemm.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/lapack_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/lapack_wrapper.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/memory.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_dot_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_dot_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_htrans_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_sort_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_sort_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_strans_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_ostream.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/operator_plus.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/operator_schur.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/subview_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/subview_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/traits.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/typedef.hpp
Log:
RcppArmadillo 0.3.3.19 with Armadillo 3.3.91 (aka v3.4.0 beta 1)


Modified: pkg/RcppArmadillo/ChangeLog
===================================================================
--- pkg/RcppArmadillo/ChangeLog	2012-08-28 01:18:38 UTC (rev 3746)
+++ pkg/RcppArmadillo/ChangeLog	2012-08-30 22:32:20 UTC (rev 3747)
@@ -1,3 +1,9 @@
+2012-08-30  Dirk Eddelbuettel  <edd at debian.org>
+
+	* DESCRIPTION: Release 0.3.3.91
+
+	* inst/include/*: Upgraded to release 3.3.91 (v3.4 beta 1) of Armadillo
+
 2012-07-21  Dirk Eddelbuettel  <edd at debian.org>
 
 	* inst/unitTests/runit.fastLm.R: expanded unit tests for fastLm

Modified: pkg/RcppArmadillo/DESCRIPTION
===================================================================
--- pkg/RcppArmadillo/DESCRIPTION	2012-08-28 01:18:38 UTC (rev 3746)
+++ pkg/RcppArmadillo/DESCRIPTION	2012-08-30 22:32:20 UTC (rev 3747)
@@ -1,7 +1,7 @@
 Package: RcppArmadillo
 Type: Package
 Title: Rcpp integration for Armadillo templated linear algebra library
-Version: 0.3.2.4.1
+Version: 0.3.3.91
 Date: $Date$
 Author: Romain Francois, Dirk Eddelbuettel and Doug Bates
 Maintainer: Dirk Eddelbuettel <edd at debian.org>

Modified: pkg/RcppArmadillo/inst/NEWS
===================================================================
--- pkg/RcppArmadillo/inst/NEWS	2012-08-28 01:18:38 UTC (rev 3746)
+++ pkg/RcppArmadillo/inst/NEWS	2012-08-30 22:32:20 UTC (rev 3747)
@@ -1,5 +1,16 @@
-0.3.x.y  2012-xx-yy
+0.3.3.91  2012-08-30
 
+    o   Upgraded to Armadillo release 3.3.91
+
+	  * faster singular value decomposition via "divide and conquer"
+            algorithm
+	  * added economical QR decomposition: qr_econ()
+	  * added .each_col() & .each_row() for vector operations repeated on
+	    each column or row
+	  * added preliminary support for sparse matrices, contributed by
+	    Ryan Curtin, James Cline and Matthew Amidon (Georgia Institute of
+	    Technology)
+
     o   Corrected summary method to deal with the no intercept case when
         using a formula; also display residual summary() statistics
 

Modified: pkg/RcppArmadillo/inst/include/armadillo
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo	2012-08-28 01:18:38 UTC (rev 3746)
+++ pkg/RcppArmadillo/inst/include/armadillo	2012-08-30 22:32:20 UTC (rev 3747)
@@ -122,6 +122,7 @@
   
   #include "armadillo_bits/Base_bones.hpp"
   #include "armadillo_bits/BaseCube_bones.hpp"
+  #include "armadillo_bits/SpBase_bones.hpp"
   
   #include "armadillo_bits/blas_bones.hpp"
   #include "armadillo_bits/lapack_bones.hpp"
@@ -143,6 +144,12 @@
   #include "armadillo_bits/Row_bones.hpp"
   #include "armadillo_bits/Cube_bones.hpp"
   
+  #include "armadillo_bits/SpValProxy_bones.hpp"
+  #include "armadillo_bits/SpMat_bones.hpp"
+  #include "armadillo_bits/SpCol_bones.hpp"
+  #include "armadillo_bits/SpRow_bones.hpp"
+  #include "armadillo_bits/SpSubview_bones.hpp"
+  
   #include "armadillo_bits/typedef_fixed.hpp"
   
   #include "armadillo_bits/field_bones.hpp"
@@ -152,6 +159,7 @@
   #include "armadillo_bits/subview_field_bones.hpp"
   #include "armadillo_bits/subview_cube_bones.hpp"
   #include "armadillo_bits/diagview_bones.hpp"
+  #include "armadillo_bits/subview_each_bones.hpp"
   
   
   #include "armadillo_bits/diskio_bones.hpp"
@@ -161,6 +169,7 @@
   
   #include "armadillo_bits/Op_bones.hpp"
   #include "armadillo_bits/OpCube_bones.hpp"
+  #include "armadillo_bits/SpOp_bones.hpp"
   
   #include "armadillo_bits/eOp_bones.hpp"
   #include "armadillo_bits/eOpCube_bones.hpp"
@@ -171,6 +180,7 @@
   #include "armadillo_bits/Glue_bones.hpp"
   #include "armadillo_bits/eGlue_bones.hpp"
   #include "armadillo_bits/mtGlue_bones.hpp"
+  #include "armadillo_bits/SpGlue_bones.hpp"
   
   #include "armadillo_bits/GlueCube_bones.hpp"
   #include "armadillo_bits/eGlueCube_bones.hpp"
@@ -232,6 +242,17 @@
   #include "armadillo_bits/glue_hist_bones.hpp"
   #include "armadillo_bits/glue_histc_bones.hpp"
   
+  #include "armadillo_bits/spop_max_bones.hpp"
+  #include "armadillo_bits/spop_min_bones.hpp"
+  #include "armadillo_bits/spop_sum_bones.hpp"
+  #include "armadillo_bits/spop_strans_bones.hpp"
+  #include "armadillo_bits/spop_htrans_bones.hpp"
+  #include "armadillo_bits/spop_misc_bones.hpp"
+  
+  #include "armadillo_bits/spglue_plus_bones.hpp"
+  #include "armadillo_bits/spglue_minus_bones.hpp"
+  #include "armadillo_bits/spglue_times_bones.hpp"
+  
   //
   // debugging functions
   
@@ -247,9 +268,11 @@
   
   #include "armadillo_bits/unwrap.hpp"
   #include "armadillo_bits/unwrap_cube.hpp"
+  #include "armadillo_bits/unwrap_spmat.hpp"
   
   #include "armadillo_bits/Proxy.hpp"
   #include "armadillo_bits/ProxyCube.hpp"
+  #include "armadillo_bits/SpProxy.hpp"
   
   #include "armadillo_bits/diagmat_proxy.hpp"
 
@@ -257,12 +280,14 @@
   
   #include "armadillo_bits/Op_meat.hpp"
   #include "armadillo_bits/OpCube_meat.hpp"
+  #include "armadillo_bits/SpOp_meat.hpp"
   
   #include "armadillo_bits/mtOp_meat.hpp"
   #include "armadillo_bits/mtOpCube_meat.hpp"
   
   #include "armadillo_bits/Glue_meat.hpp"
   #include "armadillo_bits/GlueCube_meat.hpp"
+  #include "armadillo_bits/SpGlue_meat.hpp"
   
   #include "armadillo_bits/eop_aux.hpp"
   
@@ -277,6 +302,7 @@
   
   #include "armadillo_bits/Base_meat.hpp"
   #include "armadillo_bits/BaseCube_meat.hpp"
+  #include "armadillo_bits/SpBase_meat.hpp"
   
   #include "armadillo_bits/Gen_meat.hpp"
   #include "armadillo_bits/GenCube_meat.hpp"
@@ -288,6 +314,10 @@
   #include "armadillo_bits/arma_ostream_bones.hpp"
   #include "armadillo_bits/arma_ostream_meat.hpp"
   
+  //
+  // n_unique, which is used by some sparse operators
+
+  #include "armadillo_bits/fn_n_unique.hpp"
   
   //
   // operators
@@ -378,6 +408,17 @@
   #include "armadillo_bits/fn_histc.hpp"
   #include "armadillo_bits/fn_unique.hpp"
   
+  #include "armadillo_bits/fn_speye.hpp"
+  #include "armadillo_bits/fn_spones.hpp"
+  #include "armadillo_bits/fn_sprandn.hpp"
+  #include "armadillo_bits/fn_sprandu.hpp"
+  
+  
+  // misc stuff
+  
+  #include "armadillo_bits/hdf5_misc.hpp"
+
+
   //
   // class meat
   
@@ -406,6 +447,15 @@
   #include "armadillo_bits/subview_field_meat.hpp"
   #include "armadillo_bits/subview_cube_meat.hpp"
   #include "armadillo_bits/diagview_meat.hpp"
+  #include "armadillo_bits/subview_each_meat.hpp"
+
+  #include "armadillo_bits/SpValProxy_meat.hpp"
+  #include "armadillo_bits/SpMat_meat.hpp"
+  #include "armadillo_bits/SpMat_iterators_meat.hpp"
+  #include "armadillo_bits/SpCol_meat.hpp"
+  #include "armadillo_bits/SpRow_meat.hpp"
+  #include "armadillo_bits/SpSubview_meat.hpp"
+  #include "armadillo_bits/SpSubview_iterators_meat.hpp"
   
   #include "armadillo_bits/diskio_meat.hpp"
   #include "armadillo_bits/wall_clock_meat.hpp"
@@ -461,6 +511,17 @@
   #include "armadillo_bits/glue_toeplitz_meat.hpp"
   #include "armadillo_bits/glue_hist_meat.hpp"
   #include "armadillo_bits/glue_histc_meat.hpp"
+  
+  #include "armadillo_bits/spop_max_meat.hpp"
+  #include "armadillo_bits/spop_min_meat.hpp"
+  #include "armadillo_bits/spop_sum_meat.hpp"
+  #include "armadillo_bits/spop_strans_meat.hpp"
+  #include "armadillo_bits/spop_htrans_meat.hpp"
+  #include "armadillo_bits/spop_misc_meat.hpp"
+  
+  #include "armadillo_bits/spglue_plus_meat.hpp"
+  #include "armadillo_bits/spglue_minus_meat.hpp"
+  #include "armadillo_bits/spglue_times_meat.hpp"
   }
   
 #endif

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Col_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Col_meat.hpp	2012-08-28 01:18:38 UTC (rev 3746)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Col_meat.hpp	2012-08-30 22:32:20 UTC (rev 3747)
@@ -140,42 +140,42 @@
 
 
 #if defined(ARMA_USE_CXX11)
-
-template<typename eT>
-inline
-Col<eT>::Col(const std::initializer_list<eT>& list)
-  {
-  arma_extra_debug_sigprint();
   
-  access::rw(Mat<eT>::vec_state) = 2;
+  template<typename eT>
+  inline
+  Col<eT>::Col(const std::initializer_list<eT>& list)
+    {
+    arma_extra_debug_sigprint();
+    
+    access::rw(Mat<eT>::vec_state) = 2;
+    
+    Mat<eT>::operator=(list);
+    
+    std::swap( access::rw(Mat<eT>::n_rows), access::rw(Mat<eT>::n_cols) );
+    
+    access::rw(Mat<eT>::vec_state) = 1;
+    }
   
-  Mat<eT>::operator=(list);
   
-  std::swap( access::rw(Mat<eT>::n_rows), access::rw(Mat<eT>::n_cols) );
   
-  access::rw(Mat<eT>::vec_state) = 1;
-  }
-
-
-
-template<typename eT>
-inline
-const Col<eT>&
-Col<eT>::operator=(const std::initializer_list<eT>& list)
-  {
-  arma_extra_debug_sigprint();
+  template<typename eT>
+  inline
+  const Col<eT>&
+  Col<eT>::operator=(const std::initializer_list<eT>& list)
+    {
+    arma_extra_debug_sigprint();
+    
+    access::rw(Mat<eT>::vec_state) = 2;
+    
+    Mat<eT>::operator=(list);
+    
+    std::swap( access::rw(Mat<eT>::n_rows), access::rw(Mat<eT>::n_cols) );
+    
+    access::rw(Mat<eT>::vec_state) = 1;
+    
+    return *this;
+    }
   
-  access::rw(Mat<eT>::vec_state) = 2;
-  
-  Mat<eT>::operator=(list);
-  
-  std::swap( access::rw(Mat<eT>::n_rows), access::rw(Mat<eT>::n_cols) );
-  
-  access::rw(Mat<eT>::vec_state) = 1;
-  
-  return *this;
-  }
-
 #endif
 
 
@@ -938,41 +938,41 @@
 
 
 #if defined(ARMA_USE_CXX11)
-
-template<typename eT>
-template<uword fixed_n_elem>
-inline
-Col<eT>::fixed<fixed_n_elem>::fixed(const std::initializer_list<eT>& list)
-  : Col<eT>( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat<eT>::mem_local) )
-  {
-  arma_extra_debug_sigprint_this(this);
   
-  (*this).operator=(list);
-  }
-
-
-
-template<typename eT>
-template<uword fixed_n_elem>
-inline
-const Col<eT>&
-Col<eT>::fixed<fixed_n_elem>::operator=(const std::initializer_list<eT>& list)
-  {
-  arma_extra_debug_sigprint();
+  template<typename eT>
+  template<uword fixed_n_elem>
+  inline
+  Col<eT>::fixed<fixed_n_elem>::fixed(const std::initializer_list<eT>& list)
+    : Col<eT>( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat<eT>::mem_local) )
+    {
+    arma_extra_debug_sigprint_this(this);
+    
+    (*this).operator=(list);
+    }
   
-  const uword N = list.size();
   
-  arma_debug_check( (N > fixed_n_elem), "Col::fixed: initialiser list is too long" );
   
-  eT* this_mem = (*this).memptr();
+  template<typename eT>
+  template<uword fixed_n_elem>
+  inline
+  const Col<eT>&
+  Col<eT>::fixed<fixed_n_elem>::operator=(const std::initializer_list<eT>& list)
+    {
+    arma_extra_debug_sigprint();
+    
+    const uword N = list.size();
+    
+    arma_debug_check( (N > fixed_n_elem), "Col::fixed: initialiser list is too long" );
+    
+    eT* this_mem = (*this).memptr();
+    
+    arrayops::copy( this_mem, list.begin(), N );
+    
+    for(uword iq=N; iq < fixed_n_elem; ++iq) { this_mem[iq] = eT(0); }
+    
+    return *this;
+    }
   
-  arrayops::copy( this_mem, list.begin(), N );
-  
-  for(uword iq=N; iq < fixed_n_elem; ++iq) { this_mem[iq] = eT(0); }
-  
-  return *this;
-  }
-
 #endif
 
 

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_meat.hpp	2012-08-28 01:18:38 UTC (rev 3746)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_meat.hpp	2012-08-30 22:32:20 UTC (rev 3747)
@@ -2516,22 +2516,8 @@
   {
   arma_extra_debug_sigprint();
   
-  const uword N   = n_elem;
-        eT*   ptr = memptr();
+  eop_aux_randu<eT>::fill( memptr(), n_elem );
   
-  uword i,j;
-  
-  for(i=0, j=1; j<N; i+=2, j+=2)
-    {
-    ptr[i] = eT(eop_aux_randu<eT>());
-    ptr[j] = eT(eop_aux_randu<eT>());
-    }
-  
-  if(i < N)
-    {
-    ptr[i] = eT(eop_aux_randu<eT>());
-    }
-  
   return *this;
   }
 
@@ -2558,14 +2544,8 @@
   {
   arma_extra_debug_sigprint();
   
-  const uword N   = n_elem;
-        eT*   ptr = memptr();
+  eop_aux_randn<eT>::fill( memptr(), n_elem );
   
-  for(uword i=0; i<N; ++i)
-    {
-    ptr[i] = eT(eop_aux_randn<eT>());
-    }
-  
   return *this;
   }
 

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_bones.hpp	2012-08-28 01:18:38 UTC (rev 3746)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_bones.hpp	2012-08-30 22:32:20 UTC (rev 3747)
@@ -134,8 +134,16 @@
   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);
+
+  // Operators on sparse matrices (and subviews).
+  template<typename T1> inline explicit          Mat(const SpBase<eT, T1>& m);
+  template<typename T1> inline const Mat&  operator=(const SpBase<eT, T1>& m);
+  template<typename T1> inline const Mat& operator+=(const SpBase<eT, T1>& m);
+  template<typename T1> inline const Mat& operator-=(const SpBase<eT, T1>& m);
+  template<typename T1> inline const Mat& operator*=(const SpBase<eT, T1>& m);
+  template<typename T1> inline const Mat& operator%=(const SpBase<eT, T1>& m);
+  template<typename T1> inline const Mat& operator/=(const SpBase<eT, T1>& m);
   
-  
   inline mat_injector<Mat> operator<<(const eT val);
   inline mat_injector<Mat> operator<<(const injector_end_of_row<>& x);
   
@@ -194,7 +202,12 @@
   template<typename T2> arma_inline const subview_elem2<eT,T2,T2> cols(const Base<uword,T2>& ci) const;
   
   
+  arma_inline subview_each1< Mat<eT>, 0 > each_col();
+  arma_inline subview_each1< Mat<eT>, 1 > each_row();
   
+  template<typename T1> inline subview_each2< Mat<eT>, 0, T1 > each_col(const Base<uword, T1>& indices);
+  template<typename T1> inline subview_each2< Mat<eT>, 1, T1 > each_row(const Base<uword, T1>& indices);
+  
   arma_inline       diagview<eT> diag(const sword in_id = 0);
   arma_inline const diagview<eT> diag(const sword in_id = 0) const;
   

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_meat.hpp	2012-08-28 01:18:38 UTC (rev 3746)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_meat.hpp	2012-08-30 22:32:20 UTC (rev 3747)
@@ -440,40 +440,40 @@
 
 
 #if defined(ARMA_USE_CXX11)
-
-template<typename eT>
-inline
-Mat<eT>::Mat(const std::initializer_list<eT>& list)
-  : n_rows(0)
-  , n_cols(0)
-  , n_elem(0)
-  , vec_state(0)
-  , mem_state(0)
-  , mem()
-  {
-  arma_extra_debug_sigprint_this(this);
   
-  init(list);
-  }
-
-
-
-template<typename eT>
-inline
-const Mat<eT>&
-Mat<eT>::operator=(const std::initializer_list<eT>& list)
-  {
-  arma_extra_debug_sigprint();
+  template<typename eT>
+  inline
+  Mat<eT>::Mat(const std::initializer_list<eT>& list)
+    : n_rows(0)
+    , n_cols(0)
+    , n_elem(0)
+    , vec_state(0)
+    , mem_state(0)
+    , mem()
+    {
+    arma_extra_debug_sigprint_this(this);
+    
+    init(list);
+    }
   
-  init(list);
   
-  return *this;
-  }
-
+  
+  template<typename eT>
+  inline
+  const Mat<eT>&
+  Mat<eT>::operator=(const std::initializer_list<eT>& list)
+    {
+    arma_extra_debug_sigprint();
+    
+    init(list);
+    
+    return *this;
+    }
+  
 #endif
+  
 
 
-
 //! Set the matrix to be equal to the specified scalar.
 //! NOTE: the size of the matrix will be 1x1
 template<typename eT>
@@ -1925,7 +1925,187 @@
 
 
 template<typename eT>
+template<typename T1>
 inline
+Mat<eT>::Mat(const SpBase<eT, T1>& m)
+  : n_rows(0)
+  , n_cols(0)
+  , n_elem(0)
+  , vec_state(0)
+  , mem_state(0)
+  , mem()
+  {
+  arma_extra_debug_sigprint_this(this);
+
+  const SpProxy<T1> p(m.get_ref());
+
+  access::rw(n_rows) = p.get_n_rows();
+  access::rw(n_cols) = p.get_n_cols();
+  access::rw(n_elem) = p.get_n_elem();
+
+  init_cold();
+  fill(eT(0));
+
+  // Iterate over each nonzero element and set it.
+  for(typename SpProxy<T1>::const_iterator_type it = p.begin(); it.pos() < p.get_n_nonzero(); ++it)
+    {
+    at(it.row(), it.col()) = (*it);
+    }
+  }
+
+
+
+template<typename eT>
+template<typename T1>
+inline
+const Mat<eT>&
+Mat<eT>::operator=(const SpBase<eT, T1>& m)
+  {
+  arma_extra_debug_sigprint();
+
+  const SpProxy<T1> p(m.get_ref());
+
+  init_warm(p.get_n_rows(), p.get_n_cols());
+
+  fill(eT(0));
+
+  for(typename SpProxy<T1>::const_iterator_type it = p.begin(); it.pos() < p.get_n_nonzero(); ++it)
+    {
+    at(it.row(), it.col()) = (*it);
+    }
+
+  return *this;
+  }
+
+
+
+template<typename eT>
+template<typename T1>
+inline
+const Mat<eT>&
+Mat<eT>::operator+=(const SpBase<eT, T1>& m)
+  {
+  arma_extra_debug_sigprint();
+
+  const SpProxy<T1> p(m.get_ref());
+
+  arma_debug_assert_same_size(n_rows, n_cols, p.get_n_rows(), p.get_n_cols(), "addition");
+
+  for(typename SpProxy<T1>::const_iterator_type it = p.begin(); it.pos() < p.get_n_nonzero(); ++it)
+    {
+    at(it.row(), it.col()) += (*it);
+    }
+
+  return *this;
+  }
+
+
+
+template<typename eT>
+template<typename T1>
+inline
+const Mat<eT>&
+Mat<eT>::operator-=(const SpBase<eT, T1>& m)
+  {
+  arma_extra_debug_sigprint();
+
+  const SpProxy<T1> p(m.get_ref());
+
+  arma_debug_assert_same_size(n_rows, n_cols, p.get_n_rows(), p.get_n_cols(), "subtraction");
+
+  for(typename SpProxy<T1>::const_iterator_type it = p.begin(); it.pos() < p.get_n_nonzero(); ++it)
+    {
+    at(it.row(), it.col()) -= (*it);
+    }
+
+  return *this;
+  }
+
+
+
+template<typename eT>
+template<typename T1>
+inline
+const Mat<eT>&
+Mat<eT>::operator*=(const SpBase<eT, T1>& m)
+  {
+  arma_extra_debug_sigprint();
+
+  Mat<eT> z;
+  z = (*this) * m.get_ref();
+  steal_mem(z);
+
+  return *this;
+  }
+
+
+
+template<typename eT>
+template<typename T1>
+inline
+const Mat<eT>&
+Mat<eT>::operator%=(const SpBase<eT, T1>& m)
+  {
+  arma_extra_debug_sigprint();
+
+  const SpProxy<T1> p(m.get_ref());
+
+  arma_debug_assert_same_size(n_rows, n_cols, p.get_n_rows(), p.get_n_cols(), "element-wise multiplication");
+
+  typename SpProxy<T1>::const_iterator_type it = p.begin();
+
+  // We have to zero everything that isn't being used.
+  arrayops::inplace_set(memptr(), eT(0), (it.col() * n_rows) + it.row());
+
+  while(it.pos() < p.get_n_nonzero())
+    {
+    const uword cur_loc = (it.col() * n_rows) + it.row();
+
+    access::rw(mem[cur_loc]) *= (*it);
+
+    ++it;
+
+    const uword next_loc = (it.pos() == p.get_n_nonzero())
+      ? (p.get_n_cols() * n_rows)
+      : (it.col() * n_rows) + it.row();
+
+    arrayops::inplace_set(memptr() + cur_loc + 1, eT(0), (next_loc - cur_loc - 1));
+    }
+
+  return *this;
+  }
+
+
+
+template<typename eT>
+template<typename T1>
+inline
+const Mat<eT>&
+Mat<eT>::operator/=(const SpBase<eT, T1>& m)
+  {
+  arma_extra_debug_sigprint();
+
+  const SpProxy<T1> p(m.get_ref());
+
+  arma_debug_assert_same_size(n_rows, n_cols, p.get_n_rows(), p.get_n_cols(), "element-wise division");
+
+  // If you use this method, you are probably stupid or misguided, but for completeness it is implemented.
+  // Unfortunately the best way to do this is loop over every element.
+  for(uword c = 0; c < n_cols; ++c)
+    {
+    for(uword r = 0; r < n_rows; ++r)
+      {
+      at(r, c) /= p.at(r, c);
+      }
+    }
+
+  return *this;
+  }
+
+
+
+template<typename eT>
+inline
 mat_injector< Mat<eT> >
 Mat<eT>::operator<<(const eT val)
   {
@@ -2540,6 +2720,56 @@
 
 
 
+template<typename eT>
+arma_inline
+subview_each1< Mat<eT>, 0 >
+Mat<eT>::each_col()
+  {
+  arma_extra_debug_sigprint();
+  
+  return subview_each1< Mat<eT>, 0>(*this);
+  }
+
+
+
+template<typename eT>
+arma_inline
+subview_each1< Mat<eT>, 1 >
+Mat<eT>::each_row()
+  {
+  arma_extra_debug_sigprint();
+  
+  return subview_each1< Mat<eT>, 1>(*this);
+  }
+
+
+
+template<typename eT>
+template<typename T1>
+inline
+subview_each2< Mat<eT>, 0, T1 >
+Mat<eT>::each_col(const Base<uword, T1>& indices)
+  {
+  arma_extra_debug_sigprint();
+  
+  return subview_each2< Mat<eT>, 0, T1 >(*this, indices);
+  }
+
+
+
+template<typename eT>
+template<typename T1>
+inline
+subview_each2< Mat<eT>, 1, T1 >
+Mat<eT>::each_row(const Base<uword, T1>& indices)
+  {
+  arma_extra_debug_sigprint();
+  
+  return subview_each2< Mat<eT>, 1, T1 >(*this, indices);
+  }
+
+
+
 //! creation of diagview (diagonal)
 template<typename eT>
 arma_inline
@@ -4659,25 +4889,8 @@
   {
   arma_extra_debug_sigprint();
   
-  const uword N   = n_elem;
-        eT*   ptr = memptr();
+  eop_aux_randu<eT>::fill( memptr(), n_elem );
   
-  uword ii,jj;
-  
-  for(ii=0, jj=1; jj < N; ii+=2, jj+=2)
-    {
-    const eT tmp_ii = eT(eop_aux_randu<eT>());
-    const eT tmp_jj = eT(eop_aux_randu<eT>());
-    
-    ptr[ii] = tmp_ii;
-    ptr[jj] = tmp_jj;
-    }
-  
-  if(ii < N)
-    {
-    ptr[ii] = eT(eop_aux_randu<eT>());
-    }
-  
   return *this;
   }
 
@@ -4718,14 +4931,8 @@
   {
   arma_extra_debug_sigprint();
   
-  const uword N   = n_elem;
-        eT*   ptr = memptr();
+  eop_aux_randn<eT>::fill( memptr(), n_elem );
   
-  for(uword ii=0; ii<N; ++ii)
-    {
-    ptr[ii] = eT(eop_aux_randn<eT>());
-    }
-  
   return *this;
   }
 
@@ -5808,41 +6015,41 @@
 
 
 #if defined(ARMA_USE_CXX11)
-
-template<typename eT>
-template<uword fixed_n_rows, uword fixed_n_cols>
-inline
-Mat<eT>::fixed<fixed_n_rows, fixed_n_cols>::fixed(const std::initializer_list<eT>& list)
-  : Mat<eT>( arma_fixed_indicator(), fixed_n_rows, fixed_n_cols, 0, ((use_extra) ? mem_local_extra : mem_local) )
-  {
-  arma_extra_debug_sigprint_this(this);
   
-  (*this).operator=(list);
-  }
+  template<typename eT>
+  template<uword fixed_n_rows, uword fixed_n_cols>
+  inline
+  Mat<eT>::fixed<fixed_n_rows, fixed_n_cols>::fixed(const std::initializer_list<eT>& list)
+    : Mat<eT>( arma_fixed_indicator(), fixed_n_rows, fixed_n_cols, 0, ((use_extra) ? mem_local_extra : mem_local) )
+    {
+    arma_extra_debug_sigprint_this(this);
+    
+    (*this).operator=(list);
+    }
 
 
 
-template<typename eT>
-template<uword fixed_n_rows, uword fixed_n_cols>
-inline
-const Mat<eT>&
-Mat<eT>::fixed<fixed_n_rows, fixed_n_cols>::operator=(const std::initializer_list<eT>& list)
-  {
-  arma_extra_debug_sigprint();
+  template<typename eT>
+  template<uword fixed_n_rows, uword fixed_n_cols>
+  inline
+  const Mat<eT>&
+  Mat<eT>::fixed<fixed_n_rows, fixed_n_cols>::operator=(const std::initializer_list<eT>& list)
+    {
+    arma_extra_debug_sigprint();
+    
+    const uword N = list.size();
+    
+    arma_debug_check( (N > fixed_n_elem), "Mat::fixed: initialiser list is too long" );
+    
+    eT* this_mem = (*this).memptr();
+    
+    arrayops::copy( this_mem, list.begin(), N );
+    
+    for(uword iq=N; iq < fixed_n_elem; ++iq) { this_mem[iq] = eT(0); }
+    
+    return *this;
+    }
   
-  const uword N = list.size();
-  
-  arma_debug_check( (N > fixed_n_elem), "Mat::fixed: initialiser list is too long" );
-  
-  eT* this_mem = (*this).memptr();
-  
-  arrayops::copy( this_mem, list.begin(), N );
-  
-  for(uword iq=N; iq < fixed_n_elem; ++iq) { this_mem[iq] = eT(0); }
-  
-  return *this;
-  }
-
 #endif
   
 

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Row_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Row_meat.hpp	2012-08-28 01:18:38 UTC (rev 3746)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Row_meat.hpp	2012-08-30 22:32:20 UTC (rev 3747)
@@ -116,32 +116,32 @@
 
 
 #if defined(ARMA_USE_CXX11)
-
-template<typename eT>
-inline
-Row<eT>::Row(const std::initializer_list<eT>& list)
-  {
-  arma_extra_debug_sigprint();
   
-  access::rw(Mat<eT>::vec_state) = 2;
+  template<typename eT>
+  inline
+  Row<eT>::Row(const std::initializer_list<eT>& list)
+    {
+    arma_extra_debug_sigprint();
+    
+    access::rw(Mat<eT>::vec_state) = 2;
+    
+    Mat<eT>::operator=(list);
+    }
   
-  Mat<eT>::operator=(list);
-  }
-
-
-
-template<typename eT>
-inline
-const Row<eT>&
-Row<eT>::operator=(const std::initializer_list<eT>& list)
-  {
-  arma_extra_debug_sigprint();
   
-  Mat<eT>::operator=(list);
   
-  return *this;
-  }
-
+  template<typename eT>
+  inline
+  const Row<eT>&
+  Row<eT>::operator=(const std::initializer_list<eT>& list)
+    {
+    arma_extra_debug_sigprint();
+    
+    Mat<eT>::operator=(list);
+    
+    return *this;
+    }
+  
 #endif
 
 
@@ -876,41 +876,41 @@
 
 
 #if defined(ARMA_USE_CXX11)
-
-template<typename eT>
-template<uword fixed_n_elem>
-inline
-Row<eT>::fixed<fixed_n_elem>::fixed(const std::initializer_list<eT>& list)
-  : Row<eT>( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat<eT>::mem_local) )
-  {
-  arma_extra_debug_sigprint_this(this);
   
-  (*this).operator=(list);
-  }
-
-
-
-template<typename eT>
-template<uword fixed_n_elem>
-inline
-const Row<eT>&
-Row<eT>::fixed<fixed_n_elem>::operator=(const std::initializer_list<eT>& list)
-  {
-  arma_extra_debug_sigprint();
+  template<typename eT>
+  template<uword fixed_n_elem>
+  inline
+  Row<eT>::fixed<fixed_n_elem>::fixed(const std::initializer_list<eT>& list)
+    : Row<eT>( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat<eT>::mem_local) )
+    {
+    arma_extra_debug_sigprint_this(this);
+    
+    (*this).operator=(list);
+    }
   
-  const uword N = list.size();
   
-  arma_debug_check( (N > fixed_n_elem), "Row::fixed: initialiser list is too long" );
   
-  eT* this_mem = (*this).memptr();
+  template<typename eT>
+  template<uword fixed_n_elem>
+  inline
+  const Row<eT>&
+  Row<eT>::fixed<fixed_n_elem>::operator=(const std::initializer_list<eT>& list)
+    {
+    arma_extra_debug_sigprint();
+    
+    const uword N = list.size();
+    
+    arma_debug_check( (N > fixed_n_elem), "Row::fixed: initialiser list is too long" );
+    
+    eT* this_mem = (*this).memptr();
+    
+    arrayops::copy( this_mem, list.begin(), N );
+    
+    for(uword iq=N; iq < fixed_n_elem; ++iq) { this_mem[iq] = eT(0); }
+    
+    return *this;
+    }
   
-  arrayops::copy( this_mem, list.begin(), N );
-  
-  for(uword iq=N; iq < fixed_n_elem; ++iq) { this_mem[iq] = eT(0); }
-  
-  return *this;
-  }
-
 #endif
 
 

Added: pkg/RcppArmadillo/inst/include/armadillo_bits/SpBase_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/SpBase_bones.hpp	                        (rev 0)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/SpBase_bones.hpp	2012-08-30 22:32:20 UTC (rev 3747)
@@ -0,0 +1,43 @@
+// Copyright (C) 2012 NICTA (www.nicta.com.au)
+// Copyright (C) 2012 Conrad Sanderson
+// 
+// This file is part of the Armadillo C++ library.
+// It is provided without any warranty of fitness
+// for any purpose. You can redistribute this file
+// and/or modify it under the terms of the GNU
+// Lesser General Public License (LGPL) as published
+// by the Free Software Foundation, either version 3
+// of the License or (at your option) any later version.
+// (see http://www.opensource.org/licenses for more info)
+
+
+//! \addtogroup SpBase
+//! @{
+
+
+
+template<typename elem_type, typename derived>
+struct SpBase
+  {
+  arma_inline const derived& get_ref() const;
+  
+  inline const SpOp<derived,spop_htrans>  t() const;  //!< Hermitian transpose
+  inline const SpOp<derived,spop_htrans> ht() const;  //!< Hermitian transpose
+  inline const SpOp<derived,spop_strans> st() const;  //!< simple transpose
+  
+  inline void print(const std::string extra_text = "") const;
+  inline void print(std::ostream& user_stream, const std::string extra_text = "") const;
+  
+  inline void raw_print(const std::string extra_text = "") const;
+  inline void raw_print(std::ostream& user_stream, const std::string extra_text = "") const;
+
+  inline void print_dense(const std::string extra_text = "") const;
+  inline void print_dense(std::ostream& user_stream, const std::string extra_text = "") const;
+
+  inline void raw_print_dense(const std::string extra_text = "") const;
+  inline void raw_print_dense(std::ostream& user_stream, const std::string extra_text = "") const;
+  };
+
+
+
+//! @}

Added: pkg/RcppArmadillo/inst/include/armadillo_bits/SpBase_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/SpBase_meat.hpp	                        (rev 0)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/SpBase_meat.hpp	2012-08-30 22:32:20 UTC (rev 3747)
@@ -0,0 +1,154 @@
+// Copyright (C) 2012 NICTA (www.nicta.com.au)
+// Copyright (C) 2012 Conrad Sanderson
+// 
+// This file is part of the Armadillo C++ library.
+// It is provided without any warranty of fitness
+// for any purpose. You can redistribute this file
+// and/or modify it under the terms of the GNU
+// Lesser General Public License (LGPL) as published
+// by the Free Software Foundation, either version 3
+// of the License or (at your option) any later version.
+// (see http://www.opensource.org/licenses for more info)
+
+
+//! \addtogroup SpBase
+//! @{
+
+
+
+template<typename elem_type, typename derived>
+arma_inline
+const derived&
+SpBase<elem_type,derived>::get_ref() const
+  {
+  return static_cast<const derived&>(*this);
+  }
+
+
+
+template<typename elem_type, typename derived>
+inline
+const SpOp<derived, spop_htrans>
+SpBase<elem_type,derived>::t() const
+  {
+  return SpOp<derived,spop_htrans>( (*this).get_ref() );
+  }
+
+
+template<typename elem_type, typename derived>
+inline
+const SpOp<derived, spop_htrans>
+SpBase<elem_type,derived>::ht() const
+  {
+  return SpOp<derived, spop_htrans>( (*this).get_ref() );
+  }
+
+
+
+template<typename elem_type, typename derived>
+inline
+const SpOp<derived, spop_strans>
+SpBase<elem_type,derived>::st() const
+  {
+  return SpOp<derived, spop_strans>( (*this).get_ref() );
+  }
+
+
+
+template<typename elem_type, typename derived>
+inline
+void
+SpBase<elem_type,derived>::print(const std::string extra_text) const
+  {
+  const unwrap_spmat<derived> tmp( (*this).get_ref() );
+  
+  tmp.M.impl_print(extra_text);
+  }
+
+
+
+template<typename elem_type, typename derived>
+inline
+void
+SpBase<elem_type,derived>::print(std::ostream& user_stream, const std::string extra_text) const
+  {
+  const unwrap_spmat<derived> tmp( (*this).get_ref() );
+  
+  tmp.M.impl_print(user_stream, extra_text);
+  }
+  
+
+
+template<typename elem_type, typename derived>
+inline
+void
+SpBase<elem_type,derived>::raw_print(const std::string extra_text) const
+  {
+  const unwrap_spmat<derived> tmp( (*this).get_ref() );
+  
+  tmp.M.impl_raw_print(extra_text);
+  }
+
+
+
+template<typename elem_type, typename derived>
+inline
+void
+SpBase<elem_type,derived>::raw_print(std::ostream& user_stream, const std::string extra_text) const
+  {
+  const unwrap_spmat<derived> tmp( (*this).get_ref() );
+  
+  tmp.M.impl_raw_print(user_stream, extra_text);
+  }
+
+
+
+template<typename elem_type, typename derived>
+inline
+void
+SpBase<elem_type, derived>::print_dense(const std::string extra_text) const
+  {
+  const unwrap_spmat<derived> tmp( (*this).get_ref() );
+
+  tmp.M.impl_print_dense(extra_text);
+  }
+
+
+
+template<typename elem_type, typename derived>
+inline
+void
+SpBase<elem_type, derived>::print_dense(std::ostream& user_stream, const std::string extra_text) const
+  {
+  const unwrap_spmat<derived> tmp( (*this).get_ref() );
+
+  tmp.M.impl_print_dense(user_stream, extra_text);
+  }
+
+
+
+template<typename elem_type, typename derived>
+inline
+void
+SpBase<elem_type, derived>::raw_print_dense(const std::string extra_text) const
+  {
+  const unwrap_spmat<derived> tmp( (*this).get_ref() );
+
+  tmp.M.impl_raw_print_dense(extra_text);
+  }
+
+
+
+template<typename elem_type, typename derived>
+inline
+void
+SpBase<elem_type, derived>::raw_print_dense(std::ostream& user_stream, const std::string extra_text) const
+  {
+  const unwrap_spmat<derived> tmp( (*this).get_ref() );
+
+  tmp.M.impl_raw_print_dense(user_stream, extra_text);
+  }
+
+
+
+//! @}

Added: pkg/RcppArmadillo/inst/include/armadillo_bits/SpCol_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/SpCol_bones.hpp	                        (rev 0)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/SpCol_bones.hpp	2012-08-30 22:32:20 UTC (rev 3747)
@@ -0,0 +1,81 @@
+// Copyright (C) 2011-2012 Ryan Curtin <ryan at igglybob.com>
+// Copyright (C) 2011 Matthew Amidon
+//
+// This file is part of the Armadillo C++ library.
+// It is provided without any warranty of fitness
+// for any purpose. You can redistribute this file
+// and/or modify it under the terms of the GNU
+// Lesser General Public License (LGPL) as published
+// by the Free Software Foundation, either version 3
+// of the License or (at your option) any later version.
+// (see http://www.opensource.org/licenses for more info)
+
+
+//! \addtogroup SpCol
+//! @{
+
+//! Class for sparse column vectors (matrices with only one column)
+
+template<typename eT>
+class SpCol : public SpMat<eT>
+  {
+  public:
+
+  typedef eT                                elem_type;
+  typedef typename get_pod_type<eT>::result pod_type;
+  
+  static const bool is_row = false;
+  static const bool is_col = true;
+  
+  
+  inline          SpCol();
+  inline explicit SpCol(const uword n_elem);
+  inline          SpCol(const uword in_rows, const uword in_cols);
+
+  inline                  SpCol(const char*        text);
+  inline const SpCol& operator=(const char*        text);
+
+  inline                  SpCol(const std::string& text);
+  inline const SpCol& operator=(const std::string& text);
+
+  inline const SpCol& operator=(const eT val);
+
+  template<typename T1> inline                  SpCol(const Base<eT,T1>& X);
[TRUNCATED]

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


More information about the Rcpp-commits mailing list