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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jul 2 03:51:23 CEST 2012


Author: edd
Date: 2012-07-02 03:51:23 +0200 (Mon, 02 Jul 2012)
New Revision: 3661

Modified:
   pkg/RcppArmadillo/ChangeLog
   pkg/RcppArmadillo/inst/NEWS
   pkg/RcppArmadillo/inst/doc/Makefile
   pkg/RcppArmadillo/inst/doc/RcppArmadillo-intro.Rnw
   pkg/RcppArmadillo/inst/include/armadillo_bits/Col_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_bones.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/Row_bones.hpp
Log:
Release 0.2.3.2, take two
reverted three header files which make g++-4.7 choke
added new introductory vignette


Modified: pkg/RcppArmadillo/ChangeLog
===================================================================
--- pkg/RcppArmadillo/ChangeLog	2012-07-01 13:07:13 UTC (rev 3660)
+++ pkg/RcppArmadillo/ChangeLog	2012-07-02 01:51:23 UTC (rev 3661)
@@ -1,9 +1,15 @@
-2012-06-29  Dirk Eddelbuettel  <edd at debian.org>
+2012-07-01  Dirk Eddelbuettel  <edd at debian.org>
 
 	* DESCRIPTION: Release 0.3.2.3
 
 	* inst/include/*: Upgraded to new release 3.2.3 of Armadillo
 
+	* inst/include/armadillo_bits/: Reverted files {Mat,Col,Row}_bones.hpp
+	to the previous versions due to compilation issues under g++ 4.7
+
+	* inst/doc/RcppArmadillo-intro.Rnw: New introductory vignette based
+	on just-submitted paper by Eddelbuettel and Sanderson
+
 	* DESCRIPTION: Set Maintainer: to edd at debian.org as CRAN prefers to
 	provide upload email from the same address the Maintainer field
 

Modified: pkg/RcppArmadillo/inst/NEWS
===================================================================
--- pkg/RcppArmadillo/inst/NEWS	2012-07-01 13:07:13 UTC (rev 3660)
+++ pkg/RcppArmadillo/inst/NEWS	2012-07-02 01:51:23 UTC (rev 3661)
@@ -1,10 +1,16 @@
-0.3.2.3  2012-06-29
+0.3.2.3  2012-07-01
 
     o   Upgraded to Armadillo release 3.2.3 
 
           * minor correction for declaration of fixed size vectors and
             matrices
 
+    o   Reverted three header files {Mat,Row,Col}_bones.hpp back to previous
+        release due to compilation failures under g++-4.7
+
+    o   Added new vignette 'RcppArmadillo-intro' based on a just-submitted
+        introductory paper (by Eddelbuettel and Sanderson) about RcppArmadillo 
+
     o   Change from release 3.2.2 which we skipped as it did not really affect
 	builds under R:
 

Modified: pkg/RcppArmadillo/inst/doc/Makefile
===================================================================
--- pkg/RcppArmadillo/inst/doc/Makefile	2012-07-01 13:07:13 UTC (rev 3660)
+++ pkg/RcppArmadillo/inst/doc/Makefile	2012-07-02 01:51:23 UTC (rev 3661)
@@ -23,7 +23,7 @@
 	rm -fr RcppArmadillo-unitTests.tex
 
 RcppArmadillo-intro.pdf:
-	R CMD Sweave RcppArmadillo-intro.Rnw
+	${RPROG} CMD Sweave RcppArmadillo-intro.Rnw
 	pdflatex RcppArmadillo-intro
 	bibtex RcppArmadillo-intro
 	pdflatex RcppArmadillo-intro

Modified: pkg/RcppArmadillo/inst/doc/RcppArmadillo-intro.Rnw
===================================================================
--- pkg/RcppArmadillo/inst/doc/RcppArmadillo-intro.Rnw	2012-07-01 13:07:13 UTC (rev 3660)
+++ pkg/RcppArmadillo/inst/doc/RcppArmadillo-intro.Rnw	2012-07-02 01:51:23 UTC (rev 3661)
@@ -8,7 +8,8 @@
 %\setmargrb{0.75in}{0.75in}{0.75in}{0.75in}
 \setmargrb{1in}{1in}{1in}{1in}
 
-\usepackage{ae}
+\usepackage{ae} 		% 'almost european' computer modern font
+
 \usepackage[authoryear,round,longnamesfirst]{natbib}
 \usepackage{url}                % break URLs
 \usepackage{booktabs}           % fancier tables

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Col_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Col_bones.hpp	2012-07-01 13:07:13 UTC (rev 3660)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Col_bones.hpp	2012-07-02 01:51:23 UTC (rev 3661)
@@ -109,7 +109,77 @@
   inline const_row_iterator end_row  (const uword row_num) const;
   
   
-  template<uword fixed_n_elem> class fixed;
+  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();
+    };
   
   
   protected:
@@ -126,79 +196,4 @@
 
 
 
-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/Mat_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_bones.hpp	2012-07-01 13:07:13 UTC (rev 3660)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_bones.hpp	2012-07-02 01:51:23 UTC (rev 3661)
@@ -463,11 +463,76 @@
   inline bool  empty() const;
   inline uword size()  const;
   
-  inline void steal_mem(Mat& X);  //!< don't use this unless you're writing code internal to Armadillo
+  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;
   
-  template<uword fixed_n_rows, uword fixed_n_cols> class fixed;
+    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();
+    };
   
   
+  
+  inline void steal_mem(Mat& X);  //!< don't use this unless you're writing code internal to Armadillo
+  
+  
   protected:
   
   inline void init_cold();
@@ -505,74 +570,6 @@
 
 
 
-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-07-01 13:07:13 UTC (rev 3660)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Row_bones.hpp	2012-07-02 01:51:23 UTC (rev 3661)
@@ -109,7 +109,75 @@
   inline const_row_iterator end_row  (const uword row_num) const;
   
   
-  template<uword fixed_n_elem> class fixed;
+  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();
+    };
   
   
   protected:
@@ -126,77 +194,4 @@
 
 
 
-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();
-  };
-
-
-
 //! @}



More information about the Rcpp-commits mailing list