[Rcpp-commits] r2049 - in pkg/RcppArmadillo/inst/include: . armadillo_bits
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Aug 20 14:49:19 CEST 2010
Author: romain
Date: 2010-08-20 14:49:18 +0200 (Fri, 20 Aug 2010)
New Revision: 2049
Added:
pkg/RcppArmadillo/inst/include/armadillo_bits/span.hpp
Modified:
pkg/RcppArmadillo/inst/include/RcppArmadilloForward.h
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/Cube_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_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/Row_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/Row_proto.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/arma_config.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/debug.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/field_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/field_proto.hpp
Log:
switch to svn version of armadillo, for testing purposes
Modified: pkg/RcppArmadillo/inst/include/RcppArmadilloForward.h
===================================================================
--- pkg/RcppArmadillo/inst/include/RcppArmadilloForward.h 2010-08-20 12:33:52 UTC (rev 2048)
+++ pkg/RcppArmadillo/inst/include/RcppArmadilloForward.h 2010-08-20 12:49:18 UTC (rev 2049)
@@ -26,12 +26,12 @@
#include <Rconfig.h>
#include <RcppArmadilloConfig.h>
-#define ARMA_EXTRA_MAT_PROTO "RcppArmadillo/Mat_proto.h"
-#define ARMA_EXTRA_MAT_MEAT "RcppArmadillo/Mat_meat.h"
-#define ARMA_EXTRA_COL_PROTO "RcppArmadillo/Col_proto.h"
-#define ARMA_EXTRA_COL_MEAT "RcppArmadillo/Col_meat.h"
-#define ARMA_EXTRA_ROW_PROTO "RcppArmadillo/Row_proto.h"
-#define ARMA_EXTRA_ROW_MEAT "RcppArmadillo/Row_meat.h"
+#define ARMA_EXTRA_MAT_PROTO RcppArmadillo/Mat_proto.h
+#define ARMA_EXTRA_MAT_MEAT RcppArmadillo/Mat_meat.h
+#define ARMA_EXTRA_COL_PROTO RcppArmadillo/Col_proto.h
+#define ARMA_EXTRA_COL_MEAT RcppArmadillo/Col_meat.h
+#define ARMA_EXTRA_ROW_PROTO RcppArmadillo/Row_proto.h
+#define ARMA_EXTRA_ROW_MEAT RcppArmadillo/Row_meat.h
#include <armadillo>
Modified: pkg/RcppArmadillo/inst/include/armadillo
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo 2010-08-20 12:33:52 UTC (rev 2048)
+++ pkg/RcppArmadillo/inst/include/armadillo 2010-08-20 12:49:18 UTC (rev 2049)
@@ -32,6 +32,7 @@
#include <complex>
#include <vector>
+
#include "armadillo_bits/config.hpp"
#include "armadillo_bits/compiler_setup.hpp"
@@ -67,8 +68,10 @@
#endif
+#define ARMA_INCFILE_WRAP(x) <x>
+
+
#if defined(ARMA_USE_ATLAS)
-
#if !defined(ARMA_ATLAS_INCLUDE_DIR)
extern "C"
{
@@ -76,26 +79,23 @@
#include <clapack.h>
}
#else
-
#define ARMA_STR1(x) x
#define ARMA_STR2(x) ARMA_STR1(x)
- #define ARMA_STR3(x) <x>
-
+
#define ARMA_CBLAS ARMA_STR2(ARMA_ATLAS_INCLUDE_DIR)ARMA_STR2(cblas.h)
#define ARMA_CLAPACK ARMA_STR2(ARMA_ATLAS_INCLUDE_DIR)ARMA_STR2(clapack.h)
-
+
extern "C"
{
- #include ARMA_STR3(ARMA_CBLAS)
- #include ARMA_STR3(ARMA_CLAPACK)
+ #include ARMA_INCFILE_WRAP(ARMA_CBLAS)
+ #include ARMA_INCFILE_WRAP(ARMA_CLAPACK)
}
-
+
#undef ARMA_STR1
#undef ARMA_STR2
- #undef ARMA_STR3
#undef ARMA_CBLAS
#undef ARMA_CLAPACK
- #endif
+ #endif
#endif
@@ -120,6 +120,7 @@
#include "armadillo_bits/upgrade_val.hpp"
#include "armadillo_bits/restrictors.hpp"
#include "armadillo_bits/access.hpp"
+ #include "armadillo_bits/span.hpp"
//
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Col_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Col_meat.hpp 2010-08-20 12:33:52 UTC (rev 2048)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Col_meat.hpp 2010-08-20 12:49:18 UTC (rev 2049)
@@ -996,8 +996,11 @@
}
+
#ifdef ARMA_EXTRA_COL_MEAT
-#include ARMA_EXTRA_COL_MEAT
+ #include ARMA_INCFILE_WRAP(ARMA_EXTRA_COL_MEAT)
#endif
+
+
//! @}
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Col_proto.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Col_proto.hpp 2010-08-20 12:33:52 UTC (rev 2048)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Col_proto.hpp 2010-08-20 12:49:18 UTC (rev 2049)
@@ -98,10 +98,6 @@
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);
-#ifdef ARMA_EXTRA_COL_PROTO
-#include ARMA_EXTRA_COL_PROTO
-#endif
-
inline void set_size(const u32 n_elem);
inline void set_size(const u32 n_rows, const u32 n_cols);
inline void reshape(const u32 n_rows, const u32 n_cols, const u32 dim = 0);
@@ -133,6 +129,12 @@
inline row_iterator end_row (const u32 row_num);
inline const_row_iterator end_row (const u32 row_num) const;
+
+
+ #ifdef ARMA_EXTRA_COL_PROTO
+ #include ARMA_INCFILE_WRAP(ARMA_EXTRA_COL_PROTO)
+ #endif
+
};
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_meat.hpp 2010-08-20 12:33:52 UTC (rev 2048)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_meat.hpp 2010-08-20 12:49:18 UTC (rev 2049)
@@ -98,19 +98,29 @@
arma_extra_debug_sigprint( arma_boost::format("in_n_rows = %d, in_n_cols = %d, in_n_slices = %d") % in_n_rows % in_n_cols % in_n_slices );
const u32 new_n_elem = in_n_rows * in_n_cols * in_n_slices;
-
+
if(n_elem == new_n_elem)
{
if( (n_rows != in_n_rows) || (n_cols != in_n_cols) || (n_slices != in_n_slices) )
{
delete_mat();
-
- access::rw(n_rows) = in_n_rows;
- access::rw(n_cols) = in_n_cols;
- access::rw(n_elem_slice) = in_n_rows*in_n_cols;
- access::rw(n_slices) = in_n_slices;
-
- create_mat();
+
+ if(new_n_elem > 0)
+ {
+ access::rw(n_rows) = in_n_rows;
+ access::rw(n_cols) = in_n_cols;
+ access::rw(n_elem_slice) = in_n_rows*in_n_cols;
+ access::rw(n_slices) = in_n_slices;
+
+ create_mat();
+ }
+ else
+ {
+ access::rw(n_rows) = 0;
+ access::rw(n_cols) = 0;
+ access::rw(n_elem_slice) = 0;
+ access::rw(n_slices) = 0;
+ }
}
}
else
@@ -118,11 +128,11 @@
arma_debug_check
(
(use_aux_mem == true),
- "Cube::init(): can't change the amount of memory as auxiliary memory is in use"
+ "Cube::init(): can't change the size as auxiliary memory is in use"
);
-
+
delete_mat();
-
+
if(n_elem > sizeof(mem_local)/sizeof(eT) )
{
delete [] mem;
@@ -138,24 +148,24 @@
arma_check( (mem == 0), "Cube::init(): out of memory" );
}
- access::rw(n_elem) = new_n_elem;
-
- if(new_n_elem == 0)
+ if(new_n_elem > 0)
{
+ access::rw(n_elem) = new_n_elem;
+ access::rw(n_rows) = in_n_rows;
+ access::rw(n_cols) = in_n_cols;
+ access::rw(n_elem_slice) = in_n_rows*in_n_cols;
+ access::rw(n_slices) = in_n_slices;
+
+ create_mat();
+ }
+ else
+ {
+ access::rw(n_elem) = 0;
access::rw(n_rows) = 0;
access::rw(n_cols) = 0;
access::rw(n_elem_slice) = 0;
access::rw(n_slices) = 0;
}
- else
- {
- access::rw(n_rows) = in_n_rows;
- access::rw(n_cols) = in_n_cols;
- access::rw(n_elem_slice) = in_n_rows*in_n_cols;
- access::rw(n_slices) = in_n_slices;
- }
-
- create_mat();
}
}
@@ -829,6 +839,64 @@
+//! creation of subview_cube (generic subcube)
+template<typename eT>
+arma_inline
+subview_cube<eT>
+Cube<eT>::subcube(const span& row_span, const span& col_span, const span& slice_span)
+ {
+ arma_extra_debug_sigprint();
+
+ const u32 in_row1 = row_span.a;
+ const u32 in_row2 = row_span.b;
+
+ const u32 in_col1 = col_span.a;
+ const u32 in_col2 = col_span.b;
+
+ const u32 in_slice1 = slice_span.a;
+ const u32 in_slice2 = slice_span.b;
+
+ arma_debug_check
+ (
+ (in_row1 > in_row2) || (in_col1 > in_col2) || (in_slice1 > in_slice2) ||
+ (in_row2 >= n_rows) || (in_col2 >= n_cols) || (in_slice2 >= n_slices),
+ "Cube::subcube(): indices out of bounds or incorrectly used"
+ );
+
+ return subview_cube<eT>(*this, in_row1, in_col1, in_slice1, in_row2, in_col2, in_slice2);
+ }
+
+
+
+//! creation of subview_cube (generic subcube)
+template<typename eT>
+arma_inline
+const subview_cube<eT>
+Cube<eT>::subcube(const span& row_span, const span& col_span, const span& slice_span) const
+ {
+ arma_extra_debug_sigprint();
+
+ const u32 in_row1 = row_span.a;
+ const u32 in_row2 = row_span.b;
+
+ const u32 in_col1 = col_span.a;
+ const u32 in_col2 = col_span.b;
+
+ const u32 in_slice1 = slice_span.a;
+ const u32 in_slice2 = slice_span.b;
+
+ arma_debug_check
+ (
+ (in_row1 > in_row2) || (in_col1 > in_col2) || (in_slice1 > in_slice2) ||
+ (in_row2 >= n_rows) || (in_col2 >= n_cols) || (in_slice2 >= n_slices),
+ "Cube::subcube(): indices out of bounds or incorrectly used"
+ );
+
+ return subview_cube<eT>(*this, in_row1, in_col1, in_slice1, in_row2, in_col2, in_slice2);
+ }
+
+
+
//! create a cube from OpCube, i.e. run the previously delayed unary operations
template<typename eT>
template<typename T1, typename op_type>
@@ -2233,8 +2301,11 @@
}
+
#ifdef ARMA_EXTRA_CUBE_MEAT
-#include ARMA_EXTRA_CUBE_MEAT
+ #include ARMA_INCFILE_WRAP(ARMA_EXTRA_CUBE_MEAT)
#endif
+
+
//! @}
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_proto.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_proto.hpp 2010-08-20 12:33:52 UTC (rev 2048)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_proto.hpp 2010-08-20 12:49:18 UTC (rev 2049)
@@ -83,8 +83,10 @@
arma_inline subview_cube<eT> subcube(const u32 in_row1, const u32 in_col1, const u32 in_slice1, const u32 in_row2, const u32 in_col2, const u32 in_slice2);
arma_inline const subview_cube<eT> subcube(const u32 in_row1, const u32 in_col1, const u32 in_slice1, const u32 in_row2, const u32 in_col2, const u32 in_slice2) const;
-
-
+
+ arma_inline subview_cube<eT> subcube(const span& row_span, const span& col_span, const span& slice_span);
+ arma_inline const subview_cube<eT> subcube(const span& row_span, const span& col_span, const span& slice_span) const;
+
template<typename T1, typename op_type> inline Cube(const OpCube<T1, op_type>& X);
template<typename T1, typename op_type> inline const Cube& operator=(const OpCube<T1, op_type>& X);
template<typename T1, typename op_type> inline const Cube& operator+=(const OpCube<T1, op_type>& X);
@@ -113,10 +115,7 @@
template<typename T1, typename T2, typename eglue_type> inline const Cube& operator%=(const eGlueCube<T1, T2, eglue_type>& X);
template<typename T1, typename T2, typename eglue_type> inline const Cube& operator/=(const eGlueCube<T1, T2, eglue_type>& X);
-#ifdef ARMA_EXTRA_CUBE_PROTO
-#include ARMA_EXTRA_CUBE_PROTO
-#endif
-
+
arma_inline eT& operator[] (const u32 i);
arma_inline eT operator[] (const u32 i) const;
arma_inline eT& operator() (const u32 i);
@@ -198,6 +197,11 @@
inline slice_iterator end_slice(const u32 slice_num);
inline const_slice_iterator end_slice(const u32 slice_num) const;
+
+
+ #ifdef ARMA_EXTRA_CUBE_PROTO
+ #include ARMA_INCFILE_WRAP(ARMA_EXTRA_CUBE_PROTO)
+ #endif
protected:
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_meat.hpp 2010-08-20 12:33:52 UTC (rev 2048)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_meat.hpp 2010-08-20 12:49:18 UTC (rev 2049)
@@ -87,7 +87,7 @@
arma_extra_debug_sigprint( arma_boost::format("in_n_rows = %d, in_n_cols = %d") % in_n_rows % in_n_cols );
const u32 new_n_elem = in_n_rows * in_n_cols;
-
+
if(n_elem == new_n_elem)
{
access::rw(n_rows) = in_n_rows;
@@ -98,9 +98,9 @@
arma_debug_check
(
(use_aux_mem == true),
- "Mat::init(): can't change the amount of memory as auxiliary memory is in use"
+ "Mat::init(): can't change the size as auxiliary memory is in use"
);
-
+
if(n_elem > sizeof(mem_local)/sizeof(eT) )
{
delete [] mem;
@@ -117,19 +117,15 @@
}
access::rw(n_elem) = new_n_elem;
-
- if(new_n_elem == 0)
- {
- access::rw(n_rows) = 0;
- access::rw(n_cols) = 0;
- }
- else
- {
- access::rw(n_rows) = in_n_rows;
- access::rw(n_cols) = in_n_cols;
- }
-
+ access::rw(n_rows) = in_n_rows;
+ access::rw(n_cols) = in_n_cols;
}
+
+ if(new_n_elem == 0)
+ {
+ access::rw(n_rows) = 0;
+ access::rw(n_cols) = 0;
+ }
}
@@ -1229,6 +1225,56 @@
+//! creation of subview (submatrix)
+template<typename eT>
+arma_inline
+subview<eT>
+Mat<eT>::submat(const span& row_span, const span& col_span)
+ {
+ arma_extra_debug_sigprint();
+
+ const u32 in_row1 = row_span.a;
+ const u32 in_row2 = row_span.b;
+
+ const u32 in_col1 = col_span.a;
+ const u32 in_col2 = col_span.b;
+
+ arma_debug_check
+ (
+ (in_row1 > in_row2) || (in_col1 > in_col2) || (in_row2 >= n_rows) || (in_col2 >= n_cols),
+ "Mat::submat(): indices out of bounds or incorrectly used"
+ );
+
+ return subview<eT>(*this, in_row1, in_col1, in_row2, in_col2);
+ }
+
+
+
+//! creation of subview (generic submatrix)
+template<typename eT>
+arma_inline
+const subview<eT>
+Mat<eT>::submat(const span& row_span, const span& col_span) const
+ {
+ arma_extra_debug_sigprint();
+
+ const u32 in_row1 = row_span.a;
+ const u32 in_row2 = row_span.b;
+
+ const u32 in_col1 = col_span.a;
+ const u32 in_col2 = col_span.b;
+
+ arma_debug_check
+ (
+ (in_row1 > in_row2) || (in_col1 > in_col2) || (in_row2 >= n_rows) || (in_col2 >= n_cols),
+ "Mat::submat(): indices out of bounds or incorrectly used"
+ );
+
+ return subview<eT>(*this, in_row1, in_col1, in_row2, in_col2);
+ }
+
+
+
//! creation of diagview (diagonal)
template<typename eT>
arma_inline
@@ -2292,6 +2338,17 @@
+//! returns true if the matrix has no elements
+template<typename eT>
+arma_inline
+bool
+Mat<eT>::is_empty() const
+ {
+ return (n_elem == 0);
+ }
+
+
+
//! returns a pointer to array of eTs for a specified column; no bounds check
template<typename eT>
arma_inline
@@ -3416,9 +3473,11 @@
}
+
#ifdef ARMA_EXTRA_MAT_MEAT
-#include ARMA_EXTRA_MAT_MEAT
+ #include ARMA_INCFILE_WRAP(ARMA_EXTRA_MAT_MEAT)
#endif
+
//! @}
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_proto.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_proto.hpp 2010-08-20 12:33:52 UTC (rev 2048)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_proto.hpp 2010-08-20 12:49:18 UTC (rev 2049)
@@ -116,7 +116,10 @@
arma_inline subview<eT> submat(const u32 in_row1, const u32 in_col1, const u32 in_row2, const u32 in_col2);
arma_inline const subview<eT> submat(const u32 in_row1, const u32 in_col1, const u32 in_row2, const u32 in_col2) const;
-
+
+ arma_inline subview<eT> submat(const span& row_span, const span& col_span);
+ arma_inline const subview<eT> submat(const span& row_span, const span& col_span) const;
+
arma_inline diagview<eT> diag(const s32 in_id = 0);
arma_inline const diagview<eT> diag(const s32 in_id = 0) const;
@@ -174,10 +177,6 @@
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);
-#ifdef ARMA_EXTRA_MAT_PROTO
-#include ARMA_EXTRA_MAT_PROTO
-#endif
-
arma_inline eT& operator[] (const u32 i);
arma_inline eT operator[] (const u32 i) const;
arma_inline eT& operator() (const u32 i);
@@ -194,9 +193,10 @@
arma_inline const Mat& operator--();
arma_inline void operator--(int);
- arma_inline bool is_vec() const;
+ arma_inline bool is_vec() const;
arma_inline bool is_square() const;
arma_inline bool is_finite() const;
+ arma_inline bool is_empty() const;
arma_inline eT* colptr(const u32 in_col);
arma_inline const eT* colptr(const u32 in_col) const;
@@ -216,12 +216,14 @@
inline void raw_print_trans(const std::string extra_text = "") const;
inline void raw_print_trans(std::ostream& user_stream, const std::string extra_text = "") const;
+
template<typename eT2>
inline void copy_size(const Mat<eT2>& m);
inline void set_size(const u32 in_rows, const u32 in_cols);
inline void reshape(const u32 in_rows, const u32 in_cols, const u32 dim = 0);
+
arma_hot inline void fill(const eT val);
inline void zeros();
@@ -246,8 +248,11 @@
inline bool quiet_load( std::istream& is, const file_type type = auto_detect);
- // iterators
+ // for container-like functionality
+ typedef eT value_type;
+ typedef u32 size_type;
+
typedef eT* iterator;
typedef const eT* const_iterator;
@@ -318,7 +323,17 @@
inline row_iterator end_row (const u32 row_num);
inline const_row_iterator end_row (const u32 row_num) const;
+ // inline void clear();
+ // inline void resize(const u32 in_n_elem);
+ // arma_inline bool empty() const;
+ // arma_inline u32 size() const;
+
+ #ifdef ARMA_EXTRA_MAT_PROTO
+ #include ARMA_INCFILE_WRAP(ARMA_EXTRA_MAT_PROTO)
+ #endif
+
+
protected:
inline void init(const u32 in_rows, const u32 in_cols);
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Row_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Row_meat.hpp 2010-08-20 12:33:52 UTC (rev 2048)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Row_meat.hpp 2010-08-20 12:49:18 UTC (rev 2049)
@@ -967,9 +967,12 @@
return Mat<eT>::memptr() + Mat<eT>::n_cols;
}
+
+
#ifdef ARMA_EXTRA_ROW_MEAT
-#include ARMA_EXTRA_ROW_MEAT
+ #include ARMA_INCFILE_WRAP(ARMA_EXTRA_ROW_MEAT)
#endif
+
//! @}
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Row_proto.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Row_proto.hpp 2010-08-20 12:33:52 UTC (rev 2048)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Row_proto.hpp 2010-08-20 12:49:18 UTC (rev 2049)
@@ -99,9 +99,6 @@
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);
-#ifdef ARMA_EXTRA_ROW_PROTO
-#include ARMA_EXTRA_ROW_PROTO
-#endif
inline void set_size(const u32 N);
inline void set_size(const u32 n_rows, const u32 n_cols);
@@ -134,6 +131,12 @@
inline row_iterator end_row (const u32 row_num);
inline const_row_iterator end_row (const u32 row_num) const;
+
+
+ #ifdef ARMA_EXTRA_ROW_PROTO
+ #include ARMA_INCFILE_WRAP(ARMA_EXTRA_ROW_PROTO)
+ #endif
+
};
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/arma_config.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/arma_config.hpp 2010-08-20 12:33:52 UTC (rev 2048)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/arma_config.hpp 2010-08-20 12:49:18 UTC (rev 2049)
@@ -75,6 +75,19 @@
#else
static const bool good_comp = false;
#endif
+
+
+ #if ( \
+ defined(ARMA_EXTRA_MAT_PROTO) || defined(ARMA_EXTRA_MAT_MEAT) \
+ || defined(ARMA_EXTRA_COL_PROTO) || defined(ARMA_EXTRA_COL_MEAT) \
+ || defined(ARMA_EXTRA_ROW_PROTO) || defined(ARMA_EXTRA_ROW_MEAT) \
+ || defined(ARMA_EXTRA_CUBE_PROTO) || defined(ARMA_EXTRA_CUBE_MEAT) \
+ || defined(ARMA_EXTRA_FIELD_PROTO) || defined(ARMA_EXTRA_FIELD_MEAT) \
+ )
+ static const bool extra_code = true;
+ #else
+ static const bool extra_code = false;
+ #endif
};
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp 2010-08-20 12:33:52 UTC (rev 2048)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp 2010-08-20 12:49:18 UTC (rev 2049)
@@ -21,9 +21,8 @@
#define ARMA_VERSION_MAJOR 0
#define ARMA_VERSION_MINOR 9
-#define ARMA_VERSION_PATCH 60
-#define ARMA_VERSION_NAME "Killer Bush Turkey"
-// http://en.wikipedia.org/wiki/Australian_Brush-turkey
+#define ARMA_VERSION_PATCH 61
+#define ARMA_VERSION_NAME "Subtropical Winter Safari (devel)"
struct arma_version
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/debug.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/debug.hpp 2010-08-20 12:33:52 UTC (rev 2048)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/debug.hpp 2010-08-20 12:49:18 UTC (rev 2049)
@@ -724,6 +724,7 @@
std::cout << "@ arma_config::boost = " << arma_config::boost << '\n';
std::cout << "@ arma_config::boost_date = " << arma_config::boost_date << '\n';
std::cout << "@ arma_config::good_comp = " << arma_config::good_comp << '\n';
+ std::cout << "@ arma_config::extra_code = " << arma_config::extra_code << '\n';
std::cout << "@ sizeof(int) = " << sizeof(int) << '\n';
std::cout << "@ sizeof(int*) = " << sizeof(int*) << '\n';
std::cout << "@ sizeof(long) = " << sizeof(long) << '\n';
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/field_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/field_meat.hpp 2010-08-20 12:33:52 UTC (rev 2048)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/field_meat.hpp 2010-08-20 12:49:18 UTC (rev 2049)
@@ -1726,9 +1726,12 @@
return diskio::load_std_string(x, is, err_msg);
}
+
+
#ifdef ARMA_EXTRA_FIELD_MEAT
-#include ARMA_EXTRA_FIELD_MEAT
+ #include ARMA_INCFILE_WRAP(ARMA_EXTRA_FIELD_MEAT)
#endif
+
//! @}
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/field_proto.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/field_proto.hpp 2010-08-20 12:33:52 UTC (rev 2048)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/field_proto.hpp 2010-08-20 12:49:18 UTC (rev 2049)
@@ -63,10 +63,6 @@
inline explicit field(const u32 n_elem_in);
inline field(const u32 n_rows_in, const u32 n_cols_in);
-#ifdef ARMA_EXTRA_FIELD_PROTO
-#include ARMA_EXTRA_FIELD_PROTO
-#endif
-
inline void set_size(const u32 n_obj_in);
inline void set_size(const u32 n_rows_in, const u32 n_cols_in);
@@ -177,8 +173,13 @@
inline iterator end();
inline const_iterator end() const;
+
+ #ifdef ARMA_EXTRA_FIELD_PROTO
+ #include ARMA_INCFILE_WRAP(ARMA_EXTRA_FIELD_PROTO)
+ #endif
+
private:
inline void init(const field<oT>& x);
Added: pkg/RcppArmadillo/inst/include/armadillo_bits/span.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/span.hpp (rev 0)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/span.hpp 2010-08-20 12:49:18 UTC (rev 2049)
@@ -0,0 +1,40 @@
+// 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 span
+//! @{
+
+
+
+class span
+ {
+ public:
+
+ inline
+ span(const u32 in_a, const u32 in_b)
+ : a(in_a)
+ , b(in_b)
+ {
+ }
+
+ const u32 a;
+ const u32 b;
+ };
+
+
+
+//! @}
More information about the Rcpp-commits
mailing list