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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Jun 30 03:51:47 CEST 2012


Author: edd
Date: 2012-06-30 03:51:46 +0200 (Sat, 30 Jun 2012)
New Revision: 3651

Modified:
   pkg/RcppArmadillo/ChangeLog
   pkg/RcppArmadillo/DESCRIPTION
   pkg/RcppArmadillo/inst/NEWS
   pkg/RcppArmadillo/inst/include/armadillo_bits/Col_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Row_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/debug.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/glue_cor_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/glue_cov_meat.hpp
Log:
Release 0.3.2.3 with Armadillo 3.2.3


Modified: pkg/RcppArmadillo/ChangeLog
===================================================================
--- pkg/RcppArmadillo/ChangeLog	2012-06-29 04:06:24 UTC (rev 3650)
+++ pkg/RcppArmadillo/ChangeLog	2012-06-30 01:51:46 UTC (rev 3651)
@@ -1,3 +1,12 @@
+2012-06-29  Dirk Eddelbuettel  <edd at debian.org>
+
+	* DESCRIPTION: Release 0.3.2.3
+
+	* inst/include/*: Upgraded to new release 3.2.3 of Armadillo
+
+	* DESCRIPTION: Set Maintainer: to edd at debian.org as CRAN prefers to
+	provide upload email from the same address the Maintainer field
+
 2012-05-26  Dirk Eddelbuettel  <edd at debian.org>
 
 	* inst/examples/fastLm.r: Also examine the 'two versus one' casts

Modified: pkg/RcppArmadillo/DESCRIPTION
===================================================================
--- pkg/RcppArmadillo/DESCRIPTION	2012-06-29 04:06:24 UTC (rev 3650)
+++ pkg/RcppArmadillo/DESCRIPTION	2012-06-30 01:51:46 UTC (rev 3651)
@@ -1,10 +1,10 @@
 Package: RcppArmadillo
 Type: Package
 Title: Rcpp integration for Armadillo templated linear algebra library
-Version: 0.3.2.0
+Version: 0.3.2.3
 Date: $Date$
 Author: Romain Francois, Dirk Eddelbuettel and Doug Bates
-Maintainer: Romain Francois, Dirk Eddelbuettel and Doug Bates <RcppArmadillo-authors at r-enthusiasts.com>
+Maintainer: Dirk Eddelbuettel <edd at debian.org>
 Description: R and Armadillo integration using Rcpp
  Armadillo is a templated C++ linear algebra library (by Conrad Sanderson)
  that aims towards a good balance between speed and ease of use. Integer,
@@ -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 3.2.0). Thus users do not need to
+ Armadillo library (currently version 3.2.3). 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-06-29 04:06:24 UTC (rev 3650)
+++ pkg/RcppArmadillo/inst/NEWS	2012-06-30 01:51:46 UTC (rev 3651)
@@ -1,5 +1,18 @@
-0.3.x.y  2012-xx-yy
+0.3.2.3  2012-06-29
 
+    o   Upgraded to Armadillo release 3.2.3 
+
+          * minor correction for declaration of fixed size vectors and
+            matrices
+
+    o   Change from release 3.2.2 which we skipped as it did not really affect
+	builds under R:
+
+          * minor fix for compiling without debugging enabled (aka release
+            mode)
+          * better detection of ATLAS during installation on Fedora and Red
+            Hat systems
+
     o   Small enhancement to fastLm 
 
 0.3.2.0  2012-05-21

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Col_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Col_bones.hpp	2012-06-29 04:06:24 UTC (rev 3650)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Col_bones.hpp	2012-06-30 01:51:46 UTC (rev 3651)
@@ -109,77 +109,7 @@
   inline const_row_iterator end_row  (const uword row_num) const;
   
   
-  template<uword fixed_n_elem>
-  class fixed : public Col<eT>
-    {
-    private:
-    
-    static const bool use_extra = (fixed_n_elem > arma_config::mat_prealloc);
-    
-    arma_aligned eT mem_local_extra[ (use_extra) ? fixed_n_elem : 1 ];
-    
-    arma_inline void change_to_row();
-    
-    
-    public:
-    
-    typedef fixed<fixed_n_elem>               Col_fixed_type;
-    
-    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;
-    
-    static const uword n_rows = fixed_n_elem;
-    static const uword n_cols = 1;
-    static const uword n_elem = fixed_n_elem;
-    
-    arma_inline fixed();
-    arma_inline fixed(const fixed<fixed_n_elem>& X);
-         inline fixed(const subview_cube<eT>& X);
-    
-    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(const eT* aux_mem);
-    
-    inline fixed(const char*        text);
-    inline fixed(const std::string& text);
-    
-    template<typename T1> inline const Col& operator=(const Base<eT,T1>& A);
-    
-    inline const Col& operator=(const eT val);
-    inline const Col& operator=(const char*        text);
-    inline const Col& operator=(const std::string& text);
-    inline const Col& operator=(const subview_cube<eT>& X);
-    
-    using Col<eT>::operator();
-    
-    #if defined(ARMA_USE_CXX11)
-    inline                fixed(const std::initializer_list<eT>& list);
-    inline const Col& operator=(const std::initializer_list<eT>& list);
-    #endif
-    
-    arma_inline arma_warn_unused eT& operator[] (const uword i);
-    arma_inline arma_warn_unused eT  operator[] (const uword i) const;
-    arma_inline arma_warn_unused eT& at         (const uword i);
-    arma_inline arma_warn_unused eT  at         (const uword i) const;
-    arma_inline arma_warn_unused eT& operator() (const uword i);
-    arma_inline arma_warn_unused eT  operator() (const uword i) const;
-    
-    arma_inline arma_warn_unused eT& at         (const uword in_row, const uword in_col);
-    arma_inline arma_warn_unused eT  at         (const uword in_row, const uword in_col) const;
-    arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col);
-    arma_inline arma_warn_unused eT  operator() (const uword in_row, const uword in_col) const;
-    
-    arma_inline arma_warn_unused       eT* memptr();
-    arma_inline arma_warn_unused const eT* memptr() const;
-    
-    arma_hot inline const Col<eT>& fill(const eT val);
-    arma_hot inline const Col<eT>& zeros();
-    arma_hot inline const Col<eT>& ones();
-    };
+  template<uword fixed_n_elem> class fixed;
   
   
   protected:
@@ -196,4 +126,79 @@
 
 
 
+template<typename eT>
+template<uword fixed_n_elem>
+class Col<eT>::fixed : public Col<eT>
+  {
+  private:
+  
+  static const bool use_extra = (fixed_n_elem > arma_config::mat_prealloc);
+  
+  arma_aligned eT mem_local_extra[ (use_extra) ? fixed_n_elem : 1 ];
+  
+  arma_inline void change_to_row();
+  
+  
+  public:
+  
+  typedef fixed<fixed_n_elem>               Col_fixed_type;
+  
+  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;
+  
+  static const uword n_rows = fixed_n_elem;
+  static const uword n_cols = 1;
+  static const uword n_elem = fixed_n_elem;
+  
+  arma_inline fixed();
+  arma_inline fixed(const fixed<fixed_n_elem>& X);
+       inline fixed(const subview_cube<eT>& X);
+  
+  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(const eT* aux_mem);
+  
+  inline fixed(const char*        text);
+  inline fixed(const std::string& text);
+  
+  template<typename T1> inline const Col& operator=(const Base<eT,T1>& A);
+  
+  inline const Col& operator=(const eT val);
+  inline const Col& operator=(const char*        text);
+  inline const Col& operator=(const std::string& text);
+  inline const Col& operator=(const subview_cube<eT>& X);
+  
+  using Col<eT>::operator();
+  
+  #if defined(ARMA_USE_CXX11)
+  inline                fixed(const std::initializer_list<eT>& list);
+  inline const Col& operator=(const std::initializer_list<eT>& list);
+  #endif
+  
+  arma_inline arma_warn_unused eT& operator[] (const uword i);
+  arma_inline arma_warn_unused eT  operator[] (const uword i) const;
+  arma_inline arma_warn_unused eT& at         (const uword i);
+  arma_inline arma_warn_unused eT  at         (const uword i) const;
+  arma_inline arma_warn_unused eT& operator() (const uword i);
+  arma_inline arma_warn_unused eT  operator() (const uword i) const;
+  
+  arma_inline arma_warn_unused eT& at         (const uword in_row, const uword in_col);
+  arma_inline arma_warn_unused eT  at         (const uword in_row, const uword in_col) const;
+  arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col);
+  arma_inline arma_warn_unused eT  operator() (const uword in_row, const uword in_col) const;
+  
+  arma_inline arma_warn_unused       eT* memptr();
+  arma_inline arma_warn_unused const eT* memptr() const;
+  
+  arma_hot inline const Col<eT>& fill(const eT val);
+  arma_hot inline const Col<eT>& zeros();
+  arma_hot inline const Col<eT>& ones();
+  };
+
+
+
 //! @}

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_bones.hpp	2012-06-29 04:06:24 UTC (rev 3650)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_bones.hpp	2012-06-30 01:51:46 UTC (rev 3651)
@@ -280,38 +280,7 @@
   inline const_slice_iterator end_slice(const uword slice_num)   const;
 
 
-  template<uword fixed_n_rows, uword fixed_n_cols, uword fixed_n_slices>
-  class fixed : public Cube<eT>
-    {
-    private:
-    
-    static const uword fixed_n_elem = fixed_n_rows * fixed_n_cols * fixed_n_slices;
-    
-    arma_aligned Mat<eT>* mat_ptrs_local_extra[ (fixed_n_slices > Cube_prealloc::mat_ptrs_size) ? fixed_n_slices : 1 ];
-    arma_aligned eT       mem_local_extra     [ (fixed_n_elem   > Cube_prealloc::mem_n_elem)    ? fixed_n_elem   : 1 ];
-    
-    arma_inline void mem_setup();
-    
-    
-    public:
-    
-    inline fixed() { mem_setup(); }
-    
-    inline const Cube& operator=(const eT val) { mem_setup(); Cube<eT>::operator=(val); return *this; }
-    
-    template<typename T1>
-    inline fixed(const BaseCube<eT,T1>& A) { mem_setup(); Cube<eT>::operator=(A.get_ref()); }
-    
-    template<typename T1>
-    inline const Cube& operator=(const BaseCube<eT,T1>& A) { Cube<eT>::operator=(A.get_ref()); return *this; }
-    
-    template<typename T1, typename T2>
-    inline explicit fixed(const BaseCube<pod_type,T1>& A, const BaseCube<pod_type,T2>& B) { mem_setup(); Cube<eT>::init(A,B); }
-    
-    
-    // using Cube<eT>::operator();
-    // TODO: overload operator(), operator[] and .at() to allow faster element access
-    };
+  template<uword fixed_n_rows, uword fixed_n_cols, uword fixed_n_slices> class fixed;
   
   
   protected:
@@ -341,6 +310,42 @@
 
 
 
+template<typename eT>
+template<uword fixed_n_rows, uword fixed_n_cols, uword fixed_n_slices>
+class Cube<eT>::fixed : public Cube<eT>
+  {
+  private:
+  
+  static const uword fixed_n_elem = fixed_n_rows * fixed_n_cols * fixed_n_slices;
+  
+  arma_aligned Mat<eT>* mat_ptrs_local_extra[ (fixed_n_slices > Cube_prealloc::mat_ptrs_size) ? fixed_n_slices : 1 ];
+  arma_aligned eT       mem_local_extra     [ (fixed_n_elem   > Cube_prealloc::mem_n_elem)    ? fixed_n_elem   : 1 ];
+  
+  arma_inline void mem_setup();
+  
+  
+  public:
+  
+  inline fixed() { mem_setup(); }
+  
+  inline const Cube& operator=(const eT val) { mem_setup(); Cube<eT>::operator=(val); return *this; }
+  
+  template<typename T1>
+  inline fixed(const BaseCube<eT,T1>& A) { mem_setup(); Cube<eT>::operator=(A.get_ref()); }
+  
+  template<typename T1>
+  inline const Cube& operator=(const BaseCube<eT,T1>& A) { Cube<eT>::operator=(A.get_ref()); return *this; }
+  
+  template<typename T1, typename T2>
+  inline explicit fixed(const BaseCube<pod_type,T1>& A, const BaseCube<pod_type,T2>& B) { mem_setup(); Cube<eT>::init(A,B); }
+  
+  
+  // using Cube<eT>::operator();
+  // TODO: overload operator(), operator[] and .at() to allow faster element access
+  };
+
+
+
 class Cube_aux
   {
   public:

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_bones.hpp	2012-06-29 04:06:24 UTC (rev 3650)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_bones.hpp	2012-06-30 01:51:46 UTC (rev 3651)
@@ -463,76 +463,11 @@
   inline bool  empty() const;
   inline uword size()  const;
   
-  template<uword fixed_n_rows, uword fixed_n_cols>
-  class fixed : public Mat<eT>
-    {
-    private:
-    
-    static const uword fixed_n_elem = fixed_n_rows * fixed_n_cols;
-    static const bool  use_extra    = (fixed_n_elem > arma_config::mat_prealloc);
-    
-    arma_aligned eT mem_local_extra[ (use_extra) ? fixed_n_elem : 1 ];
-    
-    
-    public:
-    
-    typedef fixed<fixed_n_rows, fixed_n_cols> Mat_fixed_type;
-    
-    typedef eT                                elem_type;
-    typedef typename get_pod_type<eT>::result pod_type;
-    
-    static const bool is_col = (fixed_n_cols == 1) ? true : false;
-    static const bool is_row = (fixed_n_rows == 1) ? true : false;
+  inline void steal_mem(Mat& X);  //!< don't use this unless you're writing code internal to Armadillo
   
-    static const uword n_rows = fixed_n_rows;
-    static const uword n_cols = fixed_n_cols;
-    static const uword n_elem = fixed_n_elem;
-    
-    arma_inline fixed();
-    arma_inline fixed(const fixed<fixed_n_rows, fixed_n_cols>& X);
-    
-    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(const eT* aux_mem);
-    
-    inline fixed(const char*        text);
-    inline fixed(const std::string& text);
-    
-    using Mat<eT>::operator=;
-    using Mat<eT>::operator();
-    
-    #if defined(ARMA_USE_CXX11)
-    inline                fixed(const std::initializer_list<eT>& list);
-    inline const Mat& operator=(const std::initializer_list<eT>& list);
-    #endif
-    
-    
-    arma_inline arma_warn_unused eT& operator[] (const uword i);
-    arma_inline arma_warn_unused eT  operator[] (const uword i) const;
-    arma_inline arma_warn_unused eT& at         (const uword i);
-    arma_inline arma_warn_unused eT  at         (const uword i) const;
-    arma_inline arma_warn_unused eT& operator() (const uword i);
-    arma_inline arma_warn_unused eT  operator() (const uword i) const;
-    
-    arma_inline arma_warn_unused eT& at         (const uword in_row, const uword in_col);
-    arma_inline arma_warn_unused eT  at         (const uword in_row, const uword in_col) const;
-    arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col);
-    arma_inline arma_warn_unused eT  operator() (const uword in_row, const uword in_col) const;
-    
-    arma_inline arma_warn_unused       eT* memptr();
-    arma_inline arma_warn_unused const eT* memptr() const;
-    
-    arma_hot inline const Mat<eT>& fill(const eT val);
-    arma_hot inline const Mat<eT>& zeros();
-    arma_hot inline const Mat<eT>& ones();
-    };
+  template<uword fixed_n_rows, uword fixed_n_cols> class fixed;
   
   
-  
-  inline void steal_mem(Mat& X);  //!< don't use this unless you're writing code internal to Armadillo
-  
-  
   protected:
   
   inline void init_cold();
@@ -570,6 +505,74 @@
 
 
 
+template<typename eT>
+template<uword fixed_n_rows, uword fixed_n_cols> 
+class Mat<eT>::fixed : public Mat<eT>
+  {
+  private:
+  
+  static const uword fixed_n_elem = fixed_n_rows * fixed_n_cols;
+  static const bool  use_extra    = (fixed_n_elem > arma_config::mat_prealloc);
+  
+  arma_aligned eT mem_local_extra[ (use_extra) ? fixed_n_elem : 1 ];
+  
+  
+  public:
+  
+  typedef fixed<fixed_n_rows, fixed_n_cols> Mat_fixed_type;
+  
+  typedef eT                                elem_type;
+  typedef typename get_pod_type<eT>::result pod_type;
+  
+  static const bool is_col = (fixed_n_cols == 1) ? true : false;
+  static const bool is_row = (fixed_n_rows == 1) ? true : false;
+
+  static const uword n_rows = fixed_n_rows;
+  static const uword n_cols = fixed_n_cols;
+  static const uword n_elem = fixed_n_elem;
+  
+  arma_inline fixed();
+  arma_inline fixed(const fixed<fixed_n_rows, fixed_n_cols>& X);
+  
+  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(const eT* aux_mem);
+  
+  inline fixed(const char*        text);
+  inline fixed(const std::string& text);
+  
+  using Mat<eT>::operator=;
+  using Mat<eT>::operator();
+  
+  #if defined(ARMA_USE_CXX11)
+  inline                fixed(const std::initializer_list<eT>& list);
+  inline const Mat& operator=(const std::initializer_list<eT>& list);
+  #endif
+  
+  
+  arma_inline arma_warn_unused eT& operator[] (const uword i);
+  arma_inline arma_warn_unused eT  operator[] (const uword i) const;
+  arma_inline arma_warn_unused eT& at         (const uword i);
+  arma_inline arma_warn_unused eT  at         (const uword i) const;
+  arma_inline arma_warn_unused eT& operator() (const uword i);
+  arma_inline arma_warn_unused eT  operator() (const uword i) const;
+  
+  arma_inline arma_warn_unused eT& at         (const uword in_row, const uword in_col);
+  arma_inline arma_warn_unused eT  at         (const uword in_row, const uword in_col) const;
+  arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col);
+  arma_inline arma_warn_unused eT  operator() (const uword in_row, const uword in_col) const;
+  
+  arma_inline arma_warn_unused       eT* memptr();
+  arma_inline arma_warn_unused const eT* memptr() const;
+  
+  arma_hot inline const Mat<eT>& fill(const eT val);
+  arma_hot inline const Mat<eT>& zeros();
+  arma_hot inline const Mat<eT>& ones();
+  };
+
+
+
 class Mat_aux
   {
   public:

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Row_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Row_bones.hpp	2012-06-29 04:06:24 UTC (rev 3650)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Row_bones.hpp	2012-06-30 01:51:46 UTC (rev 3651)
@@ -109,75 +109,7 @@
   inline const_row_iterator end_row  (const uword row_num) const;
   
   
-  template<uword fixed_n_elem>
-  class fixed : public Row<eT>
-    {
-    private:
-    
-    static const bool use_extra = (fixed_n_elem > arma_config::mat_prealloc);
-    
-    arma_aligned eT mem_local_extra[ (use_extra) ? fixed_n_elem : 1 ];
-    
-    
-    public:
-    
-    typedef fixed<fixed_n_elem>               Row_fixed_type;
-    
-    typedef eT                                elem_type;
-    typedef typename get_pod_type<eT>::result pod_type;
-    
-    static const bool is_col = false;
-    static const bool is_row = true;
-    
-    static const uword n_rows = 1;
-    static const uword n_cols = fixed_n_elem;
-    static const uword n_elem = fixed_n_elem;
-    
-    arma_inline fixed();
-    arma_inline fixed(const fixed<fixed_n_elem>& X);
-         inline fixed(const subview_cube<eT>& X);
-    
-    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(const eT* aux_mem);
-    
-    inline fixed(const char*        text);
-    inline fixed(const std::string& text);
-    
-    template<typename T1> inline const Row& operator=(const Base<eT,T1>& A);
-    
-    inline const Row& operator=(const eT val);
-    inline const Row& operator=(const char*        text);
-    inline const Row& operator=(const std::string& text);
-    inline const Row& operator=(const subview_cube<eT>& X);
-    
-    using Row<eT>::operator();
-    
-    #if defined(ARMA_USE_CXX11)
-    inline                fixed(const std::initializer_list<eT>& list);
-    inline const Row& operator=(const std::initializer_list<eT>& list);
-    #endif
-    
-    arma_inline arma_warn_unused eT& operator[] (const uword i);
-    arma_inline arma_warn_unused eT  operator[] (const uword i) const;
-    arma_inline arma_warn_unused eT& at         (const uword i);
-    arma_inline arma_warn_unused eT  at         (const uword i) const;
-    arma_inline arma_warn_unused eT& operator() (const uword i);
-    arma_inline arma_warn_unused eT  operator() (const uword i) const;
-    
-    arma_inline arma_warn_unused eT& at         (const uword in_row, const uword in_col);
-    arma_inline arma_warn_unused eT  at         (const uword in_row, const uword in_col) const;
-    arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col);
-    arma_inline arma_warn_unused eT  operator() (const uword in_row, const uword in_col) const;
-    
-    arma_inline arma_warn_unused       eT* memptr();
-    arma_inline arma_warn_unused const eT* memptr() const;
-    
-    arma_hot inline const Row<eT>& fill(const eT val);
-    arma_hot inline const Row<eT>& zeros();
-    arma_hot inline const Row<eT>& ones();
-    };
+  template<uword fixed_n_elem> class fixed;
   
   
   protected:
@@ -194,4 +126,77 @@
 
 
 
+template<typename eT>
+template<uword fixed_n_elem>
+class Row<eT>::fixed : public Row<eT>
+  {
+  private:
+  
+  static const bool use_extra = (fixed_n_elem > arma_config::mat_prealloc);
+  
+  arma_aligned eT mem_local_extra[ (use_extra) ? fixed_n_elem : 1 ];
+  
+  
+  public:
+  
+  typedef fixed<fixed_n_elem>               Row_fixed_type;
+  
+  typedef eT                                elem_type;
+  typedef typename get_pod_type<eT>::result pod_type;
+  
+  static const bool is_col = false;
+  static const bool is_row = true;
+  
+  static const uword n_rows = 1;
+  static const uword n_cols = fixed_n_elem;
+  static const uword n_elem = fixed_n_elem;
+  
+  arma_inline fixed();
+  arma_inline fixed(const fixed<fixed_n_elem>& X);
+       inline fixed(const subview_cube<eT>& X);
+  
+  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(const eT* aux_mem);
+  
+  inline fixed(const char*        text);
+  inline fixed(const std::string& text);
+  
+  template<typename T1> inline const Row& operator=(const Base<eT,T1>& A);
+  
+  inline const Row& operator=(const eT val);
+  inline const Row& operator=(const char*        text);
+  inline const Row& operator=(const std::string& text);
+  inline const Row& operator=(const subview_cube<eT>& X);
+  
+  using Row<eT>::operator();
+  
+  #if defined(ARMA_USE_CXX11)
+  inline                fixed(const std::initializer_list<eT>& list);
+  inline const Row& operator=(const std::initializer_list<eT>& list);
+  #endif
+  
+  arma_inline arma_warn_unused eT& operator[] (const uword i);
+  arma_inline arma_warn_unused eT  operator[] (const uword i) const;
+  arma_inline arma_warn_unused eT& at         (const uword i);
+  arma_inline arma_warn_unused eT  at         (const uword i) const;
+  arma_inline arma_warn_unused eT& operator() (const uword i);
+  arma_inline arma_warn_unused eT  operator() (const uword i) const;
+  
+  arma_inline arma_warn_unused eT& at         (const uword in_row, const uword in_col);
+  arma_inline arma_warn_unused eT  at         (const uword in_row, const uword in_col) const;
+  arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col);
+  arma_inline arma_warn_unused eT  operator() (const uword in_row, const uword in_col) const;
+  
+  arma_inline arma_warn_unused       eT* memptr();
+  arma_inline arma_warn_unused const eT* memptr() const;
+  
+  arma_hot inline const Row<eT>& fill(const eT val);
+  arma_hot inline const Row<eT>& zeros();
+  arma_hot inline const Row<eT>& ones();
+  };
+
+
+
 //! @}

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp	2012-06-29 04:06:24 UTC (rev 3650)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp	2012-06-30 01:51:46 UTC (rev 3651)
@@ -18,7 +18,7 @@
 
 #define ARMA_VERSION_MAJOR 3
 #define ARMA_VERSION_MINOR 2
-#define ARMA_VERSION_PATCH 0
+#define ARMA_VERSION_PATCH 3
 #define ARMA_VERSION_NAME  "Creamfields"
 
 

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/debug.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/debug.hpp	2012-06-29 04:06:24 UTC (rev 3650)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/debug.hpp	2012-06-30 01:51:46 UTC (rev 3651)
@@ -1099,7 +1099,7 @@
   #define arma_debug_set_error          true ? (void)0 : arma_set_error
   #define arma_debug_assert_same_size   true ? (void)0 : arma_assert_same_size
   #define arma_debug_assert_mul_size    true ? (void)0 : arma_assert_mul_size
-  #define arma_debug_assert_cube_as_mat true ? (void)0 : arma_debug_assert_cube_as_mat
+  #define arma_debug_assert_cube_as_mat true ? (void)0 : arma_assert_cube_as_mat
 
 #endif
 

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/glue_cor_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/glue_cor_meat.hpp	2012-06-29 04:06:24 UTC (rev 3650)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/glue_cor_meat.hpp	2012-06-30 01:51:46 UTC (rev 3651)
@@ -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
 // Copyright (C) 2009-2010 Dimitrios Bouzas
 // 
 // This file is part of the Armadillo C++ library.
@@ -68,7 +68,7 @@
     }
   else
     {
-    arma_debug_assert_same_size(A, B, "cor()");
+    arma_debug_assert_mul_size(A, B, true, false, "cor()");
     
     const uword N = A.n_rows;
     const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N);
@@ -135,7 +135,7 @@
     }
   else
     {
-    arma_debug_assert_same_size(A, B, "cor()");
+    arma_debug_assert_mul_size(A, B, true, false, "cor()");
     
     const uword N = A.n_rows;
     const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N);

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/glue_cov_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/glue_cov_meat.hpp	2012-06-29 04:06:24 UTC (rev 3650)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/glue_cov_meat.hpp	2012-06-30 01:51:46 UTC (rev 3651)
@@ -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
 // Copyright (C) 2009-2010 Dimitrios Bouzas
 // 
 // This file is part of the Armadillo C++ library.
@@ -57,11 +57,11 @@
     }
   else
     {
-    arma_debug_assert_same_size(A, B, "cov()");
-
+    arma_debug_assert_mul_size(A, B, true, false, "cov()");
+    
     const uword N = A.n_rows;
     const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N);
-
+    
     out = trans(A) * B;
     out -= (trans(sum(A)) * sum(B))/eT(N);
     out /= norm_val;
@@ -112,8 +112,8 @@
     }
   else
     {
-    arma_debug_assert_same_size(A, B, "cov()");
-  
+    arma_debug_assert_mul_size(A, B, true, false, "cov()");
+    
     const uword N = A.n_rows;
     const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N);
     



More information about the Rcpp-commits mailing list