[Rcpp-commits] r1395 - in pkg/RcppArmadillo: . inst/include inst/include/armadillo_bits
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jun 2 11:49:01 CEST 2010
Author: romain
Date: 2010-06-02 11:48:59 +0200 (Wed, 02 Jun 2010)
New Revision: 1395
Added:
pkg/RcppArmadillo/inst/include/armadillo_bits/arma_config.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/arma_static_assert.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/dgemm_proto.hpp.orig
pkg/RcppArmadillo/inst/include/armadillo_bits/glue_mixed_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/glue_mixed_proto.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/glue_relational_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/glue_relational_proto.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/glue_solve_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/glue_solve_proto.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/mtGlue_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/mtGlue_proto.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/mtOp_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/mtOp_proto.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/op_chol_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/op_chol_proto.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/op_cx_scalar_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/op_cx_scalar_proto.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/op_find_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/op_find_proto.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/op_misc_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/op_misc_proto.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/op_relational_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/op_relational_proto.hpp
Removed:
pkg/RcppArmadillo/inst/include/armadillo_bits/fn_find.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/static_assert.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/version.hpp
Modified:
pkg/RcppArmadillo/DESCRIPTION
pkg/RcppArmadillo/inst/include/armadillo
pkg/RcppArmadillo/inst/include/armadillo_bits/Col_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/Col_proto.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_proto.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/Op_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/Proxy.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/Row_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/Row_proto.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/eGlueCube_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/eGlue_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/eglue_cube_misc.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/eglue_misc.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/fn_accu.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/fn_chol.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/fn_kron.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_qr.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/fn_solve.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/forward_proto.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/glue_times_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_relational.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/promote_type.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/restrictors.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/traits.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/unwrap.hpp
Log:
update to armadillo 0.9.10 'Chilli Espresso'
Modified: pkg/RcppArmadillo/DESCRIPTION
===================================================================
--- pkg/RcppArmadillo/DESCRIPTION 2010-06-01 16:23:34 UTC (rev 1394)
+++ pkg/RcppArmadillo/DESCRIPTION 2010-06-02 09:48:59 UTC (rev 1395)
@@ -1,7 +1,7 @@
Package: RcppArmadillo
Type: Package
Title: Rcpp/Armadillo bridge
-Version: 0.2.1.2
+Version: 0.2.1.3
Date: $Date$
Author: Romain Francois, Dirk Eddelbuettel and Doug Bates
Maintainer: Romain, Dirk and Doug <RcppArmadillo-authors at r-enthusiasts.com>
@@ -29,6 +29,6 @@
LazyLoad: yes
Depends: R (>= 2.10.0), Rcpp (>= 0.8.0.1)
LinkingTo: Rcpp
-Suggests: inline
+Suggests: inline, RUnit
SystemRequirements: GNU make
-URL: http://arma.sourceforge.net/, http://dirk.eddelbuettel.com/code/rcpp.html, http://romainfrancois.blog.free.fr/index.php?category/R-package/RcppArmadillo
+URL: http://arma.sourceforge.net/, http://dirk.eddelbuettel.com/code/rcpp.armadillo.html, http://romainfrancois.blog.free.fr/index.php?category/R-package/RcppArmadillo
Modified: pkg/RcppArmadillo/inst/include/armadillo
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo 2010-06-01 16:23:34 UTC (rev 1394)
+++ pkg/RcppArmadillo/inst/include/armadillo 2010-06-02 09:48:59 UTC (rev 1395)
@@ -89,12 +89,13 @@
// preliminaries
#include "armadillo_bits/forward_proto.hpp"
- #include "armadillo_bits/static_assert.hpp"
+ #include "armadillo_bits/arma_static_assert.hpp"
#include "armadillo_bits/typedef.hpp"
#include "armadillo_bits/format_wrap.hpp"
#include "armadillo_bits/cmath_wrap.hpp"
#include "armadillo_bits/constants.hpp"
- #include "armadillo_bits/version.hpp"
+ #include "armadillo_bits/arma_version.hpp"
+ #include "armadillo_bits/arma_config.hpp"
#include "armadillo_bits/traits.hpp"
#include "armadillo_bits/promote_type.hpp"
#include "armadillo_bits/upgrade_val.hpp"
@@ -139,9 +140,11 @@
#include "armadillo_bits/eOp_proto.hpp"
#include "armadillo_bits/eOpCube_proto.hpp"
+ #include "armadillo_bits/mtOp_proto.hpp"
#include "armadillo_bits/Glue_proto.hpp"
#include "armadillo_bits/eGlue_proto.hpp"
+ #include "armadillo_bits/mtGlue_proto.hpp"
#include "armadillo_bits/GlueCube_proto.hpp"
#include "armadillo_bits/eGlueCube_proto.hpp"
@@ -177,15 +180,26 @@
#include "armadillo_bits/op_flip_proto.hpp"
#include "armadillo_bits/op_princomp_proto.hpp"
#include "armadillo_bits/op_princomp_cov_proto.hpp"
+ #include "armadillo_bits/op_misc_proto.hpp"
+ #include "armadillo_bits/op_relational_proto.hpp"
+ #include "armadillo_bits/op_find_proto.hpp"
+ #include "armadillo_bits/op_chol_proto.hpp"
+ #include "armadillo_bits/op_cx_scalar_proto.hpp"
#include "armadillo_bits/glue_times_proto.hpp"
+ #include "armadillo_bits/glue_mixed_proto.hpp"
#include "armadillo_bits/glue_cov_proto.hpp"
#include "armadillo_bits/glue_cor_proto.hpp"
#include "armadillo_bits/glue_kron_proto.hpp"
#include "armadillo_bits/glue_cross_proto.hpp"
#include "armadillo_bits/glue_join_proto.hpp"
+ #include "armadillo_bits/glue_relational_proto.hpp"
+ #include "armadillo_bits/glue_solve_proto.hpp"
+ // for tests & experiments
+
+
//
// debugging functions
@@ -208,6 +222,8 @@
#include "armadillo_bits/Op_meat.hpp"
#include "armadillo_bits/OpCube_meat.hpp"
+ #include "armadillo_bits/mtOp_meat.hpp"
+
#include "armadillo_bits/Glue_meat.hpp"
#include "armadillo_bits/GlueCube_meat.hpp"
@@ -218,6 +234,8 @@
#include "armadillo_bits/eGlue_meat.hpp"
#include "armadillo_bits/eGlueCube_meat.hpp"
+
+ #include "armadillo_bits/mtGlue_meat.hpp"
#include "armadillo_bits/eglue_misc.hpp"
#include "armadillo_bits/eglue_cube_misc.hpp"
@@ -305,7 +323,6 @@
#include "armadillo_bits/fn_princomp_cov.hpp"
#include "armadillo_bits/fn_cross.hpp"
#include "armadillo_bits/fn_join.hpp"
- #include "armadillo_bits/fn_find.hpp"
//
// class meat
@@ -363,13 +380,21 @@
#include "armadillo_bits/op_flip_meat.hpp"
#include "armadillo_bits/op_princomp_meat.hpp"
#include "armadillo_bits/op_princomp_cov_meat.hpp"
+ #include "armadillo_bits/op_misc_meat.hpp"
+ #include "armadillo_bits/op_relational_meat.hpp"
+ #include "armadillo_bits/op_find_meat.hpp"
+ #include "armadillo_bits/op_chol_meat.hpp"
+ #include "armadillo_bits/op_cx_scalar_meat.hpp"
#include "armadillo_bits/glue_times_meat.hpp"
+ #include "armadillo_bits/glue_mixed_meat.hpp"
#include "armadillo_bits/glue_cov_meat.hpp"
#include "armadillo_bits/glue_cor_meat.hpp"
#include "armadillo_bits/glue_kron_meat.hpp"
#include "armadillo_bits/glue_cross_meat.hpp"
#include "armadillo_bits/glue_join_meat.hpp"
+ #include "armadillo_bits/glue_relational_meat.hpp"
+ #include "armadillo_bits/glue_solve_meat.hpp"
}
#endif
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Col_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Col_meat.hpp 2010-06-01 16:23:34 UTC (rev 1394)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Col_meat.hpp 2010-06-02 09:48:59 UTC (rev 1395)
@@ -481,7 +481,7 @@
arma_extra_debug_sigprint();
Mat<eT>::operator=(X);
- arma_debug_check( (Mat<eT>::n_cols > 1), "Col::operator=(): given matrix can't be interpreted as a column vector" );
+ arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
return *this;
}
@@ -497,7 +497,7 @@
Mat<eT>::operator*=(X);
- arma_debug_check( (Mat<eT>::n_cols > 1), "Col::operator=(): incompatible dimensions" );
+ arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
return *this;
}
@@ -526,7 +526,7 @@
arma_extra_debug_sigprint();
Mat<eT>::operator=(X);
- arma_debug_check( (Mat<eT>::n_cols > 1), "Col::operator=(): given matrix can't be interpreted as a column vector" );
+ arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
return *this;
}
@@ -542,13 +542,58 @@
Mat<eT>::operator*=(X);
- arma_debug_check( (Mat<eT>::n_cols > 1), "Col::operator=(): incompatible dimensions" );
+ arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
return *this;
}
+template<typename eT>
+template<typename T1, typename op_type>
+inline
+Col<eT>::Col(const mtOp<eT, T1, op_type>& X)
+ : Mat<eT>(X)
+ {
+ arma_extra_debug_sigprint();
+
+ arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
+ }
+
+
+
+template<typename eT>
+template<typename T1, typename op_type>
+inline
+const Col<eT>&
+Col<eT>::operator=(const mtOp<eT, T1, op_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ Mat<eT>::operator=(X);
+ arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
+ return *this;
+ }
+
+
+
+template<typename eT>
+template<typename T1, typename op_type>
+inline
+const Col<eT>&
+Col<eT>::operator*=(const mtOp<eT, T1, op_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ Mat<eT>::operator*=(X);
+
+ arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
+
+ return *this;
+ }
+
+
+
//! construct a column vector from Glue, i.e. run the previously delayed operations; the result of the operations must have exactly one column
template<typename eT>
template<typename T1, typename T2, typename glue_type>
@@ -645,6 +690,53 @@
+template<typename eT>
+template<typename T1, typename T2, typename glue_type>
+inline
+Col<eT>::Col(const mtGlue<eT, T1, T2, glue_type>& X)
+ : Mat<eT>(X)
+ {
+ arma_extra_debug_sigprint();
+
+ arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
+ }
+
+
+
+template<typename eT>
+template<typename T1, typename T2, typename glue_type>
+inline
+const Col<eT>&
+Col<eT>::operator=(const mtGlue<eT, T1, T2, glue_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ Mat<eT>::operator=(X);
+
+ arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
+
+ return *this;
+ }
+
+
+
+template<typename eT>
+template<typename T1, typename T2, typename glue_type>
+inline
+const Col<eT>&
+Col<eT>::operator*=(const mtGlue<eT, T1, T2, glue_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ Mat<eT>::operator*=(X);
+
+ arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
+
+ return *this;
+ }
+
+
+
//! change the number of rows
template<typename eT>
inline
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Col_proto.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Col_proto.hpp 2010-06-01 16:23:34 UTC (rev 1394)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Col_proto.hpp 2010-06-02 09:48:59 UTC (rev 1395)
@@ -80,6 +80,10 @@
template<typename T1, typename eop_type> inline const Col& operator=(const eOp<T1, eop_type>& X);
template<typename T1, typename eop_type> inline const Col& operator*=(const eOp<T1, eop_type>& X);
+ template<typename T1, typename op_type> inline Col(const mtOp<eT, T1, op_type>& X);
+ template<typename T1, typename op_type> inline const Col& operator=(const mtOp<eT, T1, op_type>& X);
+ template<typename T1, typename op_type> inline const Col& operator*=(const mtOp<eT, T1, op_type>& X);
+
template<typename T1, typename T2, typename glue_type> inline Col(const Glue<T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Col& operator=(const Glue<T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Col& operator*=(const Glue<T1, T2, glue_type>& X);
@@ -88,6 +92,10 @@
template<typename T1, typename T2, typename eglue_type> inline const Col& operator=(const eGlue<T1, T2, eglue_type>& X);
template<typename T1, typename T2, typename eglue_type> inline const Col& operator*=(const eGlue<T1, T2, eglue_type>& X);
+ template<typename T1, typename T2, typename glue_type> inline Col(const mtGlue<eT, T1, T2, glue_type>& X);
+ template<typename T1, typename T2, typename glue_type> inline const Col& operator=(const mtGlue<eT, T1, T2, glue_type>& X);
+ template<typename T1, typename T2, typename glue_type> inline const Col& operator*=(const mtGlue<eT, T1, T2, glue_type>& X);
+
inline void set_size(const u32 n_elem);
inline void set_size(const u32 n_rows, const u32 n_cols);
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_meat.hpp 2010-06-01 16:23:34 UTC (rev 1394)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_meat.hpp 2010-06-02 09:48:59 UTC (rev 1395)
@@ -1566,6 +1566,121 @@
+//! EXPERIMENTAL
+template<typename eT>
+template<typename T1, typename op_type>
+inline
+Mat<eT>::Mat(const mtOp<eT, T1, op_type>& X)
+ : n_rows(0)
+ , n_cols(0)
+ , n_elem(0)
+ , use_aux_mem(false)
+ //, mem(0)
+ , mem(mem)
+ {
+ arma_extra_debug_sigprint_this(this);
+
+ op_type::apply(*this, X);
+ }
+
+
+
+//! EXPERIMENTAL
+template<typename eT>
+template<typename T1, typename op_type>
+inline
+const Mat<eT>&
+Mat<eT>::operator=(const mtOp<eT, T1, op_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ op_type::apply(*this, X);
+
+ return *this;
+ }
+
+
+
+//! EXPERIMENTAL
+template<typename eT>
+template<typename T1, typename op_type>
+inline
+const Mat<eT>&
+Mat<eT>::operator+=(const mtOp<eT, T1, op_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ const Mat<eT> m(X);
+
+ return (*this).operator+=(m);
+ }
+
+
+
+//! EXPERIMENTAL
+template<typename eT>
+template<typename T1, typename op_type>
+inline
+const Mat<eT>&
+Mat<eT>::operator-=(const mtOp<eT, T1, op_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ const Mat<eT> m(X);
+
+ return (*this).operator-=(m);
+ }
+
+
+
+//! EXPERIMENTAL
+template<typename eT>
+template<typename T1, typename op_type>
+inline
+const Mat<eT>&
+Mat<eT>::operator*=(const mtOp<eT, T1, op_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ const Mat<eT> m(X);
+
+ return (*this).operator*=(m);
+ }
+
+
+
+//! EXPERIMENTAL
+template<typename eT>
+template<typename T1, typename op_type>
+inline
+const Mat<eT>&
+Mat<eT>::operator%=(const mtOp<eT, T1, op_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ const Mat<eT> m(X);
+
+ return (*this).operator%=(m);
+ }
+
+
+
+//! EXPERIMENTAL
+template<typename eT>
+template<typename T1, typename op_type>
+inline
+const Mat<eT>&
+Mat<eT>::operator/=(const mtOp<eT, T1, op_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ const Mat<eT> m(X);
+
+ return (*this).operator/=(m);
+ }
+
+
+
//! create a matrix from Glue, i.e. run the previously delayed binary operations
template<typename eT>
template<typename T1, typename T2, typename glue_type>
@@ -1862,6 +1977,123 @@
+//! EXPERIMENTAL: create a matrix from mtGlue, i.e. run the previously delayed binary operations
+template<typename eT>
+template<typename T1, typename T2, typename glue_type>
+inline
+Mat<eT>::Mat(const mtGlue<eT, T1, T2, glue_type>& X)
+ : n_rows(0)
+ , n_cols(0)
+ , n_elem(0)
+ , use_aux_mem(false)
+ //, mem(0)
+ , mem(mem)
+ {
+ arma_extra_debug_sigprint_this(this);
+
+ glue_type::apply(*this, X);
+ }
+
+
+
+//! EXPERIMENTAL: create a matrix from Glue, i.e. run the previously delayed binary operations
+template<typename eT>
+template<typename T1, typename T2, typename glue_type>
+inline
+const Mat<eT>&
+Mat<eT>::operator=(const mtGlue<eT, T1, T2, glue_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ glue_type::apply(*this, X);
+
+ return *this;
+ }
+
+
+
+//! EXPERIMENTAL: in-place matrix addition, with the right-hand-side operands having delayed operations
+template<typename eT>
+template<typename T1, typename T2, typename glue_type>
+inline
+const Mat<eT>&
+Mat<eT>::operator+=(const mtGlue<eT, T1, T2, glue_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ const Mat<eT> m(X);
+
+ return (*this).operator+=(m);
+ }
+
+
+
+//! EXPERIMENTAL: in-place matrix subtraction, with the right-hand-side operands having delayed operations
+template<typename eT>
+template<typename T1, typename T2, typename glue_type>
+inline
+const Mat<eT>&
+Mat<eT>::operator-=(const mtGlue<eT, T1, T2, glue_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ const Mat<eT> m(X);
+
+ return (*this).operator-=(m);
+ }
+
+
+
+//! EXPERIMENTAL: in-place matrix multiplications, with the right-hand-side operands having delayed operations
+template<typename eT>
+template<typename T1, typename T2, typename glue_type>
+inline
+const Mat<eT>&
+Mat<eT>::operator*=(const mtGlue<eT, T1, T2, glue_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ const Mat<eT> m(X);
+
+ glue_times::apply_inplace(*this, m);
+
+ return *this;
+ }
+
+
+
+//! EXPERIMENTAL: in-place matrix element-wise multiplication, with the right-hand-side operands having delayed operations
+template<typename eT>
+template<typename T1, typename T2, typename glue_type>
+inline
+const Mat<eT>&
+Mat<eT>::operator%=(const mtGlue<eT, T1, T2, glue_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ const Mat<eT> m(X);
+
+ return (*this).operator%=(m);
+ }
+
+
+
+//! EXPERIMENTAL: in-place matrix element-wise division, with the right-hand-side operands having delayed operations
+template<typename eT>
+template<typename T1, typename T2, typename glue_type>
+inline
+const Mat<eT>&
+Mat<eT>::operator/=(const mtGlue<eT, T1, T2, glue_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ const Mat<eT> m(X);
+
+ return (*this).operator/=(m);
+ }
+
+
+
//! linear element accessor (treats the matrix as a vector); bounds checking not done when ARMA_NO_DEBUG is defined
template<typename eT>
arma_inline
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_proto.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_proto.hpp 2010-06-01 16:23:34 UTC (rev 1394)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_proto.hpp 2010-06-02 09:48:59 UTC (rev 1395)
@@ -134,6 +134,14 @@
template<typename T1, typename eop_type> inline const Mat& operator%=(const eOp<T1, eop_type>& X);
template<typename T1, typename eop_type> inline const Mat& operator/=(const eOp<T1, eop_type>& X);
+ template<typename T1, typename op_type> inline Mat(const mtOp<eT, T1, op_type>& X);
+ template<typename T1, typename op_type> inline const Mat& operator=(const mtOp<eT, T1, op_type>& X);
+ template<typename T1, typename op_type> inline const Mat& operator+=(const mtOp<eT, T1, op_type>& X);
+ template<typename T1, typename op_type> inline const Mat& operator-=(const mtOp<eT, T1, op_type>& X);
+ template<typename T1, typename op_type> inline const Mat& operator*=(const mtOp<eT, T1, op_type>& X);
+ template<typename T1, typename op_type> inline const Mat& operator%=(const mtOp<eT, T1, op_type>& X);
+ template<typename T1, typename op_type> inline const Mat& operator/=(const mtOp<eT, T1, op_type>& X);
+
template<typename T1, typename T2, typename glue_type> inline Mat(const Glue<T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Mat& operator=(const Glue<T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Mat& operator+=(const Glue<T1, T2, glue_type>& X);
@@ -153,7 +161,15 @@
template<typename T1, typename T2, typename eglue_type> inline const Mat& operator%=(const eGlue<T1, T2, eglue_type>& X);
template<typename T1, typename T2, typename eglue_type> inline const Mat& operator/=(const eGlue<T1, T2, eglue_type>& X);
+ template<typename T1, typename T2, typename glue_type> inline Mat(const mtGlue<eT, T1, T2, glue_type>& X);
+ template<typename T1, typename T2, typename glue_type> inline const Mat& operator=(const mtGlue<eT, T1, T2, glue_type>& X);
+ template<typename T1, typename T2, typename glue_type> inline const Mat& operator+=(const mtGlue<eT, T1, T2, glue_type>& X);
+ template<typename T1, typename T2, typename glue_type> inline const Mat& operator-=(const mtGlue<eT, T1, T2, glue_type>& X);
+ template<typename T1, typename T2, typename glue_type> inline const Mat& operator*=(const mtGlue<eT, T1, T2, glue_type>& X);
+ template<typename T1, typename T2, typename glue_type> inline const Mat& operator%=(const mtGlue<eT, T1, T2, glue_type>& X);
+ template<typename T1, typename T2, typename glue_type> inline const Mat& operator/=(const mtGlue<eT, T1, T2, glue_type>& X);
+
arma_inline eT& operator[] (const u32 i);
arma_inline eT operator[] (const u32 i) const;
arma_inline eT& operator() (const u32 i);
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Op_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Op_meat.hpp 2010-06-01 16:23:34 UTC (rev 1394)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Op_meat.hpp 2010-06-02 09:48:59 UTC (rev 1395)
@@ -20,6 +20,7 @@
template<typename T1, typename op_type>
+inline
Op<T1, op_type>::Op(const T1& in_m)
: m(in_m)
, aux(aux)
@@ -32,6 +33,7 @@
template<typename T1, typename op_type>
+inline
Op<T1, op_type>::Op(const T1& in_m, const typename T1::elem_type in_aux)
: m(in_m)
, aux(in_aux)
@@ -44,6 +46,7 @@
template<typename T1, typename op_type>
+inline
Op<T1, op_type>::Op(const T1& in_m, const u32 in_aux_u32_a, const u32 in_aux_u32_b)
: m(in_m)
, aux(aux)
@@ -56,6 +59,7 @@
template<typename T1, typename op_type>
+inline
Op<T1, op_type>::Op(const T1& in_m, const typename T1::elem_type in_aux, const u32 in_aux_u32_a, const u32 in_aux_u32_b)
: m(in_m)
, aux(in_aux)
@@ -68,6 +72,7 @@
template<typename T1, typename op_type>
+inline
Op<T1, op_type>::~Op()
{
arma_extra_debug_sigprint();
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Proxy.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Proxy.hpp 2010-06-01 16:23:34 UTC (rev 1394)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Proxy.hpp 2010-06-02 09:48:59 UTC (rev 1395)
@@ -330,4 +330,64 @@
+template<typename out_eT, typename T1, typename op_type>
+class Proxy< mtOp<out_eT, T1, op_type> >
+ {
+ public:
+
+ typedef out_eT elem_type;
+ typedef typename get_pod_type<out_eT>::result pod_type;
+ typedef Mat<out_eT> stored_type;
+
+ const Mat<out_eT> Q;
+
+ const u32 n_rows;
+ const u32 n_cols;
+ const u32 n_elem;
+
+ inline explicit Proxy(const mtOp<out_eT, T1, op_type>& A)
+ : Q(A)
+ , n_rows(Q.n_rows)
+ , n_cols(Q.n_cols)
+ , n_elem(Q.n_elem)
+ {
+ arma_extra_debug_sigprint();
+ }
+
+ arma_inline elem_type operator[] (const u32 i) const { return Q[i]; }
+ arma_inline elem_type at (const u32 row, const u32 col) const { return Q.at(row,col); }
+ };
+
+
+
+template<typename out_eT, typename T1, typename T2, typename glue_type>
+class Proxy< mtGlue<out_eT, T1, T2, glue_type > >
+ {
+ public:
+
+ typedef out_eT elem_type;
+ typedef typename get_pod_type<out_eT>::result pod_type;
+ typedef Mat<out_eT> stored_type;
+
+ const Mat<out_eT> Q;
+
+ const u32 n_rows;
+ const u32 n_cols;
+ const u32 n_elem;
+
+ inline explicit Proxy(const mtGlue<out_eT, T1, T2, glue_type>& A)
+ : Q(A)
+ , n_rows(Q.n_rows)
+ , n_cols(Q.n_cols)
+ , n_elem(Q.n_elem)
+ {
+ arma_extra_debug_sigprint();
+ }
+
+ arma_inline elem_type operator[] (const u32 i) const { return Q[i]; }
+ arma_inline elem_type at (const u32 row, const u32 col) const { return Q.at(row,col); }
+ };
+
+
+
//! @}
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Row_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Row_meat.hpp 2010-06-01 16:23:34 UTC (rev 1394)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Row_meat.hpp 2010-06-02 09:48:59 UTC (rev 1395)
@@ -525,6 +525,53 @@
template<typename eT>
+template<typename T1, typename op_type>
+inline
+Row<eT>::Row(const mtOp<eT, T1, op_type>& X)
+ : Mat<eT>(X)
+ {
+ arma_extra_debug_sigprint();
+
+ arma_debug_check( (Mat<eT>::n_rows > 1), "Row(): incompatible dimensions" );
+ }
+
+
+
+template<typename eT>
+template<typename T1, typename op_type>
+inline
+const Row<eT>&
+Row<eT>::operator=(const mtOp<eT, T1, op_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ Mat<eT>::operator=(X);
+
+ arma_debug_check( (Mat<eT>::n_rows > 1), "Row(): incompatible dimensions" );
+
+ return *this;
+ }
+
+
+
+template<typename eT>
+template<typename T1, typename op_type>
+inline
+const Row<eT>&
+Row<eT>::operator*=(const mtOp<eT, T1, op_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ Mat<eT>::operator*=(X);
+
+ arma_debug_check( (Mat<eT>::n_rows > 1), "Row(): incompatible dimensions" );
+
+ return *this;
+ }
+
+
+
+template<typename eT>
template<typename T1, typename T2, typename glue_type>
inline
Row<eT>::Row(const Glue<T1, T2, glue_type>& X)
@@ -619,7 +666,54 @@
template<typename eT>
+template<typename T1, typename T2, typename glue_type>
inline
+Row<eT>::Row(const mtGlue<eT, T1, T2, glue_type>& X)
+ : Mat<eT>(X)
+ {
+ arma_extra_debug_sigprint();
+
+ arma_debug_check( (Mat<eT>::n_rows > 1), "Row(): incompatible dimensions" );
+ }
+
+
+
+template<typename eT>
+template<typename T1, typename T2, typename glue_type>
+inline
+const Row<eT>&
+Row<eT>::operator=(const mtGlue<eT, T1, T2, glue_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ Mat<eT>::operator=(X);
+
+ arma_debug_check( (Mat<eT>::n_rows > 1), "Row(): incompatible dimensions" );
+
+ return *this;
+ }
+
+
+
+template<typename eT>
+template<typename T1, typename T2, typename glue_type>
+inline
+const Row<eT>&
+Row<eT>::operator*=(const mtGlue<eT, T1, T2, glue_type>& X)
+ {
+ arma_extra_debug_sigprint();
+
+ Mat<eT>::operator*=(X);
+
+ arma_debug_check( (Mat<eT>::n_rows > 1), "Row(): incompatible dimensions" );
+
+ return *this;
+ }
+
+
+
+template<typename eT>
+inline
void
Row<eT>::set_size(const u32 in_n_elem)
{
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Row_proto.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Row_proto.hpp 2010-06-01 16:23:34 UTC (rev 1394)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Row_proto.hpp 2010-06-02 09:48:59 UTC (rev 1395)
@@ -73,22 +73,30 @@
arma_inline subview_row<eT> cols(const u32 in_col1, const u32 in_col2);
arma_inline const subview_row<eT> cols(const u32 in_col1, const u32 in_col2) const;
- template<typename T1, typename op_type> inline Row(const Op<T1, op_type> &X);
- template<typename T1, typename op_type> inline const Row& operator=(const Op<T1, op_type> &X);
- template<typename T1, typename op_type> inline const Row& operator*=(const Op<T1, op_type> &X);
+ template<typename T1, typename op_type> inline Row(const Op<T1, op_type>& X);
+ template<typename T1, typename op_type> inline const Row& operator=(const Op<T1, op_type>& X);
+ template<typename T1, typename op_type> inline const Row& operator*=(const Op<T1, op_type>& X);
- template<typename T1, typename eop_type> inline Row(const eOp<T1, eop_type> &X);
- template<typename T1, typename eop_type> inline const Row& operator=(const eOp<T1, eop_type> &X);
- template<typename T1, typename eop_type> inline const Row& operator*=(const eOp<T1, eop_type> &X);
+ template<typename T1, typename eop_type> inline Row(const eOp<T1, eop_type>& X);
+ template<typename T1, typename eop_type> inline const Row& operator=(const eOp<T1, eop_type>& X);
+ template<typename T1, typename eop_type> inline const Row& operator*=(const eOp<T1, eop_type>& X);
- template<typename T1, typename T2, typename glue_type> inline Row(const Glue<T1, T2, glue_type> &X);
- template<typename T1, typename T2, typename glue_type> inline const Row& operator=(const Glue<T1, T2, glue_type> &X);
- template<typename T1, typename T2, typename glue_type> inline const Row& operator*=(const Glue<T1, T2, glue_type> &X);
+ template<typename T1, typename op_type> inline Row(const mtOp<eT, T1, op_type>& X);
+ template<typename T1, typename op_type> inline const Row& operator=(const mtOp<eT, T1, op_type>& X);
+ template<typename T1, typename op_type> inline const Row& operator*=(const mtOp<eT, T1, op_type>& X);
- template<typename T1, typename T2, typename eglue_type> inline Row(const eGlue<T1, T2, eglue_type> &X);
- template<typename T1, typename T2, typename eglue_type> inline const Row& operator=(const eGlue<T1, T2, eglue_type> &X);
- template<typename T1, typename T2, typename eglue_type> inline const Row& operator*=(const eGlue<T1, T2, eglue_type> &X);
+ template<typename T1, typename T2, typename glue_type> inline Row(const Glue<T1, T2, glue_type>& X);
+ template<typename T1, typename T2, typename glue_type> inline const Row& operator=(const Glue<T1, T2, glue_type>& X);
+ template<typename T1, typename T2, typename glue_type> inline const Row& operator*=(const Glue<T1, T2, glue_type>& X);
+ template<typename T1, typename T2, typename eglue_type> inline Row(const eGlue<T1, T2, eglue_type>& X);
+ template<typename T1, typename T2, typename eglue_type> inline const Row& operator=(const eGlue<T1, T2, eglue_type>& X);
+ template<typename T1, typename T2, typename eglue_type> inline const Row& operator*=(const eGlue<T1, T2, eglue_type>& X);
+
+ template<typename T1, typename T2, typename glue_type> inline Row(const mtGlue<eT, T1, T2, glue_type>& X);
+ template<typename T1, typename T2, typename glue_type> inline const Row& operator=(const mtGlue<eT, T1, T2, glue_type>& X);
+ template<typename T1, typename T2, typename glue_type> inline const Row& operator*=(const mtGlue<eT, T1, T2, glue_type>& X);
+
inline void set_size(const u32 N);
inline void set_size(const u32 n_rows, const u32 n_cols);
Added: pkg/RcppArmadillo/inst/include/armadillo_bits/arma_config.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/arma_config.hpp (rev 0)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/arma_config.hpp 2010-06-02 09:48:59 UTC (rev 1395)
@@ -0,0 +1,82 @@
+// Copyright (C) 2010 NICTA and the authors listed below
+// http://nicta.com.au
+//
+// Authors:
+// - Conrad Sanderson (conradsand at ieee dot org)
+//
+// 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 arma_config
+//! @{
+
+
+
+struct arma_config
+ {
+ #if defined(ARMA_USE_ATLAS)
+ static const bool atlas = true;
+ #else
+ static const bool atlas = false;
+ #endif
+
+
+ #if defined(ARMA_USE_LAPACK)
+ static const bool lapack = true;
+ #else
+ static const bool lapack = false;
+ #endif
+
+
+ #if defined(ARMA_USE_BLAS)
+ static const bool blas = true;
+ #else
+ static const bool blas = false;
+ #endif
+
+
+ #if defined(ARMA_USE_BOOST)
+ static const bool boost = true;
+ #else
+ static const bool boost = false;
+ #endif
+
+
+ #if defined(ARMA_USE_BOOST_DATE)
+ static const bool boost_date = true;
+ #else
+ static const bool boost_date = false;
+ #endif
+
+
+ #if !defined(ARMA_NO_DEBUG) && !defined(NDEBUG)
+ static const bool debug = true;
+ #else
+ static const bool debug = false;
+ #endif
+
+
+ #if defined(ARMA_EXTRA_DEBUG)
+ static const bool extra_debug = true;
+ #else
+ static const bool extra_debug = false;
+ #endif
+
+
+ #if defined(ARMA_GOOD_COMPILER)
+ static const bool good_comp = true;
+ #else
+ static const bool good_comp = false;
+ #endif
+ };
+
+
+
+//! @}
Added: pkg/RcppArmadillo/inst/include/armadillo_bits/arma_static_assert.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/arma_static_assert.hpp (rev 0)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/arma_static_assert.hpp 2010-06-02 09:48:59 UTC (rev 1395)
@@ -0,0 +1,39 @@
+// Copyright (C) 2010 NICTA and the authors listed below
+// http://nicta.com.au
+//
+// Authors:
+// - Conrad Sanderson (conradsand at ieee dot org)
+//
+// 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 arma_static_assert
+//! @{
+
+
+
+//! Classes for primitive compile time assertions (until the next version of C++)
+template<bool> struct arma_static_assert;
+template<> struct arma_static_assert<true> {};
+
+
+template<bool val>
+struct arma_type_check
+ {
+ arma_inline static void apply()
+ {
+ arma_static_assert<!val> ERROR___INCORRECT_TYPE;
+ ERROR___INCORRECT_TYPE = ERROR___INCORRECT_TYPE;
+ }
+ };
+
+
+
+//! @}
Added: pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp (rev 0)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp 2010-06-02 09:48:59 UTC (rev 1395)
@@ -0,0 +1,42 @@
+// Copyright (C) 2010 NICTA and the authors listed below
+// http://nicta.com.au
+//
+// Authors:
+// - Conrad Sanderson (conradsand at ieee dot org)
+//
+// 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 arma_version
+//! @{
+
+
+
+struct arma_version
+ {
+ static const unsigned int major = 0;
+ static const unsigned int minor = 9;
+ static const unsigned int patch = 10;
+
+ static
+ inline
+ std::string
+ as_string()
+ {
+ std::stringstream ss;
+ ss << arma_version::major << '.' << arma_version::minor << '.' << arma_version::patch;
+
+ return ss.str();
+ }
+ };
+
+
+
+//! @}
Added: pkg/RcppArmadillo/inst/include/armadillo_bits/dgemm_proto.hpp.orig
===================================================================
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/rcpp -r 1395
More information about the Rcpp-commits
mailing list