Col_bones.hpp   Col_bones.hpp 
// Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2015 Conrad Sanderson
// Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // Copyright (C) 2008-2015 NICTA (www.nicta.com.au)
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
//! \addtogroup Col //! \addtogroup Col
//! @{ //! @{
//! Class for column vectors (matrices with only one column) //! Class for column vectors (matrices with only one column)
skipping to change at line 102 skipping to change at line 102
arma_inline subview_col<eT> operator()(const span& row_span); arma_inline subview_col<eT> operator()(const span& row_span);
arma_inline const subview_col<eT> operator()(const span& row_span) const; arma_inline const subview_col<eT> operator()(const span& row_span) const;
arma_inline subview_col<eT> head(const uword N); arma_inline subview_col<eT> head(const uword N);
arma_inline const subview_col<eT> head(const uword N) const; arma_inline const subview_col<eT> head(const uword N) const;
arma_inline subview_col<eT> tail(const uword N); arma_inline subview_col<eT> tail(const uword N);
arma_inline const subview_col<eT> tail(const uword N) const; arma_inline const subview_col<eT> tail(const uword N) const;
arma_inline subview_col<eT> head_rows(const uword N);
arma_inline const subview_col<eT> head_rows(const uword N) const;
arma_inline subview_col<eT> tail_rows(const uword N);
arma_inline const subview_col<eT> tail_rows(const uword N) const;
inline void shed_row (const uword row_num); inline void shed_row (const uword row_num);
inline void shed_rows(const uword in_row1, const uword in_row2); inline void shed_rows(const uword in_row1, const uword in_row2);
inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero = true); inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero = true);
template<typename T1> inline void insert_rows(const uword row_num, const Base<eT,T1>& X); template<typename T1> inline void insert_rows(const uword row_num, const Base<eT,T1>& X);
arma_inline arma_warn_unused eT& at(const uword i); arma_inline arma_warn_unused eT& at(const uword i);
arma_inline arma_warn_unused const eT& at(const uword i) const; arma_inline arma_warn_unused const eT& at(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);
 End of changes. 2 change blocks. 
2 lines changed or deleted 8 lines changed or added


 Col_meat.hpp   Col_meat.hpp 
// Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2015 Conrad Sanderson
// Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // Copyright (C) 2008-2015 NICTA (www.nicta.com.au)
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
//! \addtogroup Col //! \addtogroup Col
//! @{ //! @{
//! construct an empty column vector //! construct an empty column vector
template<typename eT> template<typename eT>
skipping to change at line 663 skipping to change at line 663
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_check( (N > Mat<eT>::n_rows), "Col::tail(): size out of bounds "); arma_debug_check( (N > Mat<eT>::n_rows), "Col::tail(): size out of bounds ");
const uword start_row = Mat<eT>::n_rows - N; const uword start_row = Mat<eT>::n_rows - N;
return subview_col<eT>(*this, 0, start_row, N); return subview_col<eT>(*this, 0, start_row, N);
} }
template<typename eT>
arma_inline
subview_col<eT>
Col<eT>::head_rows(const uword N)
{
arma_extra_debug_sigprint();
return (*this).head(N);
}
template<typename eT>
arma_inline
const subview_col<eT>
Col<eT>::head_rows(const uword N) const
{
arma_extra_debug_sigprint();
return (*this).head(N);
}
template<typename eT>
arma_inline
subview_col<eT>
Col<eT>::tail_rows(const uword N)
{
arma_extra_debug_sigprint();
return (*this).tail(N);
}
template<typename eT>
arma_inline
const subview_col<eT>
Col<eT>::tail_rows(const uword N) const
{
arma_extra_debug_sigprint();
return (*this).tail(N);
}
//! remove specified row //! remove specified row
template<typename eT> template<typename eT>
inline inline
void void
Col<eT>::shed_row(const uword row_num) Col<eT>::shed_row(const uword row_num)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_check( row_num >= Mat<eT>::n_rows, "Col::shed_row(): index out of bounds"); arma_debug_check( row_num >= Mat<eT>::n_rows, "Col::shed_row(): index out of bounds");
 End of changes. 2 change blocks. 
2 lines changed or deleted 42 lines changed or added


 Row_bones.hpp   Row_bones.hpp 
// Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2015 Conrad Sanderson
// Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // Copyright (C) 2008-2015 NICTA (www.nicta.com.au)
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
//! \addtogroup Row //! \addtogroup Row
//! @{ //! @{
//! Class for row vectors (matrices with only one row) //! Class for row vectors (matrices with only one row)
skipping to change at line 102 skipping to change at line 102
arma_inline subview_row<eT> operator()(const span& col_span); arma_inline subview_row<eT> operator()(const span& col_span);
arma_inline const subview_row<eT> operator()(const span& col_span) const; arma_inline const subview_row<eT> operator()(const span& col_span) const;
arma_inline subview_row<eT> head(const uword N); arma_inline subview_row<eT> head(const uword N);
arma_inline const subview_row<eT> head(const uword N) const; arma_inline const subview_row<eT> head(const uword N) const;
arma_inline subview_row<eT> tail(const uword N); arma_inline subview_row<eT> tail(const uword N);
arma_inline const subview_row<eT> tail(const uword N) const; arma_inline const subview_row<eT> tail(const uword N) const;
arma_inline subview_row<eT> head_cols(const uword N);
arma_inline const subview_row<eT> head_cols(const uword N) const;
arma_inline subview_row<eT> tail_cols(const uword N);
arma_inline const subview_row<eT> tail_cols(const uword N) const;
inline void shed_col (const uword col_num); inline void shed_col (const uword col_num);
inline void shed_cols(const uword in_col1, const uword in_col2); inline void shed_cols(const uword in_col1, const uword in_col2);
inline void insert_cols(const uword col_num, const uword N, const bool set_to_zero = true); inline void insert_cols(const uword col_num, const uword N, const bool set_to_zero = true);
template<typename T1> inline void insert_cols(const uword col_num, const Base<eT,T1>& X); template<typename T1> inline void insert_cols(const uword col_num, const Base<eT,T1>& X);
arma_inline arma_warn_unused eT& at(const uword i); arma_inline arma_warn_unused eT& at(const uword i);
arma_inline arma_warn_unused const eT& at(const uword i) const; arma_inline arma_warn_unused const eT& at(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);
 End of changes. 2 change blocks. 
2 lines changed or deleted 8 lines changed or added


 Row_meat.hpp   Row_meat.hpp 
// Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2015 Conrad Sanderson
// Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // Copyright (C) 2008-2015 NICTA (www.nicta.com.au)
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
//! \addtogroup Row //! \addtogroup Row
//! @{ //! @{
//! construct an empty row vector //! construct an empty row vector
template<typename eT> template<typename eT>
skipping to change at line 629 skipping to change at line 629
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_check( (N > Mat<eT>::n_cols), "Row::tail(): size out of bounds "); arma_debug_check( (N > Mat<eT>::n_cols), "Row::tail(): size out of bounds ");
const uword start_col = Mat<eT>::n_cols - N; const uword start_col = Mat<eT>::n_cols - N;
return subview_row<eT>(*this, 0, start_col, N); return subview_row<eT>(*this, 0, start_col, N);
} }
template<typename eT>
arma_inline
subview_row<eT>
Row<eT>::head_cols(const uword N)
{
arma_extra_debug_sigprint();
return (*this).head(N);
}
template<typename eT>
arma_inline
const subview_row<eT>
Row<eT>::head_cols(const uword N) const
{
arma_extra_debug_sigprint();
return (*this).head(N);
}
template<typename eT>
arma_inline
subview_row<eT>
Row<eT>::tail_cols(const uword N)
{
arma_extra_debug_sigprint();
return (*this).tail(N);
}
template<typename eT>
arma_inline
const subview_row<eT>
Row<eT>::tail_cols(const uword N) const
{
arma_extra_debug_sigprint();
return (*this).tail(N);
}
//! remove specified columns //! remove specified columns
template<typename eT> template<typename eT>
inline inline
void void
Row<eT>::shed_col(const uword col_num) Row<eT>::shed_col(const uword col_num)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_check( col_num >= Mat<eT>::n_cols, "Row::shed_col(): index out of bounds"); arma_debug_check( col_num >= Mat<eT>::n_cols, "Row::shed_col(): index out of bounds");
 End of changes. 2 change blocks. 
2 lines changed or deleted 42 lines changed or added


 arma_version.hpp   arma_version.hpp 
skipping to change at line 13 skipping to change at line 13
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
//! \addtogroup arma_version //! \addtogroup arma_version
//! @{ //! @{
#define ARMA_VERSION_MAJOR 4 #define ARMA_VERSION_MAJOR 4
#define ARMA_VERSION_MINOR 650 #define ARMA_VERSION_MINOR 650
#define ARMA_VERSION_PATCH 1 #define ARMA_VERSION_PATCH 2
#define ARMA_VERSION_NAME "Intravenous Caffeine Injector" #define ARMA_VERSION_NAME "Intravenous Caffeine Injector"
struct arma_version struct arma_version
{ {
static const unsigned int major = ARMA_VERSION_MAJOR; static const unsigned int major = ARMA_VERSION_MAJOR;
static const unsigned int minor = ARMA_VERSION_MINOR; static const unsigned int minor = ARMA_VERSION_MINOR;
static const unsigned int patch = ARMA_VERSION_PATCH; static const unsigned int patch = ARMA_VERSION_PATCH;
static static
inline inline
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 armadillo   armadillo 
skipping to change at line 97 skipping to change at line 97
#include "armadillo_bits/restrictors.hpp" #include "armadillo_bits/restrictors.hpp"
#include "armadillo_bits/access.hpp" #include "armadillo_bits/access.hpp"
#include "armadillo_bits/span.hpp" #include "armadillo_bits/span.hpp"
#include "armadillo_bits/distr_param.hpp" #include "armadillo_bits/distr_param.hpp"
#include "armadillo_bits/constants.hpp" #include "armadillo_bits/constants.hpp"
#include "armadillo_bits/constants_compat.hpp" #include "armadillo_bits/constants_compat.hpp"
#ifdef ARMA_RNG_ALT #ifdef ARMA_RNG_ALT
#include ARMA_INCFILE_WRAP(ARMA_RNG_ALT) #include ARMA_INCFILE_WRAP(ARMA_RNG_ALT)
#else #else
#include "armadillo_bits/arma_rng_cxx11.hpp"
#include "armadillo_bits/arma_rng_cxx98.hpp" #include "armadillo_bits/arma_rng_cxx98.hpp"
#endif #endif
#include "armadillo_bits/arma_rng_cxx11.hpp"
#include "armadillo_bits/arma_rng.hpp" #include "armadillo_bits/arma_rng.hpp"
// //
// class prototypes // class prototypes
#include "armadillo_bits/Base_bones.hpp" #include "armadillo_bits/Base_bones.hpp"
#include "armadillo_bits/BaseCube_bones.hpp" #include "armadillo_bits/BaseCube_bones.hpp"
#include "armadillo_bits/SpBase_bones.hpp" #include "armadillo_bits/SpBase_bones.hpp"
#include "armadillo_bits/blas_bones.hpp" #include "armadillo_bits/blas_bones.hpp"
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 fn_accu.hpp   fn_accu.hpp 
// Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2015 Conrad Sanderson
// Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // Copyright (C) 2008-2015 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
//! \addtogroup fn_accu //! \addtogroup fn_accu
//! @{ //! @{
template<typename T1> template<typename T1>
skipping to change at line 192 skipping to change at line 192
for(uword row=0; row < P_n_rows; ++row) for(uword row=0; row < P_n_rows; ++row)
{ {
n_nonzero += (P.at(row,col) != val) ? uword(1) : uword(0); n_nonzero += (P.at(row,col) != val) ? uword(1) : uword(0);
} }
} }
} }
return n_nonzero; return n_nonzero;
} }
template<typename T1>
inline
arma_warn_unused
uword
accu(const mtOp<uword,T1,op_rel_eq>& X)
{
arma_extra_debug_sigprint();
typedef typename T1::elem_type eT;
const eT val = X.aux;
const Proxy<T1> P(X.m);
uword n_nonzero = 0;
if(Proxy<T1>::prefer_at_accessor == false)
{
typedef typename Proxy<T1>::ea_type ea_type;
ea_type A = P.get_ea();
const uword n_elem = P.get_n_elem();
for(uword i=0; i<n_elem; ++i)
{
n_nonzero += (A[i] == val) ? uword(1) : uword(0);
}
}
else
{
const uword P_n_cols = P.get_n_cols();
const uword P_n_rows = P.get_n_rows();
if(P_n_rows == 1)
{
for(uword col=0; col < P_n_cols; ++col)
{
n_nonzero += (P.at(0,col) == val) ? uword(1) : uword(0);
}
}
else
{
for(uword col=0; col < P_n_cols; ++col)
for(uword row=0; row < P_n_rows; ++row)
{
n_nonzero += (P.at(row,col) == val) ? uword(1) : uword(0);
}
}
}
return n_nonzero;
}
//! accumulate the elements of a subview (submatrix) //! accumulate the elements of a subview (submatrix)
template<typename eT> template<typename eT>
arma_hot arma_hot
arma_pure arma_pure
arma_warn_unused arma_warn_unused
inline inline
eT eT
accu(const subview<eT>& X) accu(const subview<eT>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
const uword X_n_rows = X.n_rows; const uword X_n_rows = X.n_rows;
const uword X_n_cols = X.n_cols; const uword X_n_cols = X.n_cols;
eT val = eT(0); eT val = eT(0);
if(X_n_rows == 1) if(X_n_rows == 1)
{ {
const Mat<eT>& A = X.m; typedef subview_row<eT> sv_type;
const uword start_row = X.aux_row1; const sv_type& sv = reinterpret_cast<const sv_type&>(X); // subview_ro
const uword start_col = X.aux_col1; w<eT> is a child class of subview<eT> and has no extra data
const uword end_col_p1 = start_col + X_n_cols; const Proxy<sv_type> P(sv);
uword i,j; val = accu_proxy_linear(P);
for(i=start_col, j=start_col+1; j < end_col_p1; i+=2, j+=2)
{
val += A.at(start_row, i);
val += A.at(start_row, j);
}
if(i < end_col_p1)
{
val += A.at(start_row, i);
}
} }
else else
if(X_n_cols == 1) if(X_n_cols == 1)
{ {
val = arrayops::accumulate( X.colptr(0), X_n_rows ); val = arrayops::accumulate( X.colptr(0), X_n_rows );
} }
else else
{ {
for(uword col=0; col < X_n_cols; ++col) for(uword col=0; col < X_n_cols; ++col)
{ {
 End of changes. 6 change blocks. 
17 lines changed or deleted 60 lines changed or added


 subview_meat.hpp   subview_meat.hpp 
skipping to change at line 2780 skipping to change at line 2780
template<typename eT> template<typename eT>
inline inline
subview_col<eT> subview_col<eT>
subview_col<eT>::tail(const uword N) subview_col<eT>::tail(const uword N)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_rows), "subview_col::tail(): size o ut of bounds"); arma_debug_check( (N > subview<eT>::n_rows), "subview_col::tail(): size o ut of bounds");
const uword start_row = subview<eT>::n_rows - N; const uword start_row = subview<eT>::aux_row1 + subview<eT>::n_rows - N;
return subview_col<eT>(this->m, this->aux_col1, start_row, N); return subview_col<eT>(this->m, this->aux_col1, start_row, N);
} }
template<typename eT> template<typename eT>
inline inline
const subview_col<eT> const subview_col<eT>
subview_col<eT>::tail(const uword N) const subview_col<eT>::tail(const uword N) const
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_rows), "subview_col::tail(): size o ut of bounds"); arma_debug_check( (N > subview<eT>::n_rows), "subview_col::tail(): size o ut of bounds");
const uword start_row = subview<eT>::n_rows - N; const uword start_row = subview<eT>::aux_row1 + subview<eT>::n_rows - N;
return subview_col<eT>(this->m, this->aux_col1, start_row, N); return subview_col<eT>(this->m, this->aux_col1, start_row, N);
} }
// //
// //
// //
template<typename eT> template<typename eT>
inline inline
skipping to change at line 3092 skipping to change at line 3092
template<typename eT> template<typename eT>
inline inline
subview_row<eT> subview_row<eT>
subview_row<eT>::tail(const uword N) subview_row<eT>::tail(const uword N)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_cols), "subview_row::tail(): size o ut of bounds"); arma_debug_check( (N > subview<eT>::n_cols), "subview_row::tail(): size o ut of bounds");
const uword start_col = subview<eT>::n_cols - N; const uword start_col = subview<eT>::aux_col1 + subview<eT>::n_cols - N;
return subview_row<eT>(this->m, this->aux_row1, start_col, N); return subview_row<eT>(this->m, this->aux_row1, start_col, N);
} }
template<typename eT> template<typename eT>
inline inline
const subview_row<eT> const subview_row<eT>
subview_row<eT>::tail(const uword N) const subview_row<eT>::tail(const uword N) const
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_cols), "subview_row::tail(): size o ut of bounds"); arma_debug_check( (N > subview<eT>::n_cols), "subview_row::tail(): size o ut of bounds");
const uword start_col = subview<eT>::n_cols - N; const uword start_col = subview<eT>::aux_col1 + subview<eT>::n_cols - N;
return subview_row<eT>(this->m, this->aux_row1, start_col, N); return subview_row<eT>(this->m, this->aux_row1, start_col, N);
} }
// //
// //
// //
template<typename eT> template<typename eT>
inline inline
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/