BaseCube_bones.hpp   BaseCube_bones.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 BaseCube //! \addtogroup BaseCube
//! @{ //! @{
//! Analog of the Base class, intended for cubes //! Analog of the Base class, intended for cubes
template<typename elem_type, typename derived> template<typename elem_type, typename derived>
struct BaseCube struct BaseCube
{ {
arma_inline const derived& get_ref() const; arma_inline const derived& get_ref() const;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 BaseCube_meat.hpp   BaseCube_meat.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 BaseCube //! \addtogroup BaseCube
//! @{ //! @{
template<typename elem_type, typename derived> template<typename elem_type, typename derived>
arma_inline arma_inline
const derived& const derived&
BaseCube<elem_type,derived>::get_ref() const BaseCube<elem_type,derived>::get_ref() const
{ {
return static_cast<const derived&>(*this); return static_cast<const derived&>(*this);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 Base_bones.hpp   Base_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 Base //! \addtogroup Base
//! @{ //! @{
template<typename derived> template<typename derived>
struct Base_blas_elem_type struct Base_blas_elem_type
{ {
arma_inline const Op<derived,op_inv> i(const bool slow = false) const; //!< matrix inverse arma_inline const Op<derived,op_inv> i(const bool slow = false) const; //!< matrix inverse
}; };
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 Base_meat.hpp   Base_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 Base //! \addtogroup Base
//! @{ //! @{
template<typename elem_type, typename derived> template<typename elem_type, typename derived>
arma_inline arma_inline
const derived& const derived&
Base<elem_type,derived>::get_ref() const Base<elem_type,derived>::get_ref() const
{ {
return static_cast<const derived&>(*this); return static_cast<const derived&>(*this);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 Col_bones.hpp   Col_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 Col //! \addtogroup Col
//! @{ //! @{
//! Class for column vectors (matrices with only one column) //! Class for column vectors (matrices with only one column)
template<typename eT> template<typename eT>
class Col : public Mat<eT> class Col : public Mat<eT>
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 Col_meat.hpp   Col_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 Col //! \addtogroup Col
//! @{ //! @{
//! construct an empty column vector //! construct an empty column vector
template<typename eT> template<typename eT>
inline inline
Col<eT>::Col() Col<eT>::Col()
: Mat<eT>(arma_vec_indicator(), 1) : Mat<eT>(arma_vec_indicator(), 1)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 Cube_bones.hpp   Cube_bones.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2013 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 Cube //! \addtogroup Cube
//! @{ //! @{
struct Cube_prealloc struct Cube_prealloc
{ {
static const uword mat_ptrs_size = 4; static const uword mat_ptrs_size = 4;
static const uword mem_n_elem = 64; static const uword mem_n_elem = 64;
}; };
skipping to change at line 208 skipping to change at line 203
inline void impl_raw_print(const std::string& extra_text) const; inline void impl_raw_print(const std::string& extra_text) const;
inline void impl_raw_print(std::ostream& user_stream, const std::string& extra_text) const; inline void impl_raw_print(std::ostream& user_stream, const std::string& extra_text) const;
inline void set_size(const uword in_rows, const uword in_cols, const uwo rd in_slices); inline void set_size(const uword in_rows, const uword in_cols, const uwo rd in_slices);
inline void reshape(const uword in_rows, const uword in_cols, const uwo rd in_slices, const uword dim = 0); inline void reshape(const uword in_rows, const uword in_cols, const uwo rd in_slices, const uword dim = 0);
inline void resize(const uword in_rows, const uword in_cols, const uwo rd in_slices); inline void resize(const uword in_rows, const uword in_cols, const uwo rd in_slices);
template<typename eT2> inline void copy_size(const Cube<eT2>& m); template<typename eT2> inline void copy_size(const Cube<eT2>& m);
template<typename functor>
inline const Cube& transform(functor F);
template<typename functor>
inline const Cube& imbue(functor F);
inline const Cube& fill(const eT val); inline const Cube& fill(const eT val);
inline const Cube& zeros(); inline const Cube& zeros();
inline const Cube& zeros(const uword in_rows, const uword in_cols, const uword in_slices); inline const Cube& zeros(const uword in_rows, const uword in_cols, const uword in_slices);
inline const Cube& ones(); inline const Cube& ones();
inline const Cube& ones(const uword in_rows, const uword in_cols, const u word in_slices); inline const Cube& ones(const uword in_rows, const uword in_cols, const u word in_slices);
inline const Cube& randu(); inline const Cube& randu();
inline const Cube& randu(const uword in_rows, const uword in_cols, const uword in_slices); inline const Cube& randu(const uword in_rows, const uword in_cols, const uword in_slices);
skipping to change at line 268 skipping to change at line 269
inline iterator end(); inline iterator end();
inline const_iterator end() const; inline const_iterator end() const;
inline slice_iterator begin_slice(const uword slice_num); inline slice_iterator begin_slice(const uword slice_num);
inline const_slice_iterator begin_slice(const uword slice_num) const; inline const_slice_iterator begin_slice(const uword slice_num) const;
inline slice_iterator end_slice(const uword slice_num); inline slice_iterator end_slice(const uword slice_num);
inline const_slice_iterator end_slice(const uword slice_num) const; inline const_slice_iterator end_slice(const uword slice_num) const;
inline void clear();
inline bool empty() const;
inline uword size() const;
// inline void swap(Cube& B); // TODO
inline void steal_mem(Cube& X); //!< don't use this unless you're writin
g code internal to Armadillo
template<uword fixed_n_rows, uword fixed_n_cols, uword fixed_n_slices> cl ass fixed; template<uword fixed_n_rows, uword fixed_n_cols, uword fixed_n_slices> cl ass fixed;
protected: protected:
inline void init_cold(); inline void init_cold();
inline void init_warm(const uword in_rows, const uword in_cols, const uwo rd in_slices); inline void init_warm(const uword in_rows, const uword in_cols, const uwo rd in_slices);
template<typename T1, typename T2> template<typename T1, typename T2>
inline void init(const BaseCube<pod_type,T1>& A, const BaseCube<pod_type, T2>& B); inline void init(const BaseCube<pod_type,T1>& A, const BaseCube<pod_type, T2>& B);
inline void steal_mem(Cube& X);
inline void delete_mat(); inline void delete_mat();
inline void create_mat(); inline void create_mat();
friend class glue_join; friend class glue_join;
friend class op_reshape; friend class op_reshape;
friend class op_resize; friend class op_resize;
public: public:
#ifdef ARMA_EXTRA_CUBE_PROTO #ifdef ARMA_EXTRA_CUBE_PROTO
 End of changes. 5 change blocks. 
12 lines changed or deleted 20 lines changed or added


 Cube_meat.hpp   Cube_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2013 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 Cube //! \addtogroup Cube
//! @{ //! @{
template<typename eT> template<typename eT>
inline inline
Cube<eT>::~Cube() Cube<eT>::~Cube()
{ {
arma_extra_debug_sigprint_this(this); arma_extra_debug_sigprint_this(this);
skipping to change at line 291 skipping to change at line 286
for(uword uslice = 0; uslice < local_n_slices; ++uslice) for(uword uslice = 0; uslice < local_n_slices; ++uslice)
for(uword ucol = 0; ucol < local_n_cols; ++ucol ) for(uword ucol = 0; ucol < local_n_cols; ++ucol )
for(uword urow = 0; urow < local_n_rows; ++urow ) for(uword urow = 0; urow < local_n_rows; ++urow )
{ {
*out_mem = std::complex<T>( PX.at(urow,ucol,uslice), PY.at(urow,ucol, uslice) ); *out_mem = std::complex<T>( PX.at(urow,ucol,uslice), PY.at(urow,ucol, uslice) );
out_mem++; out_mem++;
} }
} }
} }
//! try to steal the memory from a given cube;
//! if memory can't be stolen, copy the given cube
template<typename eT>
inline
void
Cube<eT>::steal_mem(Cube<eT>& x)
{
arma_extra_debug_sigprint();
if(this != &x)
{
if( (x.mem_state == 0) && (x.n_elem > Cube_prealloc::mem_n_elem) )
{
reset();
const uword x_n_slices = x.n_slices;
access::rw(n_rows) = x.n_rows;
access::rw(n_cols) = x.n_cols;
access::rw(n_elem_slice) = x.n_elem_slice;
access::rw(n_slices) = x_n_slices;
access::rw(n_elem) = x.n_elem;
access::rw(mem) = x.mem;
if(x_n_slices > Cube_prealloc::mat_ptrs_size)
{
access::rw( mat_ptrs) = x.mat_ptrs;
access::rw(x.mat_ptrs) = 0;
}
else
{
access::rw(mat_ptrs) = const_cast< const Mat<eT>** >(mat_ptrs_local
);
for(uword i=0; i < x_n_slices; ++i)
{
mat_ptrs[i] = x.mat_ptrs[i];
x.mat_ptrs[i] = 0;
}
}
access::rw(x.n_rows) = 0;
access::rw(x.n_cols) = 0;
access::rw(x.n_elem_slice) = 0;
access::rw(x.n_slices) = 0;
access::rw(x.n_elem) = 0;
access::rw(x.mem) = 0;
}
else
{
(*this).operator=(x);
}
}
}
template<typename eT> template<typename eT>
inline inline
void void
Cube<eT>::delete_mat() Cube<eT>::delete_mat()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
for(uword uslice = 0; uslice < n_slices; ++uslice) for(uword uslice = 0; uslice < n_slices; ++uslice)
{ {
delete access::rw(mat_ptrs[uslice]); delete access::rw(mat_ptrs[uslice]);
skipping to change at line 2224 skipping to change at line 2165
template<typename eT2> template<typename eT2>
inline inline
void void
Cube<eT>::copy_size(const Cube<eT2>& m) Cube<eT>::copy_size(const Cube<eT2>& m)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
init_warm(m.n_rows, m.n_cols, m.n_slices); init_warm(m.n_rows, m.n_cols, m.n_slices);
} }
//! transform each element in the cube using a functor
template<typename eT>
template<typename functor>
inline
const Cube<eT>&
Cube<eT>::transform(functor F)
{
arma_extra_debug_sigprint();
eT* out_mem = memptr();
const uword N = n_elem;
uword ii, jj;
for(ii=0, jj=1; jj < N; ii+=2, jj+=2)
{
eT tmp_ii = out_mem[ii];
eT tmp_jj = out_mem[jj];
tmp_ii = eT( F(tmp_ii) );
tmp_jj = eT( F(tmp_jj) );
out_mem[ii] = tmp_ii;
out_mem[jj] = tmp_jj;
}
if(ii < N)
{
out_mem[ii] = eT( F(out_mem[ii]) );
}
return *this;
}
//! imbue (fill) the cube with values provided by a functor
template<typename eT>
template<typename functor>
inline
const Cube<eT>&
Cube<eT>::imbue(functor F)
{
arma_extra_debug_sigprint();
eT* out_mem = memptr();
const uword N = n_elem;
uword ii, jj;
for(ii=0, jj=1; jj < N; ii+=2, jj+=2)
{
const eT tmp_ii = eT( F() );
const eT tmp_jj = eT( F() );
out_mem[ii] = tmp_ii;
out_mem[jj] = tmp_jj;
}
if(ii < N)
{
out_mem[ii] = eT( F() );
}
return *this;
}
//! fill the cube with the specified value //! fill the cube with the specified value
template<typename eT> template<typename eT>
inline inline
const Cube<eT>& const Cube<eT>&
Cube<eT>::fill(const eT val) Cube<eT>::fill(const eT val)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arrayops::inplace_set( memptr(), val, n_elem ); arrayops::inplace_set( memptr(), val, n_elem );
skipping to change at line 2834 skipping to change at line 2842
access::rw(Cube<eT>::n_cols) = 0; access::rw(Cube<eT>::n_cols) = 0;
access::rw(Cube<eT>::n_elem_slice) = 0; access::rw(Cube<eT>::n_elem_slice) = 0;
access::rw(Cube<eT>::n_slices) = 0; access::rw(Cube<eT>::n_slices) = 0;
access::rw(Cube<eT>::n_elem) = 0; access::rw(Cube<eT>::n_elem) = 0;
access::rw(Cube<eT>::mem_state) = 3; access::rw(Cube<eT>::mem_state) = 3;
access::rw(Cube<eT>::mat_ptrs) = 0; access::rw(Cube<eT>::mat_ptrs) = 0;
access::rw(Cube<eT>::mem) = 0; access::rw(Cube<eT>::mem) = 0;
} }
} }
//! resets this cube to an empty matrix
template<typename eT>
inline
void
Cube<eT>::clear()
{
reset();
}
//! returns true if the cube has no elements
template<typename eT>
inline
bool
Cube<eT>::empty() const
{
return (n_elem == 0);
}
//! returns the number of elements in this cube
template<typename eT>
inline
uword
Cube<eT>::size() const
{
return n_elem;
}
// template<typename eT>
// inline
// void
// Cube<eT>::swap(Cube<eT>& B)
// {
// // TODO
// }
//! try to steal the memory from a given cube;
//! if memory can't be stolen, copy the given cube
template<typename eT>
inline
void
Cube<eT>::steal_mem(Cube<eT>& x)
{
arma_extra_debug_sigprint();
if(this != &x)
{
if( (x.mem_state == 0) && (x.n_elem > Cube_prealloc::mem_n_elem) )
{
reset();
const uword x_n_slices = x.n_slices;
access::rw(n_rows) = x.n_rows;
access::rw(n_cols) = x.n_cols;
access::rw(n_elem_slice) = x.n_elem_slice;
access::rw(n_slices) = x_n_slices;
access::rw(n_elem) = x.n_elem;
access::rw(mem) = x.mem;
if(x_n_slices > Cube_prealloc::mat_ptrs_size)
{
access::rw( mat_ptrs) = x.mat_ptrs;
access::rw(x.mat_ptrs) = 0;
}
else
{
access::rw(mat_ptrs) = const_cast< const Mat<eT>** >(mat_ptrs_local
);
for(uword i=0; i < x_n_slices; ++i)
{
mat_ptrs[i] = x.mat_ptrs[i];
x.mat_ptrs[i] = 0;
}
}
access::rw(x.n_rows) = 0;
access::rw(x.n_cols) = 0;
access::rw(x.n_elem_slice) = 0;
access::rw(x.n_slices) = 0;
access::rw(x.n_elem) = 0;
access::rw(x.mem) = 0;
}
else
{
(*this).operator=(x);
}
}
}
//! prefix ++ //! prefix ++
template<typename eT> template<typename eT>
arma_inline arma_inline
void void
Cube_aux::prefix_pp(Cube<eT>& x) Cube_aux::prefix_pp(Cube<eT>& x)
{ {
eT* memptr = x.memptr(); eT* memptr = x.memptr();
const uword n_elem = x.n_elem; const uword n_elem = x.n_elem;
uword i,j; uword i,j;
 End of changes. 5 change blocks. 
65 lines changed or deleted 162 lines changed or added


 GenCube_bones.hpp   GenCube_bones.hpp 
// Copyright (C) 2011 NICTA (www.nicta.com.au) // Copyright (C) 2011 NICTA (www.nicta.com.au)
// Copyright (C) 2011 Conrad Sanderson // Copyright (C) 2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 GenCube //! \addtogroup GenCube
//! @{ //! @{
//! support class for generator functions (eg. zeros, randu, randn, ...) //! support class for generator functions (eg. zeros, randu, randn, ...)
template<typename eT, typename gen_type> template<typename eT, typename gen_type>
class GenCube : public BaseCube<eT, GenCube<eT, gen_type> > class GenCube : public BaseCube<eT, GenCube<eT, gen_type> >
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 GenCube_meat.hpp   GenCube_meat.hpp 
// Copyright (C) 2011 NICTA (www.nicta.com.au) // Copyright (C) 2011 NICTA (www.nicta.com.au)
// Copyright (C) 2011 Conrad Sanderson // Copyright (C) 2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 Gen //! \addtogroup Gen
//! @{ //! @{
template<typename eT, typename gen_type> template<typename eT, typename gen_type>
arma_inline arma_inline
GenCube<eT, gen_type>::GenCube(const uword in_n_rows, const uword in_n_cols , const uword in_n_slices) GenCube<eT, gen_type>::GenCube(const uword in_n_rows, const uword in_n_cols , const uword in_n_slices)
: n_rows (in_n_rows ) : n_rows (in_n_rows )
, n_cols (in_n_cols ) , n_cols (in_n_cols )
, n_slices(in_n_slices) , n_slices(in_n_slices)
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 Gen_bones.hpp   Gen_bones.hpp 
// Copyright (C) 2011-2012 NICTA (www.nicta.com.au) // Copyright (C) 2011-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2011-2012 Conrad Sanderson // Copyright (C) 2011-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 Gen //! \addtogroup Gen
//! @{ //! @{
//! support class for generator functions (eg. zeros, randu, randn, ...) //! support class for generator functions (eg. zeros, randu, randn, ...)
template<typename T1, typename gen_type> template<typename T1, typename gen_type>
class Gen : public Base<typename T1::elem_type, Gen<T1, gen_type> > class Gen : public Base<typename T1::elem_type, Gen<T1, gen_type> >
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 Gen_meat.hpp   Gen_meat.hpp 
// Copyright (C) 2011-2012 NICTA (www.nicta.com.au) // Copyright (C) 2011-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2011-2012 Conrad Sanderson // Copyright (C) 2011-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 Gen //! \addtogroup Gen
//! @{ //! @{
template<typename T1, typename gen_type> template<typename T1, typename gen_type>
arma_inline arma_inline
Gen<T1, gen_type>::Gen(const uword in_n_rows, const uword in_n_cols) Gen<T1, gen_type>::Gen(const uword in_n_rows, const uword in_n_cols)
: n_rows(in_n_rows) : n_rows(in_n_rows)
, n_cols(in_n_cols) , n_cols(in_n_cols)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 GlueCube_bones.hpp   GlueCube_bones.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 GlueCube //! \addtogroup GlueCube
//! @{ //! @{
//! analog of the Glue class, intended for Cube objects //! analog of the Glue class, intended for Cube objects
template<typename T1, typename T2, typename glue_type> template<typename T1, typename T2, typename glue_type>
class GlueCube : public BaseCube<typename T1::elem_type, GlueCube<T1, T2, g lue_type> > class GlueCube : public BaseCube<typename T1::elem_type, GlueCube<T1, T2, g lue_type> >
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 GlueCube_meat.hpp   GlueCube_meat.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 GlueCube //! \addtogroup GlueCube
//! @{ //! @{
template<typename T1, typename T2, typename glue_type> template<typename T1, typename T2, typename glue_type>
inline inline
GlueCube<T1,T2,glue_type>::GlueCube(const BaseCube<typename T1::elem_type, T1>& in_A, const BaseCube<typename T1::elem_type, T2>& in_B) GlueCube<T1,T2,glue_type>::GlueCube(const BaseCube<typename T1::elem_type, T1>& in_A, const BaseCube<typename T1::elem_type, T2>& in_B)
: A(in_A.get_ref()) : A(in_A.get_ref())
, B(in_B.get_ref()) , B(in_B.get_ref())
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 Glue_bones.hpp   Glue_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 Glue //! \addtogroup Glue
//! @{ //! @{
//! Class for storing data required for delayed binary operations, //! Class for storing data required for delayed binary operations,
//! such as the operands (e.g. two matrices) and the binary operator (e.g. addition). //! such as the operands (e.g. two matrices) and the binary operator (e.g. addition).
//! The operands are stored as references (which can be optimised away), //! The operands are stored as references (which can be optimised away),
//! while the operator is "stored" through the template definition (glue_ty pe). //! while the operator is "stored" through the template definition (glue_ty pe).
//! The operands can be 'Mat', 'Row', 'Col', 'Op', and 'Glue'. //! The operands can be 'Mat', 'Row', 'Col', 'Op', and 'Glue'.
//! Note that as 'Glue' can be one of the operands, more than two matrices can be stored. //! Note that as 'Glue' can be one of the operands, more than two matrices can be stored.
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 Glue_meat.hpp   Glue_meat.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 Glue //! \addtogroup Glue
//! @{ //! @{
template<typename T1, typename T2, typename glue_type> template<typename T1, typename T2, typename glue_type>
inline inline
Glue<T1,T2,glue_type>::Glue(const T1& in_A, const T2& in_B) Glue<T1,T2,glue_type>::Glue(const T1& in_A, const T2& in_B)
: A(in_A) : A(in_A)
, B(in_B) , B(in_B)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 Mat_bones.hpp   Mat_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2013 Conrad Sanderson
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 Mat //! \addtogroup Mat
//! @{ //! @{
//! Dense matrix class //! Dense matrix class
template<typename eT> template<typename eT>
class Mat : public Base< eT, Mat<eT> > class Mat : public Base< eT, Mat<eT> >
{ {
public: public:
skipping to change at line 335 skipping to change at line 330
template<typename eT2, typename expr> template<typename eT2, typename expr>
inline void copy_size(const Base<eT2,expr>& X); inline void copy_size(const Base<eT2,expr>& X);
inline void set_size(const uword in_elem); inline void set_size(const uword in_elem);
inline void set_size(const uword in_rows, const uword in_cols); inline void set_size(const uword in_rows, const uword in_cols);
inline void resize(const uword in_elem); inline void resize(const uword in_elem);
inline void resize(const uword in_rows, const uword in_cols); inline void resize(const uword in_rows, const uword in_cols);
inline void reshape(const uword in_rows, const uword in_cols, const uwor d dim = 0); inline void reshape(const uword in_rows, const uword in_cols, const uwor d dim = 0);
template<typename functor>
inline const Mat& transform(functor F);
template<typename functor>
inline const Mat& imbue(functor F);
arma_hot inline const Mat& fill(const eT val); arma_hot inline const Mat& fill(const eT val);
inline const Mat& zeros(); inline const Mat& zeros();
inline const Mat& zeros(const uword in_elem); inline const Mat& zeros(const uword in_elem);
inline const Mat& zeros(const uword in_rows, const uword in_cols); inline const Mat& zeros(const uword in_rows, const uword in_cols);
inline const Mat& ones(); inline const Mat& ones();
inline const Mat& ones(const uword in_elem); inline const Mat& ones(const uword in_elem);
inline const Mat& ones(const uword in_rows, const uword in_cols); inline const Mat& ones(const uword in_rows, const uword in_cols);
skipping to change at line 460 skipping to change at line 461
inline row_iterator begin_row(const uword row_num); inline row_iterator begin_row(const uword row_num);
inline const_row_iterator begin_row(const uword row_num) const; inline const_row_iterator begin_row(const uword row_num) const;
inline row_iterator end_row (const uword row_num); inline row_iterator end_row (const uword row_num);
inline const_row_iterator end_row (const uword row_num) const; inline const_row_iterator end_row (const uword row_num) const;
inline void clear(); inline void clear();
inline bool empty() const; inline bool empty() const;
inline uword size() const; inline uword size() const;
inline void swap(Mat& B);
inline void steal_mem(Mat& X); //!< don't use this unless you're writing code internal to Armadillo 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; template<uword fixed_n_rows, uword fixed_n_cols> class fixed;
protected: protected:
inline void init_cold(); inline void init_cold();
inline void init_warm(uword in_rows, uword in_cols); inline void init_warm(uword in_rows, uword in_cols);
inline void init(const std::string& text); inline void init(const std::string& text);
 End of changes. 4 change blocks. 
10 lines changed or deleted 13 lines changed or added


 Mat_meat.hpp   Mat_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2013 Conrad Sanderson
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 Mat //! \addtogroup Mat
//! @{ //! @{
template<typename eT> template<typename eT>
inline inline
Mat<eT>::~Mat() Mat<eT>::~Mat()
{ {
arma_extra_debug_sigprint_this(this); arma_extra_debug_sigprint_this(this);
skipping to change at line 662 skipping to change at line 657
{ {
for(uword ucol=0; ucol < local_n_cols; ++ucol) for(uword ucol=0; ucol < local_n_cols; ++ucol)
for(uword urow=0; urow < local_n_rows; ++urow) for(uword urow=0; urow < local_n_rows; ++urow)
{ {
*out_mem = std::complex<T>(PX.at(urow,ucol), PY.at(urow,ucol)); *out_mem = std::complex<T>(PX.at(urow,ucol), PY.at(urow,ucol));
out_mem++; out_mem++;
} }
} }
} }
//! EXPERIMENTAL: swap the contents of this matrix, denoted as matrix A, wi
th given matrix B
template<typename eT>
inline
void
Mat<eT>::swap(Mat<eT>& B)
{
Mat<eT>& A = (*this);
arma_extra_debug_sigprint(arma_boost::format("A = %x B = %x") % &A % &B
);
arma_debug_check( (A.vec_state != B.vec_state), "Mat::swap(): incompatibl
e object types" );
const uhword A_mem_state = A.mem_state;
const uhword B_mem_state = B.mem_state;
if( (A_mem_state == 0) && (B_mem_state == 0) )
{
const uword A_n_elem = A.n_elem;
const uword B_n_elem = B.n_elem;
const bool A_use_local_mem = (A_n_elem <= arma_config::mat_prealloc);
const bool B_use_local_mem = (B_n_elem <= arma_config::mat_prealloc);
if( (A_use_local_mem == false) && (B_use_local_mem == false) )
{
std::swap( access::rw(A.mem), access::rw(B.mem) );
}
else
if( (A_use_local_mem == true) && (B_use_local_mem == true) )
{
const uword N = (std::max)(A_n_elem, B_n_elem);
eT* A_mem = A.memptr();
eT* B_mem = B.memptr();
for(uword ii=0; ii < N; ++ii) { std::swap( A_mem[ii], B_mem[ii] ); }
}
else
if( (A_use_local_mem == true) && (B_use_local_mem == false) )
{
eT* A_mem_local = &(A.mem_local[0]);
eT* B_mem_local = &(B.mem_local[0]);
arrayops::copy(B_mem_local, A_mem_local, A_n_elem);
access::rw(A.mem) = B.mem;
access::rw(B.mem) = B_mem_local;
}
else
if( (A_use_local_mem == false) && (B_use_local_mem == true) )
{
eT* A_mem_local = &(A.mem_local[0]);
eT* B_mem_local = &(B.mem_local[0]);
arrayops::copy(A_mem_local, B_mem_local, B_n_elem);
access::rw(B.mem) = A.mem;
access::rw(A.mem) = A_mem_local;
}
std::swap( access::rw(A.n_rows), access::rw(B.n_rows) );
std::swap( access::rw(A.n_cols), access::rw(B.n_cols) );
std::swap( access::rw(A.n_elem), access::rw(B.n_elem) );
}
else
if( (A_mem_state == 3) && (B_mem_state == 3) )
{
arma_debug_check( ((A.n_rows != B.n_rows) || (A.n_cols != B.n_cols)), "
Mat::swap(): incompatible object types" );
const uword N = A.n_elem;
eT* A_mem = A.memptr();
eT* B_mem = B.memptr();
for(uword ii=0; ii < N; ++ii) { std::swap(A_mem[ii], B_mem[ii]); }
}
else
{
arma_bad("Mat::swap(): incompatible object types");
}
}
//! try to steal the memory from a given matrix; //! try to steal the memory from a given matrix;
//! if memory can't be stolen, copy the given matrix //! if memory can't be stolen, copy the given matrix
template<typename eT> template<typename eT>
inline inline
void void
Mat<eT>::steal_mem(Mat<eT>& x) Mat<eT>::steal_mem(Mat<eT>& x)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(this != &x) if(this != &x)
skipping to change at line 4392 skipping to change at line 4469
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
const Proxy<expr> P(X.get_ref()); const Proxy<expr> P(X.get_ref());
const uword X_n_rows = P.get_n_rows(); const uword X_n_rows = P.get_n_rows();
const uword X_n_cols = P.get_n_cols(); const uword X_n_cols = P.get_n_cols();
init_warm(X_n_rows, X_n_cols); init_warm(X_n_rows, X_n_cols);
} }
//! transform each element in the matrix using a functor
template<typename eT>
template<typename functor>
inline
const Mat<eT>&
Mat<eT>::transform(functor F)
{
arma_extra_debug_sigprint();
eT* out_mem = memptr();
const uword N = n_elem;
uword ii, jj;
for(ii=0, jj=1; jj < N; ii+=2, jj+=2)
{
eT tmp_ii = out_mem[ii];
eT tmp_jj = out_mem[jj];
tmp_ii = eT( F(tmp_ii) );
tmp_jj = eT( F(tmp_jj) );
out_mem[ii] = tmp_ii;
out_mem[jj] = tmp_jj;
}
if(ii < N)
{
out_mem[ii] = eT( F(out_mem[ii]) );
}
return *this;
}
//! imbue (fill) the matrix with values provided by a functor
template<typename eT>
template<typename functor>
inline
const Mat<eT>&
Mat<eT>::imbue(functor F)
{
arma_extra_debug_sigprint();
eT* out_mem = memptr();
const uword N = n_elem;
uword ii, jj;
for(ii=0, jj=1; jj < N; ii+=2, jj+=2)
{
const eT tmp_ii = eT( F() );
const eT tmp_jj = eT( F() );
out_mem[ii] = tmp_ii;
out_mem[jj] = tmp_jj;
}
if(ii < N)
{
out_mem[ii] = eT( F() );
}
return *this;
}
//! fill the matrix with the specified value //! fill the matrix with the specified value
template<typename eT> template<typename eT>
arma_hot arma_hot
inline inline
const Mat<eT>& const Mat<eT>&
Mat<eT>::fill(const eT val) Mat<eT>::fill(const eT val)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arrayops::inplace_set( memptr(), val, n_elem ); arrayops::inplace_set( memptr(), val, n_elem );
 End of changes. 4 change blocks. 
10 lines changed or deleted 158 lines changed or added


 OpCube_bones.hpp   OpCube_bones.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 OpCube //! \addtogroup OpCube
//! @{ //! @{
//! Analog of the Op class, intended for cubes //! Analog of the Op class, intended for cubes
template<typename T1, typename op_type> template<typename T1, typename op_type>
class OpCube : public BaseCube<typename T1::elem_type, OpCube<T1, op_type> > class OpCube : public BaseCube<typename T1::elem_type, OpCube<T1, op_type> >
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 OpCube_meat.hpp   OpCube_meat.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 OpCube //! \addtogroup OpCube
//! @{ //! @{
template<typename T1, typename op_type> template<typename T1, typename op_type>
OpCube<T1, op_type>::OpCube(const BaseCube<typename T1::elem_type, T1>& in_ m) OpCube<T1, op_type>::OpCube(const BaseCube<typename T1::elem_type, T1>& in_ m)
: m(in_m.get_ref()) : m(in_m.get_ref())
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 Op_bones.hpp   Op_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 Op //! \addtogroup Op
//! @{ //! @{
//! Class for storing data required for delayed unary operations, //! Class for storing data required for delayed unary operations,
//! such as the operand (e.g. the matrix to which the operation is to be ap plied) and the unary operator (e.g. inverse). //! such as the operand (e.g. the matrix to which the operation is to be ap plied) and the unary operator (e.g. inverse).
//! The operand is stored as a reference (which can be optimised away), //! The operand is stored as a reference (which can be optimised away),
//! while the operator is "stored" through the template definition (op_type ). //! while the operator is "stored" through the template definition (op_type ).
//! The operands can be 'Mat', 'Row', 'Col', 'Op', and 'Glue'. //! The operands can be 'Mat', 'Row', 'Col', 'Op', and 'Glue'.
//! Note that as 'Glue' can be one of the operands, more than one matrix ca n be stored. //! Note that as 'Glue' can be one of the operands, more than one matrix ca n be stored.
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 Op_meat.hpp   Op_meat.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 Op //! \addtogroup Op
//! @{ //! @{
template<typename T1, typename op_type> template<typename T1, typename op_type>
inline inline
Op<T1, op_type>::Op(const T1& in_m) Op<T1, op_type>::Op(const T1& in_m)
: m(in_m) : m(in_m)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 Proxy.hpp   Proxy.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 Proxy //! \addtogroup Proxy
//! @{ //! @{
// ea_type is the "element accessor" type, // ea_type is the "element accessor" type,
// which can provide access to elements via operator[] // which can provide access to elements via operator[]
template<typename T1> template<typename T1>
struct Proxy_default struct Proxy_default
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 ProxyCube.hpp   ProxyCube.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 ProxyCube //! \addtogroup ProxyCube
//! @{ //! @{
template<typename T1> template<typename T1>
class ProxyCube class ProxyCube
{ {
public: public:
inline ProxyCube(const T1&) inline ProxyCube(const T1&)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 Row_bones.hpp   Row_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 Row //! \addtogroup Row
//! @{ //! @{
//! Class for row vectors (matrices with only one row) //! Class for row vectors (matrices with only one row)
template<typename eT> template<typename eT>
class Row : public Mat<eT> class Row : public Mat<eT>
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 Row_meat.hpp   Row_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 Row //! \addtogroup Row
//! @{ //! @{
//! construct an empty row vector //! construct an empty row vector
template<typename eT> template<typename eT>
inline inline
Row<eT>::Row() Row<eT>::Row()
: Mat<eT>(arma_vec_indicator(), 2) : Mat<eT>(arma_vec_indicator(), 2)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 SpBase_bones.hpp   SpBase_bones.hpp 
// Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 SpBase //! \addtogroup SpBase
//! @{ //! @{
template<typename elem_type, typename derived> template<typename elem_type, typename derived>
struct SpBase struct SpBase
{ {
arma_inline const derived& get_ref() const; arma_inline const derived& get_ref() const;
inline const SpOp<derived,spop_htrans> t() const; //!< Hermitian transp ose inline const SpOp<derived,spop_htrans> t() const; //!< Hermitian transp ose
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 SpBase_meat.hpp   SpBase_meat.hpp 
// Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 SpBase //! \addtogroup SpBase
//! @{ //! @{
template<typename elem_type, typename derived> template<typename elem_type, typename derived>
arma_inline arma_inline
const derived& const derived&
SpBase<elem_type,derived>::get_ref() const SpBase<elem_type,derived>::get_ref() const
{ {
return static_cast<const derived&>(*this); return static_cast<const derived&>(*this);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 SpCol_bones.hpp   SpCol_bones.hpp 
// Copyright (C) 2011-2012 Ryan Curtin // Copyright (C) 2011-2012 Ryan Curtin
// Copyright (C) 2011 Matthew Amidon // Copyright (C) 2011 Matthew Amidon
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 SpCol //! \addtogroup SpCol
//! @{ //! @{
//! Class for sparse column vectors (matrices with only one column) //! Class for sparse column vectors (matrices with only one column)
template<typename eT> template<typename eT>
class SpCol : public SpMat<eT> class SpCol : public SpMat<eT>
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 SpCol_meat.hpp   SpCol_meat.hpp 
// Copyright (C) 2011-2012 Ryan Curtin // Copyright (C) 2011-2012 Ryan Curtin
// Copyright (C) 2011 Matthew Amidon // Copyright (C) 2011 Matthew Amidon
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 SpCol //! \addtogroup SpCol
//! @{ //! @{
//! construct an empty column vector //! construct an empty column vector
template<typename eT> template<typename eT>
inline inline
SpCol<eT>::SpCol() SpCol<eT>::SpCol()
: SpMat<eT>(0, 1) : SpMat<eT>(0, 1)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 SpGlue_bones.hpp   SpGlue_bones.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 SpGlue //! \addtogroup SpGlue
//! @{ //! @{
template<typename T1, typename T2, typename spglue_type> template<typename T1, typename T2, typename spglue_type>
class SpGlue : public SpBase<typename T1::elem_type, SpGlue<T1, T2, spglue_ type> > class SpGlue : public SpBase<typename T1::elem_type, SpGlue<T1, T2, spglue_ type> >
{ {
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 SpGlue_meat.hpp   SpGlue_meat.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 SpGlue //! \addtogroup SpGlue
//! @{ //! @{
template<typename T1, typename T2, typename spglue_type> template<typename T1, typename T2, typename spglue_type>
inline inline
SpGlue<T1,T2,spglue_type>::SpGlue(const T1& in_A, const T2& in_B) SpGlue<T1,T2,spglue_type>::SpGlue(const T1& in_A, const T2& in_B)
: A(in_A) : A(in_A)
, B(in_B) , B(in_B)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 SpMat_bones.hpp   SpMat_bones.hpp 
// Copyright (C) 2011-2012 Ryan Curtin // Copyright (C) 2011-2012 Ryan Curtin
// Copyright (C) 2011 Matthew Amidon // Copyright (C) 2011 Matthew Amidon
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 SpMat //! \addtogroup SpMat
//! @{ //! @{
//! Sparse matrix class, with data stored in compressed sparse column (CSC) format //! Sparse matrix class, with data stored in compressed sparse column (CSC) format
template<typename eT> template<typename eT>
class SpMat : public SpBase< eT, SpMat<eT> > class SpMat : public SpBase< eT, SpMat<eT> >
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 SpMat_iterators_meat.hpp   SpMat_iterators_meat.hpp 
// Copyright (C) 2011-2012 Ryan Curtin // Copyright (C) 2011-2012 Ryan Curtin
// Copyright (C) 2011 Matthew Amidon // Copyright (C) 2011 Matthew Amidon
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 SpMat //! \addtogroup SpMat
//! @{ //! @{
/////////////////////////////////////////////////////////////////////////// //// /////////////////////////////////////////////////////////////////////////// ////
// SpMat::iterator_base implementation // // SpMat::iterator_base implementation //
/////////////////////////////////////////////////////////////////////////// //// /////////////////////////////////////////////////////////////////////////// ////
template<typename eT> template<typename eT>
inline inline
SpMat<eT>::iterator_base::iterator_base(const SpMat<eT>& in_M) SpMat<eT>::iterator_base::iterator_base(const SpMat<eT>& in_M)
: M(in_M) : M(in_M)
, internal_col(0) , internal_col(0)
, internal_pos(0) , internal_pos(0)
{ {
// Technically this iterator is invalid (it may not point to a real eleme nt) // Technically this iterator is invalid (it may not point to a real eleme nt)
} }
template<typename eT> template<typename eT>
inline inline
SpMat<eT>::iterator_base::iterator_base(const SpMat<eT>& in_M, const uword col, const uword pos) SpMat<eT>::iterator_base::iterator_base(const SpMat<eT>& in_M, const uword in_col, const uword in_pos)
: M(in_M) : M(in_M)
, internal_col(col) , internal_col(in_col)
, internal_pos(pos) , internal_pos(in_pos)
{ {
// Nothing to do. // Nothing to do.
} }
template<typename eT> template<typename eT>
inline inline
arma_hot arma_hot
eT eT
SpMat<eT>::iterator_base::operator*() const SpMat<eT>::iterator_base::operator*() const
{ {
 End of changes. 3 change blocks. 
11 lines changed or deleted 6 lines changed or added


 SpMat_meat.hpp   SpMat_meat.hpp 
// Copyright (C) 2011-2012 Ryan Curtin // Copyright (C) 2011-2012 Ryan Curtin
// Copyright (C) 2011 Matthew Amidon // Copyright (C) 2011 Matthew Amidon
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 SpMat //! \addtogroup SpMat
//! @{ //! @{
/** /**
* Initialize a sparse matrix with size 0x0 (empty). * Initialize a sparse matrix with size 0x0 (empty).
*/ */
template<typename eT> template<typename eT>
inline inline
SpMat<eT>::SpMat() SpMat<eT>::SpMat()
skipping to change at line 579 skipping to change at line 574
SpMat<eT> z(n_rows, p.get_n_cols()); SpMat<eT> z(n_rows, p.get_n_cols());
z.mem_resize(nonzero_rows * p.get_n_cols()); // upper bound on size z.mem_resize(nonzero_rows * p.get_n_cols()); // upper bound on size
// Now we have to fill all the elements using a modification of the NUMBM M algorithm. // Now we have to fill all the elements using a modification of the NUMBM M algorithm.
uword cur_pos = 0; uword cur_pos = 0;
podarray<eT> partial_sums(n_rows); podarray<eT> partial_sums(n_rows);
partial_sums.zeros(); partial_sums.zeros();
for(uword col = 0; col < n_cols; ++col) for(uword lcol = 0; lcol < n_cols; ++lcol)
{ {
const_iterator it = begin(); const_iterator it = begin();
while(it != end()) while(it != end())
{ {
const eT value = (*it); const eT value = (*it);
partial_sums[it.row()] += (value * p.at(it.col(), col)); partial_sums[it.row()] += (value * p.at(it.col(), lcol));
++it; ++it;
} }
// Now add all partial sums to the matrix. // Now add all partial sums to the matrix.
for(uword i = 0; i < n_rows; ++i) for(uword i = 0; i < n_rows; ++i)
{ {
if(partial_sums[i] != eT(0)) if(partial_sums[i] != eT(0))
{ {
access::rw(z.values[cur_pos]) = partial_sums[i]; access::rw(z.values[cur_pos]) = partial_sums[i];
access::rw(z.row_indices[cur_pos]) = i; access::rw(z.row_indices[cur_pos]) = i;
++access::rw(z.col_ptrs[col + 1]); ++access::rw(z.col_ptrs[lcol + 1]);
//printf("colptr %d now %d\n", col + 1, z.col_ptrs[col + 1]); //printf("colptr %d now %d\n", lcol + 1, z.col_ptrs[lcol + 1]);
++cur_pos; ++cur_pos;
partial_sums[i] = 0; // Would it be faster to do this in batch late r? partial_sums[i] = 0; // Would it be faster to do this in batch late r?
} }
} }
} }
// Now fix the column pointers. // Now fix the column pointers.
for(uword c = 1; c <= z.n_cols; ++c) for(uword c = 1; c <= z.n_cols; ++c)
{ {
access::rw(z.col_ptrs[c]) += z.col_ptrs[c - 1]; access::rw(z.col_ptrs[c]) += z.col_ptrs[c - 1];
skipping to change at line 968 skipping to change at line 963
SpMat<eT>::operator+=(const subview<eT>& x) SpMat<eT>::operator+=(const subview<eT>& x)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_assert_same_size(n_rows, n_cols, x.n_rows, x.n_cols, "addition "); arma_debug_assert_same_size(n_rows, n_cols, x.n_rows, x.n_cols, "addition ");
// Loop over every element. This could probably be written in a more // Loop over every element. This could probably be written in a more
// efficient way, by calculating the number of nonzero elements the outpu t // efficient way, by calculating the number of nonzero elements the outpu t
// matrix will have, allocating the memory correctly, and then filling th e // matrix will have, allocating the memory correctly, and then filling th e
// matrix correctly. However... for now, this works okay. // matrix correctly. However... for now, this works okay.
for(uword col = 0; col < n_cols; ++col) for(uword lcol = 0; lcol < n_cols; ++lcol)
for(uword lrow = 0; lrow < n_rows; ++lrow)
{ {
for(uword row = 0; row < n_rows; ++row) at(lrow, lcol) += x.at(lrow, lcol);
{
at(row, col) += x.at(row, col);
}
} }
return *this; return *this;
} }
template<typename eT> template<typename eT>
inline inline
const SpMat<eT>& const SpMat<eT>&
SpMat<eT>::operator-=(const subview<eT>& x) SpMat<eT>::operator-=(const subview<eT>& x)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_assert_same_size(n_rows, n_cols, x.n_rows, x.n_cols, "subtract ion"); arma_debug_assert_same_size(n_rows, n_cols, x.n_rows, x.n_cols, "subtract ion");
// Loop over every element. // Loop over every element.
for(uword col = 0; col < n_cols; ++col) for(uword lcol = 0; lcol < n_cols; ++lcol)
for(uword lrow = 0; lrow < n_rows; ++lrow)
{ {
for(uword row = 0; row < n_rows; ++row) at(lrow, lcol) -= x.at(lrow, lcol);
{
at(row, col) -= x.at(row, col);
}
} }
return *this; return *this;
} }
template<typename eT> template<typename eT>
inline inline
const SpMat<eT>& const SpMat<eT>&
SpMat<eT>::operator*=(const subview<eT>& y) SpMat<eT>::operator*=(const subview<eT>& y)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_assert_mul_size(n_rows, n_cols, y.n_rows, y.n_cols, "matrix mu ltiplication"); arma_debug_assert_mul_size(n_rows, n_cols, y.n_rows, y.n_cols, "matrix mu ltiplication");
SpMat<eT> z(n_rows, y.n_cols); SpMat<eT> z(n_rows, y.n_cols);
// Performed in the same fashion as operator*=(SpMat). // Performed in the same fashion as operator*=(SpMat).
for (const_row_iterator x_row_it = begin_row(); x_row_it.pos() < n_nonzer o; ++x_row_it) for (const_row_iterator x_row_it = begin_row(); x_row_it.pos() < n_nonzer o; ++x_row_it)
{ {
for (uword col = 0; col < y.n_cols; ++col) for (uword lcol = 0; lcol < y.n_cols; ++lcol)
{ {
// At this moment in the loop, we are calculating anything that is co ntributed to by *x_row_it and *y_col_it. // At this moment in the loop, we are calculating anything that is co ntributed to by *x_row_it and *y_col_it.
// Given that our position is x_ab and y_bc, there will only be a con tribution if x.col == y.row, and that // Given that our position is x_ab and y_bc, there will only be a con tribution if x.col == y.row, and that
// contribution will be in location z_ac. // contribution will be in location z_ac.
z.at(x_row_it.row, col) += (*x_row_it) * y.at(x_row_it.col, col); z.at(x_row_it.row, lcol) += (*x_row_it) * y.at(x_row_it.col, lcol);
} }
} }
steal_mem(z); steal_mem(z);
return *this; return *this;
} }
template<typename eT> template<typename eT>
inline inline
const SpMat<eT>& const SpMat<eT>&
SpMat<eT>::operator%=(const subview<eT>& x) SpMat<eT>::operator%=(const subview<eT>& x)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_assert_same_size(n_rows, n_cols, x.n_rows, x.n_cols, "element- wise multiplication"); arma_debug_assert_same_size(n_rows, n_cols, x.n_rows, x.n_cols, "element- wise multiplication");
// Loop over every element. // Loop over every element.
for(uword col = 0; col < n_cols; ++col) for(uword lcol = 0; lcol < n_cols; ++lcol)
for(uword lrow = 0; lrow < n_rows; ++lrow)
{ {
for(uword row = 0; row < n_rows; ++row) at(lrow, lcol) *= x.at(lrow, lcol);
{
at(row, col) *= x.at(row, col);
}
} }
return *this; return *this;
} }
template<typename eT> template<typename eT>
inline inline
const SpMat<eT>& const SpMat<eT>&
SpMat<eT>::operator/=(const subview<eT>& x) SpMat<eT>::operator/=(const subview<eT>& x)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_assert_same_size(n_rows, n_cols, x.n_rows, x.n_cols, "element- wise division"); arma_debug_assert_same_size(n_rows, n_cols, x.n_rows, x.n_cols, "element- wise division");
// Loop over every element. // Loop over every element.
for(uword col = 0; col < n_cols; ++col) for(uword lcol = 0; lcol < n_cols; ++lcol)
for(uword lrow = 0; lrow < n_rows; ++lrow)
{ {
for(uword row = 0; row < n_rows; ++row) at(lrow, lcol) /= x.at(lrow, lcol);
{
at(row, col) /= x.at(row, col);
}
} }
return *this; return *this;
} }
template<typename eT> template<typename eT>
template<typename T1, typename spop_type> template<typename T1, typename spop_type>
inline inline
SpMat<eT>::SpMat(const SpOp<T1, spop_type>& X) SpMat<eT>::SpMat(const SpOp<T1, spop_type>& X)
: n_rows(0) : n_rows(0)
skipping to change at line 1570 skipping to change at line 1557
{ {
return; return;
} }
// The easier way to do this, instead of collecting all the elements in o ne row and then swapping with the other, will be // The easier way to do this, instead of collecting all the elements in o ne row and then swapping with the other, will be
// to iterate over each column of the matrix (since we store in column-ma jor format) and then swap the two elements in the two rows at that time. // to iterate over each column of the matrix (since we store in column-ma jor format) and then swap the two elements in the two rows at that time.
// We will try to avoid using the at() call since it is expensive, instea d preferring to use an iterator to track our position. // We will try to avoid using the at() call since it is expensive, instea d preferring to use an iterator to track our position.
uword col1 = (in_row1 < in_row2) ? in_row1 : in_row2; uword col1 = (in_row1 < in_row2) ? in_row1 : in_row2;
uword col2 = (in_row1 < in_row2) ? in_row2 : in_row1; uword col2 = (in_row1 < in_row2) ? in_row2 : in_row1;
for (uword col = 0; col < n_cols; col++) for (uword lcol = 0; lcol < n_cols; lcol++)
{ {
// If there is nothing in this column we can ignore it. // If there is nothing in this column we can ignore it.
if (col_ptrs[col] == col_ptrs[col + 1]) if (col_ptrs[lcol] == col_ptrs[lcol + 1])
{ {
continue; continue;
} }
// These will represent the positions of the items themselves. // These will represent the positions of the items themselves.
uword loc1 = n_nonzero + 1; uword loc1 = n_nonzero + 1;
uword loc2 = n_nonzero + 1; uword loc2 = n_nonzero + 1;
for (uword search_pos = col_ptrs[col]; search_pos < col_ptrs[col + 1]; search_pos++) for (uword search_pos = col_ptrs[lcol]; search_pos < col_ptrs[lcol + 1] ; search_pos++)
{ {
if (row_indices[search_pos] == col1) if (row_indices[search_pos] == col1)
{ {
loc1 = search_pos; loc1 = search_pos;
} }
if (row_indices[search_pos] == col2) if (row_indices[search_pos] == col2)
{ {
loc2 = search_pos; loc2 = search_pos;
break; // No need to look any further. break; // No need to look any further.
skipping to change at line 1609 skipping to change at line 1596
{ {
// This is an easy case: just swap the values. No index modifying ne cessary. // This is an easy case: just swap the values. No index modifying ne cessary.
eT tmp = values[loc1]; eT tmp = values[loc1];
access::rw(values[loc1]) = values[loc2]; access::rw(values[loc1]) = values[loc2];
access::rw(values[loc2]) = tmp; access::rw(values[loc2]) = tmp;
} }
else if (loc1 != (n_nonzero + 1)) // We only found loc1 and not loc2. else if (loc1 != (n_nonzero + 1)) // We only found loc1 and not loc2.
{ {
// We need to find the correct place to move our value to. It will b e forward (not backwards) because in_row2 > in_row1. // We need to find the correct place to move our value to. It will b e forward (not backwards) because in_row2 > in_row1.
// Each iteration of the loop swaps the current value (loc1) with (lo c1 + 1); in this manner we move our value down to where it should be. // Each iteration of the loop swaps the current value (loc1) with (lo c1 + 1); in this manner we move our value down to where it should be.
while (((loc1 + 1) < col_ptrs[col + 1]) && (row_indices[loc1 + 1] < i n_row2)) while (((loc1 + 1) < col_ptrs[lcol + 1]) && (row_indices[loc1 + 1] < in_row2))
{ {
// Swap both the values and the indices. The column should not cha nge. // Swap both the values and the indices. The column should not cha nge.
eT tmp = values[loc1]; eT tmp = values[loc1];
access::rw(values[loc1]) = values[loc1 + 1]; access::rw(values[loc1]) = values[loc1 + 1];
access::rw(values[loc1 + 1]) = tmp; access::rw(values[loc1 + 1]) = tmp;
uword tmp_index = row_indices[loc1]; uword tmp_index = row_indices[loc1];
access::rw(row_indices[loc1]) = row_indices[loc1 + 1]; access::rw(row_indices[loc1]) = row_indices[loc1 + 1];
access::rw(row_indices[loc1 + 1]) = tmp_index; access::rw(row_indices[loc1 + 1]) = tmp_index;
skipping to change at line 1631 skipping to change at line 1618
} }
// Now set the row index correctly. // Now set the row index correctly.
access::rw(row_indices[loc1]) = in_row2; access::rw(row_indices[loc1]) = in_row2;
} }
else if (loc2 != (n_nonzero + 1)) else if (loc2 != (n_nonzero + 1))
{ {
// We need to find the correct place to move our value to. It will b e backwards (not forwards) because in_row1 < in_row2. // We need to find the correct place to move our value to. It will b e backwards (not forwards) because in_row1 < in_row2.
// Each iteration of the loop swaps the current value (loc2) with (lo c2 - 1); in this manner we move our value up to where it should be. // Each iteration of the loop swaps the current value (loc2) with (lo c2 - 1); in this manner we move our value up to where it should be.
while (((loc2 - 1) >= col_ptrs[col]) && (row_indices[loc2 - 1] > in_r ow1)) while (((loc2 - 1) >= col_ptrs[lcol]) && (row_indices[loc2 - 1] > in_ row1))
{ {
// Swap both the values and the indices. The column should not cha nge. // Swap both the values and the indices. The column should not cha nge.
eT tmp = values[loc2]; eT tmp = values[loc2];
access::rw(values[loc2]) = values[loc2 - 1]; access::rw(values[loc2]) = values[loc2 - 1];
access::rw(values[loc2 - 1]) = tmp; access::rw(values[loc2 - 1]) = tmp;
uword tmp_index = row_indices[loc2]; uword tmp_index = row_indices[loc2];
access::rw(row_indices[loc2]) = row_indices[loc2 - 1]; access::rw(row_indices[loc2]) = row_indices[loc2 - 1];
access::rw(row_indices[loc2 - 1]) = tmp_index; access::rw(row_indices[loc2 - 1]) = tmp_index;
skipping to change at line 1664 skipping to change at line 1651
* Swap in_col1 with in_col2. * Swap in_col1 with in_col2.
*/ */
template<typename eT> template<typename eT>
inline inline
void void
SpMat<eT>::swap_cols(const uword in_col1, const uword in_col2) SpMat<eT>::swap_cols(const uword in_col1, const uword in_col2)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
// slow but works // slow but works
for(uword row = 0; row < n_rows; ++row) for(uword lrow = 0; lrow < n_rows; ++lrow)
{ {
eT tmp = at(row, in_col1); eT tmp = at(lrow, in_col1);
at(row, in_col1) = at(row, in_col2); at(lrow, in_col1) = at(lrow, in_col2);
at(row, in_col2) = tmp; at(lrow, in_col2) = tmp;
} }
} }
/** /**
* Remove the row row_num. * Remove the row row_num.
*/ */
template<typename eT> template<typename eT>
inline inline
void void
SpMat<eT>::shed_row(const uword row_num) SpMat<eT>::shed_row(const uword row_num)
skipping to change at line 1726 skipping to change at line 1713
uword i, j; uword i, j;
// Store the length of values // Store the length of values
uword vlength = n_nonzero; uword vlength = n_nonzero;
// Store the length of col_ptrs // Store the length of col_ptrs
uword clength = n_cols + 1; uword clength = n_cols + 1;
// This is O(n * n_cols) and inplace, there may be a faster way, though. // This is O(n * n_cols) and inplace, there may be a faster way, though.
for (i = 0, j = 0; i < vlength; ++i) for (i = 0, j = 0; i < vlength; ++i)
{ {
// Store the row of the ith element. // Store the row of the ith element.
const uword row = row_indices[i]; const uword lrow = row_indices[i];
// Is the ith element in the range of rows we want to remove? // Is the ith element in the range of rows we want to remove?
if (row >= in_row1 && row <= in_row2) if (lrow >= in_row1 && lrow <= in_row2)
{ {
// Increment our "removed elements" counter. // Increment our "removed elements" counter.
++j; ++j;
// Adjust the values of col_ptrs each time we remove an element. // Adjust the values of col_ptrs each time we remove an element.
// Basically, the length of one column reduces by one, and everything to // Basically, the length of one column reduces by one, and everything to
// its right gets reduced by one to represent all the elements being // its right gets reduced by one to represent all the elements being
// shifted to the left by one. // shifted to the left by one.
for(uword k = 0; k < clength; ++k) for(uword k = 0; k < clength; ++k)
{ {
skipping to change at line 1752 skipping to change at line 1739
} }
} }
} }
else else
{ {
// We shift the element we checked to the left by how many elements // We shift the element we checked to the left by how many elements
// we have removed. // we have removed.
// j = 0 until we remove the first element. // j = 0 until we remove the first element.
if (j != 0) if (j != 0)
{ {
access::rw(row_indices[i - j]) = (row > in_row2) ? (row - (in_row2 - in_row1 + 1)) : row; access::rw(row_indices[i - j]) = (lrow > in_row2) ? (lrow - (in_row 2 - in_row1 + 1)) : lrow;
access::rw(values[i - j]) = values[i]; access::rw(values[i - j]) = values[i];
} }
} }
} }
// j is the number of elements removed. // j is the number of elements removed.
// Shrink the vectors. This will copy the memory. // Shrink the vectors. This will copy the memory.
mem_resize(n_nonzero - j); mem_resize(n_nonzero - j);
skipping to change at line 2758 skipping to change at line 2745
// paranoia, but better be safe than sorry // paranoia, but better be safe than sorry
if( (index_left < index_new) && (index_new < index_right) ) if( (index_left < index_new) && (index_new < index_right) )
{ {
indices[i] = index_new; indices[i] = index_new;
} }
} }
uword cur_index = 0; uword cur_index = 0;
uword count = 0; uword count = 0;
for(uword col = 0; col < in_cols; ++col) for(uword lcol = 0; lcol < in_cols; ++lcol)
for(uword row = 0; row < in_rows; ++row) for(uword lrow = 0; lrow < in_rows; ++lrow)
{ {
if(count == indices[cur_index]) if(count == indices[cur_index])
{ {
access::rw(row_indices[cur_index]) = row; access::rw(row_indices[cur_index]) = lrow;
access::rw(col_ptrs[col + 1])++; access::rw(col_ptrs[lcol + 1])++;
++cur_index; ++cur_index;
} }
++count; ++count;
} }
if(cur_index != n_nonzero) if(cur_index != n_nonzero)
{ {
// Fix size to correct size. // Fix size to correct size.
mem_resize(cur_index); mem_resize(cur_index);
} }
// Sum column pointers. // Sum column pointers.
for(uword col = 1; col <= in_cols; ++col) for(uword lcol = 1; lcol <= in_cols; ++lcol)
{ {
access::rw(col_ptrs[col]) += col_ptrs[col - 1]; access::rw(col_ptrs[lcol]) += col_ptrs[lcol - 1];
} }
return *this; return *this;
} }
template<typename eT> template<typename eT>
inline inline
const SpMat<eT>& const SpMat<eT>&
SpMat<eT>::sprandn(const uword in_rows, const uword in_cols, const double d ensity) SpMat<eT>::sprandn(const uword in_rows, const uword in_cols, const double d ensity)
{ {
skipping to change at line 2833 skipping to change at line 2820
// paranoia, but better be safe than sorry // paranoia, but better be safe than sorry
if( (index_left < index_new) && (index_new < index_right) ) if( (index_left < index_new) && (index_new < index_right) )
{ {
indices[i] = index_new; indices[i] = index_new;
} }
} }
uword cur_index = 0; uword cur_index = 0;
uword count = 0; uword count = 0;
for(uword col = 0; col < in_cols; ++col) for(uword lcol = 0; lcol < in_cols; ++lcol)
for(uword row = 0; row < in_rows; ++row) for(uword lrow = 0; lrow < in_rows; ++lrow)
{ {
if(count == indices[cur_index]) if(count == indices[cur_index])
{ {
access::rw(row_indices[cur_index]) = row; access::rw(row_indices[cur_index]) = lrow;
access::rw(col_ptrs[col + 1])++; access::rw(col_ptrs[lcol + 1])++;
++cur_index; ++cur_index;
} }
++count; ++count;
} }
if(cur_index != n_nonzero) if(cur_index != n_nonzero)
{ {
// Fix size to correct size. // Fix size to correct size.
mem_resize(cur_index); mem_resize(cur_index);
} }
// Sum column pointers. // Sum column pointers.
for(uword col = 1; col <= in_cols; ++col) for(uword lcol = 1; lcol <= in_cols; ++lcol)
{ {
access::rw(col_ptrs[col]) += col_ptrs[col - 1]; access::rw(col_ptrs[lcol]) += col_ptrs[lcol - 1];
} }
return *this; return *this;
} }
template<typename eT> template<typename eT>
inline inline
void void
SpMat<eT>::reset() SpMat<eT>::reset()
{ {
skipping to change at line 3474 skipping to change at line 3461
line_start = line_end + 1; line_start = line_end + 1;
} }
set_size(t_n_rows, t_n_cols); set_size(t_n_rows, t_n_cols);
// Second time through will pick up all the values. // Second time through will pick up all the values.
line_start = 0; line_start = 0;
line_end = 0; line_end = 0;
uword row = 0; uword lrow = 0;
while (line_start < text.length()) while (line_start < text.length())
{ {
line_end = text.find(';', line_start); line_end = text.find(';', line_start);
if (line_end == std::string::npos) if (line_end == std::string::npos)
line_end = text.length() - 1; line_end = text.length() - 1;
std::string::size_type line_len = line_end - line_start + 1; std::string::size_type line_len = line_end - line_start + 1;
std::stringstream line_stream(text.substr(line_start, line_len)); std::stringstream line_stream(text.substr(line_start, line_len));
uword col = 0; uword lcol = 0;
eT val; eT val;
while (line_stream >> val) while (line_stream >> val)
{ {
// Only add nonzero elements. // Only add nonzero elements.
if (val != eT(0)) if (val != eT(0))
{ {
get_value(row, col) = val; get_value(lrow, lcol) = val;
} }
++col; ++lcol;
} }
++row; ++lrow;
line_start = line_end + 1; line_start = line_end + 1;
} }
} }
/** /**
* Copy from another matrix. * Copy from another matrix.
*/ */
template<typename eT> template<typename eT>
skipping to change at line 3576 skipping to change at line 3563
const uword n_alloc = memory::enlarge_to_mult_of_chunksize(n_nonzero) ; const uword n_alloc = memory::enlarge_to_mult_of_chunksize(n_nonzero) ;
if(n_alloc < new_n_nonzero) if(n_alloc < new_n_nonzero)
{ {
eT* new_values = memory::acquire_chunked<eT> (new_n_nonze ro + 1); eT* new_values = memory::acquire_chunked<eT> (new_n_nonze ro + 1);
uword* new_row_indices = memory::acquire_chunked<uword>(new_n_nonze ro + 1); uword* new_row_indices = memory::acquire_chunked<uword>(new_n_nonze ro + 1);
if(n_nonzero > 0) if(n_nonzero > 0)
{ {
// Copy old elements. // Copy old elements.
uword copy_size = std::min(n_nonzero, new_n_nonzero); uword copy_len = std::min(n_nonzero, new_n_nonzero);
arrayops::copy(new_values, values, copy_size); arrayops::copy(new_values, values, copy_len);
arrayops::copy(new_row_indices, row_indices, copy_size); arrayops::copy(new_row_indices, row_indices, copy_len);
} }
memory::release(values); memory::release(values);
memory::release(row_indices); memory::release(row_indices);
access::rw(values) = new_values; access::rw(values) = new_values;
access::rw(row_indices) = new_row_indices; access::rw(row_indices) = new_row_indices;
} }
// Set the "fake end" of the matrix by setting the last value and row // Set the "fake end" of the matrix by setting the last value and row
skipping to change at line 3908 skipping to change at line 3895
} }
template<typename eT> template<typename eT>
inline inline
arma_hot arma_hot
arma_warn_unused arma_warn_unused
SpValProxy<SpMat<eT> > SpValProxy<SpMat<eT> >
SpMat<eT>::get_value(const uword i) SpMat<eT>::get_value(const uword i)
{ {
// First convert to the actual location. // First convert to the actual location.
uword col = i / n_rows; // Integer division. uword lcol = i / n_rows; // Integer division.
uword row = i % n_rows; uword lrow = i % n_rows;
return get_value(row, col); return get_value(lrow, lcol);
} }
template<typename eT> template<typename eT>
inline inline
arma_hot arma_hot
arma_warn_unused arma_warn_unused
eT eT
SpMat<eT>::get_value(const uword i) const SpMat<eT>::get_value(const uword i) const
{ {
// First convert to the actual location. // First convert to the actual location.
uword col = i / n_rows; // Integer division. uword lcol = i / n_rows; // Integer division.
uword row = i % n_rows; uword lrow = i % n_rows;
return get_value(row, col); return get_value(lrow, lcol);
} }
template<typename eT> template<typename eT>
inline inline
arma_hot arma_hot
arma_warn_unused arma_warn_unused
SpValProxy<SpMat<eT> > SpValProxy<SpMat<eT> >
SpMat<eT>::get_value(const uword in_row, const uword in_col) SpMat<eT>::get_value(const uword in_row, const uword in_col)
{ {
const uword colptr = col_ptrs[in_col]; const uword colptr = col_ptrs[in_col];
skipping to change at line 4004 skipping to change at line 3991
* Given the index representing which of the nonzero values this is, return its * Given the index representing which of the nonzero values this is, return its
* actual location, either in row/col or just the index. * actual location, either in row/col or just the index.
*/ */
template<typename eT> template<typename eT>
arma_hot arma_hot
arma_inline arma_inline
arma_warn_unused arma_warn_unused
uword uword
SpMat<eT>::get_position(const uword i) const SpMat<eT>::get_position(const uword i) const
{ {
uword row, col; uword lrow, lcol;
get_position(i, row, col); get_position(i, lrow, lcol);
// Assemble the row/col into the element's location in the matrix. // Assemble the row/col into the element's location in the matrix.
return (row + n_rows * col); return (lrow + n_rows * lcol);
} }
template<typename eT> template<typename eT>
arma_hot arma_hot
arma_inline arma_inline
void void
SpMat<eT>::get_position(const uword i, uword& row_of_i, uword& col_of_i) co nst SpMat<eT>::get_position(const uword i, uword& row_of_i, uword& col_of_i) co nst
{ {
arma_debug_check((i >= n_nonzero), "SpMat::get_position(): index out of b ounds"); arma_debug_check((i >= n_nonzero), "SpMat::get_position(): index out of b ounds");
 End of changes. 46 change blocks. 
75 lines changed or deleted 62 lines changed or added


 SpOp_bones.hpp   SpOp_bones.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 SpOp //! \addtogroup SpOp
//! @{ //! @{
template<typename T1, typename op_type> template<typename T1, typename op_type>
class SpOp : public SpBase<typename T1::elem_type, SpOp<T1, op_type> > class SpOp : public SpBase<typename T1::elem_type, SpOp<T1, op_type> >
{ {
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 SpOp_meat.hpp   SpOp_meat.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 SpOp //! \addtogroup SpOp
//! @{ //! @{
template<typename T1, typename op_type> template<typename T1, typename op_type>
inline inline
SpOp<T1, op_type>::SpOp(const T1& in_m) SpOp<T1, op_type>::SpOp(const T1& in_m)
: m(in_m) : m(in_m)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 SpProxy.hpp   SpProxy.hpp 
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 SpProxy //! \addtogroup SpProxy
//! @{ //! @{
template<typename eT> template<typename eT>
class SpProxy< SpMat<eT> > class SpProxy< SpMat<eT> >
{ {
public: public:
typedef eT elem_type; typedef eT elem_type;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 SpRow_bones.hpp   SpRow_bones.hpp 
// Copyright (C) 2011-2012 Ryan Curtin // Copyright (C) 2011-2012 Ryan Curtin
// Copyright (C) 2011 Matthew Amidon // Copyright (C) 2011 Matthew Amidon
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 SpRow //! \addtogroup SpRow
//! @{ //! @{
//! Class for sparse row vectors (sparse matrices with only one row) //! Class for sparse row vectors (sparse matrices with only one row)
template<typename eT> template<typename eT>
class SpRow : public SpMat<eT> class SpRow : public SpMat<eT>
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 SpRow_meat.hpp   SpRow_meat.hpp 
// Copyright (C) 2011-2012 Ryan Curtin // Copyright (C) 2011-2012 Ryan Curtin
// Copyright (C) 2011 Matthew Amidon // Copyright (C) 2011 Matthew Amidon
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 SpRow //! \addtogroup SpRow
//! @{ //! @{
template<typename eT> template<typename eT>
inline inline
SpRow<eT>::SpRow() SpRow<eT>::SpRow()
: SpMat<eT>(1, 0) : SpMat<eT>(1, 0)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 SpSubview_bones.hpp   SpSubview_bones.hpp 
// Copyright (C) 2011-2012 Ryan Curtin // Copyright (C) 2011-2012 Ryan Curtin
// Copyright (C) 2011 Matthew Amidon // Copyright (C) 2011 Matthew Amidon
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 SpSubview //! \addtogroup SpSubview
//! @{ //! @{
template<typename eT> template<typename eT>
class SpSubview : public SpBase<eT, SpSubview<eT> > class SpSubview : public SpBase<eT, SpSubview<eT> >
{ {
public: public:
const SpMat<eT>& m; const SpMat<eT>& m;
skipping to change at line 237 skipping to change at line 232
inline bool operator!=(const typename SpMat<eT>::const_row_iterator& rh s) const; inline bool operator!=(const typename SpMat<eT>::const_row_iterator& rh s) const;
inline bool operator==(const typename SpMat<eT>::const_row_iterator& rh s) const; inline bool operator==(const typename SpMat<eT>::const_row_iterator& rh s) const;
}; };
class iterator : public const_iterator class iterator : public const_iterator
{ {
public: public:
inline iterator(SpSubview& in_M, const uword initial_pos = 0) : const_i terator(in_M, initial_pos) { } inline iterator(SpSubview& in_M, const uword initial_pos = 0) : const_i terator(in_M, initial_pos) { }
inline iterator(SpSubview& in_M, const uword in_row, const uword in_col ) : const_iterator(in_M, in_row, in_col) { } inline iterator(SpSubview& in_M, const uword in_row, const uword in_col ) : const_iterator(in_M, in_row, in_col) { }
inline iterator(SpSubview& in_M, const uword in_row, const uword in_col , const uword in_pos, const uword skip_pos) : const_iterator(in_M, in_row, in_col, in_pos, skip_pos) { } inline iterator(SpSubview& in_M, const uword in_row, const uword in_col , const uword in_pos, const uword in_skip_pos) : const_iterator(in_M, in_ro w, in_col, in_pos, in_skip_pos) { }
inline iterator(const iterator& other) : const_iterator(other) { } inline iterator(const iterator& other) : const_iterator(other) { }
inline SpValProxy<SpSubview<eT> > operator*(); inline SpValProxy<SpSubview<eT> > operator*();
// overloads needed for return type correctness // overloads needed for return type correctness
inline iterator& operator++(); inline iterator& operator++();
inline iterator operator++(int); inline iterator operator++(int);
inline iterator& operator--(); inline iterator& operator--();
inline iterator operator--(int); inline iterator operator--(int);
 End of changes. 2 change blocks. 
9 lines changed or deleted 4 lines changed or added


 SpSubview_iterators_meat.hpp   SpSubview_iterators_meat.hpp 
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 SpSubview //! \addtogroup SpSubview
//! @{ //! @{
/////////////////////////////////////////////////////////////////////////// //// /////////////////////////////////////////////////////////////////////////// ////
// SpSubview::iterator_base implementation // // SpSubview::iterator_base implementation //
/////////////////////////////////////////////////////////////////////////// //// /////////////////////////////////////////////////////////////////////////// ////
template<typename eT> template<typename eT>
inline inline
skipping to change at line 33 skipping to change at line 28
: M(in_M) : M(in_M)
, internal_col(0) , internal_col(0)
, internal_pos(0) , internal_pos(0)
, skip_pos(0) , skip_pos(0)
{ {
// Technically this iterator is invalid (it may not point to a real eleme nt). // Technically this iterator is invalid (it may not point to a real eleme nt).
} }
template<typename eT> template<typename eT>
inline inline
SpSubview<eT>::iterator_base::iterator_base(const SpSubview<eT>& in_M, cons t uword col, const uword pos, const uword skip_pos) SpSubview<eT>::iterator_base::iterator_base(const SpSubview<eT>& in_M, cons t uword in_col, const uword in_pos, const uword in_skip_pos)
: M(in_M) : M(in_M)
, internal_col(col) , internal_col(in_col)
, internal_pos(pos) , internal_pos(in_pos)
, skip_pos(skip_pos) , skip_pos (in_skip_pos)
{ {
// Nothing to do. // Nothing to do.
} }
template<typename eT> template<typename eT>
inline inline
eT eT
SpSubview<eT>::iterator_base::operator*() const SpSubview<eT>::iterator_base::operator*() const
{ {
return M.m.values[internal_pos + skip_pos]; return M.m.values[internal_pos + skip_pos];
skipping to change at line 63 skipping to change at line 58
template<typename eT> template<typename eT>
inline inline
SpSubview<eT>::const_iterator::const_iterator(const SpSubview<eT>& in_M, co nst uword initial_pos) SpSubview<eT>::const_iterator::const_iterator(const SpSubview<eT>& in_M, co nst uword initial_pos)
: iterator_base(in_M, 0, initial_pos, 0) : iterator_base(in_M, 0, initial_pos, 0)
{ {
// Corner case for empty subviews. // Corner case for empty subviews.
if(in_M.n_nonzero == 0) if(in_M.n_nonzero == 0)
{ {
iterator_base::internal_col = in_M.n_cols; iterator_base::internal_col = in_M.n_cols;
iterator_base::skip_pos = in_M.m.n_nonzero; iterator_base::skip_pos = in_M.m.n_nonzero;
return; return;
} }
// Figure out the row and column of the position. // Figure out the row and column of the position.
// skip_pos holds the number of values which aren't part of this subview. // lskip_pos holds the number of values which aren't part of this subview .
const uword aux_col = iterator_base::M.aux_col1; const uword aux_col = iterator_base::M.aux_col1;
const uword aux_row = iterator_base::M.aux_row1; const uword aux_row = iterator_base::M.aux_row1;
const uword n_rows = iterator_base::M.n_rows; const uword ln_rows = iterator_base::M.n_rows;
const uword n_cols = iterator_base::M.n_cols; const uword ln_cols = iterator_base::M.n_cols;
uword cur_pos = 0; // off by one because we might be searching for pos 0 uword cur_pos = 0; // off by one because we might be searching for pos
uword skip_pos = iterator_base::M.m.col_ptrs[aux_col]; 0
uword cur_col = 0; uword lskip_pos = iterator_base::M.m.col_ptrs[aux_col];
uword cur_col = 0;
while(cur_pos < (iterator_base::internal_pos + 1)) while(cur_pos < (iterator_base::internal_pos + 1))
{ {
// Have we stepped forward a column (or multiple columns)? // Have we stepped forward a column (or multiple columns)?
while(((skip_pos + cur_pos) >= iterator_base::M.m.col_ptrs[cur_col + au x_col + 1]) && (cur_col < n_cols)) while(((lskip_pos + cur_pos) >= iterator_base::M.m.col_ptrs[cur_col + a ux_col + 1]) && (cur_col < ln_cols))
{ {
++cur_col; ++cur_col;
} }
// See if the current position is in the subview. // See if the current position is in the subview.
const uword row_index = iterator_base::M.m.row_indices[cur_pos + skip_p os]; const uword row_index = iterator_base::M.m.row_indices[cur_pos + lskip_ pos];
if(row_index < aux_row) if(row_index < aux_row)
{ {
++skip_pos; // not valid ++lskip_pos; // not valid
} }
else if(row_index < (aux_row + n_rows)) else if(row_index < (aux_row + ln_rows))
{ {
++cur_pos; // valid, in the subview ++cur_pos; // valid, in the subview
} }
else else
{ {
// skip to end of column // skip to end of column
const uword next_colptr = iterator_base::M.m.col_ptrs[cur_col + aux_c ol + 1]; const uword next_colptr = iterator_base::M.m.col_ptrs[cur_col + aux_c ol + 1];
skip_pos += (next_colptr - (cur_pos + skip_pos)); lskip_pos += (next_colptr - (cur_pos + lskip_pos));
} }
} }
iterator_base::internal_col = cur_col; iterator_base::internal_col = cur_col;
iterator_base::skip_pos = skip_pos; iterator_base::skip_pos = lskip_pos;
} }
template<typename eT> template<typename eT>
inline inline
SpSubview<eT>::const_iterator::const_iterator(const SpSubview<eT>& in_M, co nst uword in_row, const uword in_col) SpSubview<eT>::const_iterator::const_iterator(const SpSubview<eT>& in_M, co nst uword in_row, const uword in_col)
: iterator_base(in_M, in_col, 0, 0) : iterator_base(in_M, in_col, 0, 0)
{ {
// Corner case for empty subviews. // Corner case for empty subviews.
if(in_M.n_nonzero == 0) if(in_M.n_nonzero == 0)
{ {
// We must be at the last position. // We must be at the last position.
iterator_base::internal_col = in_M.n_cols; iterator_base::internal_col = in_M.n_cols;
iterator_base::skip_pos = in_M.m.n_nonzero; iterator_base::skip_pos = in_M.m.n_nonzero;
return; return;
} }
// We have a destination we want to be just after, but don't know what po sition that is. // We have a destination we want to be just after, but don't know what po sition that is.
// Because we have to count the points in this subview and not in this su bview, this becomes a little difficult and slow. // Because we have to count the points in this subview and not in this su bview, this becomes a little difficult and slow.
const uword aux_col = iterator_base::M.aux_col1; const uword aux_col = iterator_base::M.aux_col1;
const uword aux_row = iterator_base::M.aux_row1; const uword aux_row = iterator_base::M.aux_row1;
const uword n_rows = iterator_base::M.n_rows; const uword ln_rows = iterator_base::M.n_rows;
const uword n_cols = iterator_base::M.n_cols; const uword ln_cols = iterator_base::M.n_cols;
uword cur_pos = 0; uword cur_pos = 0;
uword skip_pos = iterator_base::M.m.col_ptrs[aux_col]; uword skip_pos = iterator_base::M.m.col_ptrs[aux_col];
uword cur_col = 0; uword cur_col = 0;
while(cur_col < in_col) while(cur_col < in_col)
{ {
// See if the current position is in the subview. // See if the current position is in the subview.
const uword row_index = iterator_base::M.m.row_indices[cur_pos + skip_p os]; const uword row_index = iterator_base::M.m.row_indices[cur_pos + skip_p os];
if(row_index < aux_row) if(row_index < aux_row)
{ {
++skip_pos; ++skip_pos;
} }
else if(row_index < (aux_row + n_rows)) else if(row_index < (aux_row + ln_rows))
{ {
++cur_pos; ++cur_pos;
} }
else else
{ {
// skip to end of column // skip to end of column
const uword next_colptr = iterator_base::M.m.col_ptrs[cur_col + aux_c ol + 1]; const uword next_colptr = iterator_base::M.m.col_ptrs[cur_col + aux_c ol + 1];
skip_pos += (next_colptr - (cur_pos + skip_pos)); skip_pos += (next_colptr - (cur_pos + skip_pos));
} }
// Have we stepped forward a column (or multiple columns)? // Have we stepped forward a column (or multiple columns)?
while(((skip_pos + cur_pos) >= iterator_base::M.m.col_ptrs[cur_col + au x_col + 1]) && (cur_col < n_cols)) while(((skip_pos + cur_pos) >= iterator_base::M.m.col_ptrs[cur_col + au x_col + 1]) && (cur_col < ln_cols))
{ {
++cur_col; ++cur_col;
} }
} }
// Now we are either on the right column or ahead of it. // Now we are either on the right column or ahead of it.
if(cur_col == in_col) if(cur_col == in_col)
{ {
// We have to find the right row index. // We have to find the right row index.
uword row_index = iterator_base::M.m.row_indices[cur_pos + skip_pos]; uword row_index = iterator_base::M.m.row_indices[cur_pos + skip_pos];
skipping to change at line 176 skipping to change at line 171
if(row_index < aux_row) if(row_index < aux_row)
{ {
++skip_pos; ++skip_pos;
} }
else else
{ {
++cur_pos; ++cur_pos;
} }
// Ensure we didn't step forward a column; if we did, we need to stop . // Ensure we didn't step forward a column; if we did, we need to stop .
while(((skip_pos + cur_pos) >= iterator_base::M.m.col_ptrs[cur_col + aux_col + 1]) && (cur_col < n_cols)) while(((skip_pos + cur_pos) >= iterator_base::M.m.col_ptrs[cur_col + aux_col + 1]) && (cur_col < ln_cols))
{ {
++cur_col; ++cur_col;
} }
if(cur_col != in_col) if(cur_col != in_col)
{ {
break; break;
} }
row_index = iterator_base::M.m.row_indices[cur_pos + skip_pos]; row_index = iterator_base::M.m.row_indices[cur_pos + skip_pos];
skipping to change at line 198 skipping to change at line 193
} }
// Now we need to find the next valid position in the subview. // Now we need to find the next valid position in the subview.
uword row_index; uword row_index;
while(true) while(true)
{ {
const uword next_colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col + 1]; const uword next_colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col + 1];
row_index = iterator_base::M.m.row_indices[cur_pos + skip_pos]; row_index = iterator_base::M.m.row_indices[cur_pos + skip_pos];
// Are we at the last position? // Are we at the last position?
if(cur_col >= n_cols) if(cur_col >= ln_cols)
{ {
cur_col = n_cols; cur_col = ln_cols;
// Make sure we will be pointing at the last element in the parent ma trix. // Make sure we will be pointing at the last element in the parent ma trix.
skip_pos = iterator_base::M.m.n_nonzero - iterator_base::M.n_nonzero; skip_pos = iterator_base::M.m.n_nonzero - iterator_base::M.n_nonzero;
break; break;
} }
if(row_index < aux_row) if(row_index < aux_row)
{ {
++skip_pos; ++skip_pos;
} }
else if(row_index < (aux_row + n_rows)) else if(row_index < (aux_row + ln_rows))
{ {
break; // found break; // found
} }
else else
{ {
skip_pos += (next_colptr - (cur_pos + skip_pos)); skip_pos += (next_colptr - (cur_pos + skip_pos));
} }
// Did we move any columns? // Did we move any columns?
while(((skip_pos + cur_pos) >= iterator_base::M.m.col_ptrs[cur_col + au x_col + 1]) && (cur_col < n_cols)) while(((skip_pos + cur_pos) >= iterator_base::M.m.col_ptrs[cur_col + au x_col + 1]) && (cur_col < ln_cols))
{ {
++cur_col; ++cur_col;
} }
} }
// It is possible we have moved another column. // It is possible we have moved another column.
while(((skip_pos + cur_pos) >= iterator_base::M.m.col_ptrs[cur_col + aux_ col + 1]) && (cur_col < n_cols)) while(((skip_pos + cur_pos) >= iterator_base::M.m.col_ptrs[cur_col + aux_ col + 1]) && (cur_col < ln_cols))
{ {
++cur_col; ++cur_col;
} }
iterator_base::internal_pos = cur_pos; iterator_base::internal_pos = cur_pos;
iterator_base::skip_pos = skip_pos; iterator_base::skip_pos = skip_pos;
iterator_base::internal_col = cur_col; iterator_base::internal_col = cur_col;
} }
template<typename eT> template<typename eT>
inline inline
SpSubview<eT>::const_iterator::const_iterator(const SpSubview<eT>& in_M, uw SpSubview<eT>::const_iterator::const_iterator(const SpSubview<eT>& in_M, uw
ord in_row, uword in_col, uword in_pos, uword skip_pos) ord in_row, uword in_col, uword in_pos, uword in_skip_pos)
: iterator_base(in_M, in_col, in_pos, skip_pos) : iterator_base(in_M, in_col, in_pos, in_skip_pos)
{ {
// Nothing to do. // Nothing to do.
} }
template<typename eT> template<typename eT>
inline inline
SpSubview<eT>::const_iterator::const_iterator(const const_iterator& other) SpSubview<eT>::const_iterator::const_iterator(const const_iterator& other)
: iterator_base(other.M, other.internal_col, other.internal_pos, other.sk ip_pos) : iterator_base(other.M, other.internal_col, other.internal_pos, other.sk ip_pos)
{ {
// Nothing to do. // Nothing to do.
} }
template<typename eT> template<typename eT>
inline inline
typename SpSubview<eT>::const_iterator& typename SpSubview<eT>::const_iterator&
SpSubview<eT>::const_iterator::operator++() SpSubview<eT>::const_iterator::operator++()
{ {
const uword aux_col = iterator_base::M.aux_col1; const uword aux_col = iterator_base::M.aux_col1;
const uword aux_row = iterator_base::M.aux_row1; const uword aux_row = iterator_base::M.aux_row1;
const uword n_rows = iterator_base::M.n_rows; const uword ln_rows = iterator_base::M.n_rows;
const uword n_cols = iterator_base::M.n_cols; const uword ln_cols = iterator_base::M.n_cols;
uword cur_col = iterator_base::internal_col; uword cur_col = iterator_base::internal_col;
uword cur_pos = iterator_base::internal_pos + 1; uword cur_pos = iterator_base::internal_pos + 1;
uword skip_pos = iterator_base::skip_pos; uword lskip_pos = iterator_base::skip_pos;
uword row_index; uword row_index;
while(true) while(true)
{ {
const uword next_colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col + 1]; const uword next_colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col + 1];
row_index = iterator_base::M.m.row_indices[cur_pos + skip_pos]; row_index = iterator_base::M.m.row_indices[cur_pos + lskip_pos];
// Did we move any columns? // Did we move any columns?
while((cur_col < n_cols) && ((skip_pos + cur_pos) >= iterator_base::M.m .col_ptrs[cur_col + aux_col + 1])) while((cur_col < ln_cols) && ((lskip_pos + cur_pos) >= iterator_base::M .m.col_ptrs[cur_col + aux_col + 1]))
{ {
++cur_col; ++cur_col;
} }
// Are we at the last position? // Are we at the last position?
if(cur_col >= n_cols) if(cur_col >= ln_cols)
{ {
cur_col = n_cols; cur_col = ln_cols;
// Make sure we will be pointing at the last element in the parent ma trix. // Make sure we will be pointing at the last element in the parent ma trix.
skip_pos = iterator_base::M.m.n_nonzero - iterator_base::M.n_nonzero; lskip_pos = iterator_base::M.m.n_nonzero - iterator_base::M.n_nonzero ;
break; break;
} }
if(row_index < aux_row) if(row_index < aux_row)
{ {
++skip_pos; ++lskip_pos;
} }
else if(row_index < (aux_row + n_rows)) else if(row_index < (aux_row + ln_rows))
{ {
break; // found break; // found
} }
else else
{ {
skip_pos += (next_colptr - (cur_pos + skip_pos)); lskip_pos += (next_colptr - (cur_pos + lskip_pos));
} }
} }
iterator_base::internal_pos = cur_pos; iterator_base::internal_pos = cur_pos;
iterator_base::internal_col = cur_col; iterator_base::internal_col = cur_col;
iterator_base::skip_pos = skip_pos; iterator_base::skip_pos = lskip_pos;
return *this; return *this;
} }
template<typename eT> template<typename eT>
inline inline
typename SpSubview<eT>::const_iterator typename SpSubview<eT>::const_iterator
SpSubview<eT>::const_iterator::operator++(int) SpSubview<eT>::const_iterator::operator++(int)
{ {
typename SpSubview<eT>::const_iterator tmp(*this); typename SpSubview<eT>::const_iterator tmp(*this);
skipping to change at line 328 skipping to change at line 323
return tmp; return tmp;
} }
template<typename eT> template<typename eT>
inline inline
typename SpSubview<eT>::const_iterator& typename SpSubview<eT>::const_iterator&
SpSubview<eT>::const_iterator::operator--() SpSubview<eT>::const_iterator::operator--()
{ {
const uword aux_col = iterator_base::M.aux_col1; const uword aux_col = iterator_base::M.aux_col1;
const uword aux_row = iterator_base::M.aux_row1; const uword aux_row = iterator_base::M.aux_row1;
const uword n_rows = iterator_base::M.n_rows; const uword ln_rows = iterator_base::M.n_rows;
uword cur_col = iterator_base::internal_col; uword cur_col = iterator_base::internal_col;
uword cur_pos = iterator_base::internal_pos - 1; uword cur_pos = iterator_base::internal_pos - 1;
uword skip_pos = iterator_base::skip_pos; uword skip_pos = iterator_base::skip_pos;
// Special condition for end of iterator. // Special condition for end of iterator.
if((skip_pos + cur_pos + 1) == iterator_base::M.m.n_nonzero) if((skip_pos + cur_pos + 1) == iterator_base::M.m.n_nonzero)
{ {
// We are at the last element. So we need to set skip_pos back to what it // We are at the last element. So we need to set skip_pos back to what it
// would be if we didn't manually modify it back in operator++(). // would be if we didn't manually modify it back in operator++().
skip_pos = iterator_base::M.m.col_ptrs[cur_col + aux_col] - iterator_ba se::internal_pos; skip_pos = iterator_base::M.m.col_ptrs[cur_col + aux_col] - iterator_ba se::internal_pos;
} }
skipping to change at line 359 skipping to change at line 354
// Did we move back any columns? // Did we move back any columns?
while((skip_pos + cur_pos) < iterator_base::M.m.col_ptrs[cur_col + aux_ col]) while((skip_pos + cur_pos) < iterator_base::M.m.col_ptrs[cur_col + aux_ col])
{ {
--cur_col; --cur_col;
} }
if(row_index < aux_row) if(row_index < aux_row)
{ {
skip_pos -= (colptr - (cur_pos + skip_pos) + 1); skip_pos -= (colptr - (cur_pos + skip_pos) + 1);
} }
else if(row_index < (aux_row + n_rows)) else if(row_index < (aux_row + ln_rows))
{ {
break; // found break; // found
} }
else else
{ {
--skip_pos; --skip_pos;
} }
} }
iterator_base::internal_pos = cur_pos; iterator_base::internal_pos = cur_pos;
iterator_base::skip_pos = skip_pos; iterator_base::skip_pos = skip_pos;
iterator_base::internal_col = cur_col; iterator_base::internal_col = cur_col;
return *this; return *this;
} }
template<typename eT> template<typename eT>
inline inline
typename SpSubview<eT>::const_iterator typename SpSubview<eT>::const_iterator
SpSubview<eT>::const_iterator::operator--(int) SpSubview<eT>::const_iterator::operator--(int)
{ {
skipping to change at line 532 skipping to change at line 527
if(in_M.n_nonzero == 0) if(in_M.n_nonzero == 0)
{ {
iterator_base::internal_col = 0; iterator_base::internal_col = 0;
internal_row = in_M.n_rows; internal_row = in_M.n_rows;
iterator_base::skip_pos = in_M.m.n_nonzero; iterator_base::skip_pos = in_M.m.n_nonzero;
return; return;
} }
const uword aux_col = iterator_base::M.aux_col1; const uword aux_col = iterator_base::M.aux_col1;
const uword aux_row = iterator_base::M.aux_row1; const uword aux_row = iterator_base::M.aux_row1;
const uword n_cols = iterator_base::M.n_cols; const uword ln_cols = iterator_base::M.n_cols;
// We don't know where the elements are in each row. What we will do is // We don't know where the elements are in each row. What we will do is
// loop across all valid columns looking for elements in row 0 (and add t o // loop across all valid columns looking for elements in row 0 (and add t o
// our sum), then in row 1, and so forth, until we get to the desired // our sum), then in row 1, and so forth, until we get to the desired
// position. // position.
uword cur_pos = -1; uword cur_pos = -1;
uword cur_row = 0; uword cur_row = 0;
uword cur_col = 0; uword cur_col = 0;
while(true) while(true)
skipping to change at line 574 skipping to change at line 569
// We are done with this column. Break to the column incrementing code (directly below). // We are done with this column. Break to the column incrementing code (directly below).
break; break;
} }
else if(row_index > (cur_row + aux_row)) else if(row_index > (cur_row + aux_row))
{ {
break; // Can't be in this column. break; // Can't be in this column.
} }
} }
cur_col++; // Done with the column. Move on. cur_col++; // Done with the column. Move on.
if(cur_col == n_cols) if(cur_col == ln_cols)
{ {
// Out of columns. Loop back to the beginning and look on the next r ow. // Out of columns. Loop back to the beginning and look on the next r ow.
cur_col = 0; cur_col = 0;
cur_row++; cur_row++;
} }
} }
} }
template<typename eT> template<typename eT>
inline inline
skipping to change at line 641 skipping to change at line 636
return *this; return *this;
} }
// Otherwise, we need to search. // Otherwise, we need to search.
uword cur_col = iterator_base::internal_col; uword cur_col = iterator_base::internal_col;
uword cur_row = internal_row; uword cur_row = internal_row;
const uword aux_col = iterator_base::M.aux_col1; const uword aux_col = iterator_base::M.aux_col1;
const uword aux_row = iterator_base::M.aux_row1; const uword aux_row = iterator_base::M.aux_row1;
const uword n_cols = iterator_base::M.n_cols; const uword ln_cols = iterator_base::M.n_cols;
while(true) while(true)
{ {
// Increment the current column and see if we are on a new row. // Increment the current column and see if we are on a new row.
if(++cur_col == n_cols) if(++cur_col == ln_cols)
{ {
cur_col = 0; cur_col = 0;
++cur_row; ++cur_row;
} }
// Is there anything in this new column? // Is there anything in this new column?
const uword colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col]; const uword colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col];
const uword next_colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col + 1]; const uword next_colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col + 1];
for(uword ind = colptr; (ind < next_colptr) && (iterator_base::M.m.row_ indices[ind] <= (cur_row + aux_row)); ++ind) for(uword ind = colptr; (ind < next_colptr) && (iterator_base::M.m.row_ indices[ind] <= (cur_row + aux_row)); ++ind)
skipping to change at line 716 skipping to change at line 711
// } // }
iterator_base::internal_pos--; iterator_base::internal_pos--;
// We have to search backwards. // We have to search backwards.
uword cur_col = iterator_base::internal_col; uword cur_col = iterator_base::internal_col;
uword cur_row = internal_row; uword cur_row = internal_row;
const uword aux_col = iterator_base::M.aux_col1; const uword aux_col = iterator_base::M.aux_col1;
const uword aux_row = iterator_base::M.aux_row1; const uword aux_row = iterator_base::M.aux_row1;
const uword n_cols = iterator_base::M.n_cols; const uword ln_cols = iterator_base::M.n_cols;
while(true) while(true)
{ {
// Decrement the current column and see if we are on a new row. // Decrement the current column and see if we are on a new row.
if(--cur_col > n_cols) if(--cur_col > ln_cols)
{ {
cur_col = n_cols - 1; cur_col = ln_cols - 1;
cur_row--; cur_row--;
} }
// Is there anything in this new column? // Is there anything in this new column?
const uword colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col]; const uword colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col];
const uword next_colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col + 1]; const uword next_colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col + 1];
for(uword ind = colptr; (ind < next_colptr) && (iterator_base::M.m.row_ indices[ind] <= (cur_row + aux_row)); ++ind) for(uword ind = colptr; (ind < next_colptr) && (iterator_base::M.m.row_ indices[ind] <= (cur_row + aux_row)); ++ind)
{ {
const uword row_index = iterator_base::M.m.row_indices[ind]; const uword row_index = iterator_base::M.m.row_indices[ind];
 End of changes. 46 change blocks. 
65 lines changed or deleted 61 lines changed or added


 SpSubview_meat.hpp   SpSubview_meat.hpp 
// Copyright (C) 2011-2012 Ryan Curtin // Copyright (C) 2011-2012 Ryan Curtin
// Copyright (C) 2011 Matthew Amidon // Copyright (C) 2011 Matthew Amidon
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 SpSubview //! \addtogroup SpSubview
//! @{ //! @{
template<typename eT> template<typename eT>
arma_inline arma_inline
SpSubview<eT>::SpSubview(const SpMat<eT>& in_m, const uword in_row1, const uword in_col1, const uword in_n_rows, const uword in_n_cols) SpSubview<eT>::SpSubview(const SpMat<eT>& in_m, const uword in_row1, const uword in_col1, const uword in_n_rows, const uword in_n_cols)
: m(in_m) : m(in_m)
, aux_row1(in_row1) , aux_row1(in_row1)
, aux_col1(in_col1) , aux_col1(in_col1)
, n_rows(in_n_rows) , n_rows(in_n_rows)
, n_cols(in_n_cols) , n_cols(in_n_cols)
, n_elem(in_n_rows * in_n_cols) , n_elem(in_n_rows * in_n_cols)
, n_nonzero(0) , n_nonzero(0)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
// There must be a O(1) way to do this // There must be a O(1) way to do this
uword end = m.col_ptrs[in_col1 + in_n_cols]; uword lend = m.col_ptrs[in_col1 + in_n_cols];
uword end_row = in_row1 + in_n_rows; uword lend_row = in_row1 + in_n_rows;
uword count = 0; uword count = 0;
for(uword i = m.col_ptrs[in_col1]; i < end; ++i) for(uword i = m.col_ptrs[in_col1]; i < lend; ++i)
{ {
if(m.row_indices[i] >= in_row1 && m.row_indices[i] < end_row) if(m.row_indices[i] >= in_row1 && m.row_indices[i] < lend_row)
{ {
++count; ++count;
} }
} }
access::rw(n_nonzero) = count; access::rw(n_nonzero) = count;
} }
template<typename eT> template<typename eT>
arma_inline arma_inline
skipping to change at line 60 skipping to change at line 55
, aux_row1(in_row1) , aux_row1(in_row1)
, aux_col1(in_col1) , aux_col1(in_col1)
, n_rows(in_n_rows) , n_rows(in_n_rows)
, n_cols(in_n_cols) , n_cols(in_n_cols)
, n_elem(in_n_rows * in_n_cols) , n_elem(in_n_rows * in_n_cols)
, n_nonzero(0) , n_nonzero(0)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
// There must be a O(1) way to do this // There must be a O(1) way to do this
uword end = m.col_ptrs[in_col1 + in_n_cols]; uword lend = m.col_ptrs[in_col1 + in_n_cols];
uword end_row = in_row1 + in_n_rows; uword lend_row = in_row1 + in_n_rows;
uword count = 0; uword count = 0;
for(uword i = m.col_ptrs[in_col1]; i < end; ++i) for(uword i = m.col_ptrs[in_col1]; i < lend; ++i)
{ {
if(m.row_indices[i] >= in_row1 && m.row_indices[i] < end_row) if(m.row_indices[i] >= in_row1 && m.row_indices[i] < lend_row)
{ {
++count; ++count;
} }
} }
access::rw(n_nonzero) = count; access::rw(n_nonzero) = count;
} }
template<typename eT> template<typename eT>
inline inline
skipping to change at line 94 skipping to change at line 89
const SpSubview<eT>& const SpSubview<eT>&
SpSubview<eT>::operator+=(const eT val) SpSubview<eT>::operator+=(const eT val)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(val == eT(0)) if(val == eT(0))
{ {
return *this; return *this;
} }
const uword start_row = aux_row1; const uword lstart_row = aux_row1;
const uword end_row = aux_row1 + n_rows; const uword lend_row = aux_row1 + n_rows;
const uword start_col = aux_col1;
const uword end_col = aux_col1 + n_cols; const uword lstart_col = aux_col1;
const uword lend_col = aux_col1 + n_cols;
const uword old_n_nonzero = m.n_nonzero; const uword old_n_nonzero = m.n_nonzero;
// iterate over our part of the sparse matrix // iterate over our part of the sparse matrix
for(uword col = start_col; col < end_col; ++col) for(uword lcol = lstart_col; lcol < lend_col; ++lcol)
for(uword lrow = lstart_row; lrow < lend_row; ++lrow)
{ {
for(uword row = start_row; row < end_row; ++row) access::rw(m).at(lrow, lcol) += val;
{
access::rw(m).at(row, col) += val;
}
} }
const uword new_n_nonzero = m.n_nonzero; const uword new_n_nonzero = m.n_nonzero;
access::rw(n_nonzero) += (new_n_nonzero - old_n_nonzero); access::rw(n_nonzero) += (new_n_nonzero - old_n_nonzero);
return *this; return *this;
} }
template<typename eT> template<typename eT>
skipping to change at line 129 skipping to change at line 123
const SpSubview<eT>& const SpSubview<eT>&
SpSubview<eT>::operator-=(const eT val) SpSubview<eT>::operator-=(const eT val)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(val == eT(0)) if(val == eT(0))
{ {
return *this; return *this;
} }
const uword start_row = aux_row1; const uword lstart_row = aux_row1;
const uword end_row = aux_row1 + n_rows; const uword lend_row = aux_row1 + n_rows;
const uword start_col = aux_col1;
const uword end_col = aux_col1 + n_cols; const uword lstart_col = aux_col1;
const uword lend_col = aux_col1 + n_cols;
const uword old_n_nonzero = m.n_nonzero; const uword old_n_nonzero = m.n_nonzero;
for(uword col = start_col; col < end_col; ++col) for(uword lcol = lstart_col; lcol < lend_col; ++lcol)
for(uword lrow = lstart_row; lrow < lend_row; ++lrow)
{ {
for(uword row = start_row; row < end_row; ++row) access::rw(m).at(lrow, lcol) -= val;
{
access::rw(m).at(row, col) -= val;
}
} }
const uword new_n_nonzero = m.n_nonzero; const uword new_n_nonzero = m.n_nonzero;
access::rw(n_nonzero) += (new_n_nonzero - old_n_nonzero); access::rw(n_nonzero) += (new_n_nonzero - old_n_nonzero);
return *this; return *this;
} }
template<typename eT> template<typename eT>
skipping to change at line 170 skipping to change at line 163
// Turn it all into zeros. // Turn it all into zeros.
for(iterator it(*this); it != end(); ++it) for(iterator it(*this); it != end(); ++it)
{ {
(*it) = eT(0); // zero out the value. (*it) = eT(0); // zero out the value.
it.internal_pos--; it.internal_pos--;
} }
return *this; return *this;
} }
const uword start_row = aux_row1; const uword lstart_row = aux_row1;
const uword end_row = aux_row1 + n_rows; const uword lend_row = aux_row1 + n_rows;
const uword start_col = aux_col1;
const uword end_col = aux_col1 + n_cols; const uword lstart_col = aux_col1;
const uword lend_col = aux_col1 + n_cols;
for(uword c = start_col; c < end_col; ++c) for(uword c = lstart_col; c < lend_col; ++c)
{ {
for(uword r = m.col_ptrs[c]; r < m.col_ptrs[c + 1]; ++r) for(uword r = m.col_ptrs[c]; r < m.col_ptrs[c + 1]; ++r)
{ {
if(m.row_indices[r] >= start_row && m.row_indices[r] < end_row) if(m.row_indices[r] >= lstart_row && m.row_indices[r] < lend_row)
{ {
access::rw(m.values[r]) *= val; access::rw(m.values[r]) *= val;
} }
} }
} }
return *this; return *this;
} }
template<typename eT> template<typename eT>
inline inline
const SpSubview<eT>& const SpSubview<eT>&
SpSubview<eT>::operator/=(const eT val) SpSubview<eT>::operator/=(const eT val)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
const uword start_col = aux_col1; const uword lstart_col = aux_col1;
const uword end_col = aux_col1 + n_cols; const uword lend_col = aux_col1 + n_cols;
const uword start_row = aux_row1;
const uword end_row = aux_row1 + n_rows; const uword lstart_row = aux_row1;
const uword lend_row = aux_row1 + n_rows;
const uword old_n_nonzero = m.n_nonzero; const uword old_n_nonzero = m.n_nonzero;
for(uword c = start_col; c < end_col; ++c) for(uword c = lstart_col; c < lend_col; ++c)
for(uword r = lstart_row; r < lend_row; ++r)
{ {
for(uword r = start_row; r < end_row; ++r) access::rw(m).at(r, c) /= val;
{
access::rw(m).at(r, c) /= val;
}
} }
const uword new_n_nonzero = m.n_nonzero; const uword new_n_nonzero = m.n_nonzero;
access::rw(n_nonzero) += (new_n_nonzero - old_n_nonzero); access::rw(n_nonzero) += (new_n_nonzero - old_n_nonzero);
return *this; return *this;
} }
template<typename eT> template<typename eT>
skipping to change at line 642 skipping to change at line 635
SpSubview<eT>::operator/=(const SpBase<eT, T1>& x) SpSubview<eT>::operator/=(const SpBase<eT, T1>& x)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
SpProxy<T1> p(x.get_ref()); SpProxy<T1> p(x.get_ref());
arma_debug_assert_same_size(n_rows, n_cols, p.get_n_rows(), p.get_n_cols( ), "element-wise division"); arma_debug_assert_same_size(n_rows, n_cols, p.get_n_rows(), p.get_n_cols( ), "element-wise division");
if(p.is_alias(m) == false) if(p.is_alias(m) == false)
{ {
for(uword col = 0; col < n_cols; ++col) for(uword lcol = 0; lcol < n_cols; ++lcol)
for(uword row = 0; row < n_rows; ++row) for(uword lrow = 0; lrow < n_rows; ++lrow)
{ {
at(row,col) /= p.at(row,col); at(lrow,lcol) /= p.at(lrow,lcol);
} }
} }
else else
{ {
const SpMat<eT> tmp(p.Q); const SpMat<eT> tmp(p.Q);
(*this).operator/=(tmp); (*this).operator/=(tmp);
} }
return *this; return *this;
skipping to change at line 669 skipping to change at line 662
inline inline
void void
SpSubview<eT>::fill(const eT val) SpSubview<eT>::fill(const eT val)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(val != eT(0)) if(val != eT(0))
{ {
// TODO: implement a faster version; the code below is slow // TODO: implement a faster version; the code below is slow
const uword start_row = aux_row1; const uword lstart_row = aux_row1;
const uword end_row = aux_row1 + n_rows; const uword lend_row = aux_row1 + n_rows;
const uword start_col = aux_col1;
const uword end_col = aux_col1 + n_cols; const uword lstart_col = aux_col1;
const uword lend_col = aux_col1 + n_cols;
const uword orig_nonzero = m.n_nonzero; const uword orig_nonzero = m.n_nonzero;
// iterate over our part of the sparse matrix // iterate over our part of the sparse matrix
for(uword col = start_col; col < end_col; ++col) for(uword lcol = lstart_col; lcol < lend_col; ++lcol)
for(uword row = start_row; row < end_row; ++row) for(uword lrow = lstart_row; lrow < lend_row; ++lrow)
{ {
access::rw(m).at(row, col) = val; access::rw(m).at(lrow, lcol) = val;
} }
access::rw(n_nonzero) += (m.n_nonzero - orig_nonzero); access::rw(n_nonzero) += (m.n_nonzero - orig_nonzero);
} }
else else
{ {
(*this).zeros(); (*this).zeros();
} }
} }
skipping to change at line 749 skipping to change at line 743
access::rw(n_nonzero) += (m.n_nonzero - orig_nonzero); access::rw(n_nonzero) += (m.n_nonzero - orig_nonzero);
} }
template<typename eT> template<typename eT>
arma_hot arma_hot
inline inline
SpValProxy<SpSubview<eT> > SpValProxy<SpSubview<eT> >
SpSubview<eT>::operator[](const uword i) SpSubview<eT>::operator[](const uword i)
{ {
const uword row = i % n_rows; const uword lrow = i % n_rows;
const uword col = i / n_rows; const uword lcol = i / n_rows;
return (*this).at(row, col); return (*this).at(lrow, lcol);
} }
template<typename eT> template<typename eT>
arma_hot arma_hot
inline inline
eT eT
SpSubview<eT>::operator[](const uword i) const SpSubview<eT>::operator[](const uword i) const
{ {
const uword row = i % n_rows; const uword lrow = i % n_rows;
const uword col = i / n_rows; const uword lcol = i / n_rows;
return (*this).at(row, col); return (*this).at(lrow, lcol);
} }
template<typename eT> template<typename eT>
arma_hot arma_hot
inline inline
SpValProxy< SpSubview<eT> > SpValProxy< SpSubview<eT> >
SpSubview<eT>::operator()(const uword i) SpSubview<eT>::operator()(const uword i)
{ {
arma_debug_check( (i >= n_elem), "SpSubview::operator(): index out of bou nds"); arma_debug_check( (i >= n_elem), "SpSubview::operator(): index out of bou nds");
const uword row = i % n_rows; const uword lrow = i % n_rows;
const uword col = i / n_rows; const uword lcol = i / n_rows;
return (*this).at(row, col); return (*this).at(lrow, lcol);
} }
template<typename eT> template<typename eT>
arma_hot arma_hot
inline inline
eT eT
SpSubview<eT>::operator()(const uword i) const SpSubview<eT>::operator()(const uword i) const
{ {
arma_debug_check( (i >= n_elem), "SpSubview::operator(): index out of bou nds"); arma_debug_check( (i >= n_elem), "SpSubview::operator(): index out of bou nds");
const uword row = i % n_rows; const uword lrow = i % n_rows;
const uword col = i / n_rows; const uword lcol = i / n_rows;
return (*this).at(row, col); return (*this).at(lrow, lcol);
} }
template<typename eT> template<typename eT>
arma_hot arma_hot
inline inline
SpValProxy< SpSubview<eT> > SpValProxy< SpSubview<eT> >
SpSubview<eT>::operator()(const uword in_row, const uword in_col) SpSubview<eT>::operator()(const uword in_row, const uword in_col)
{ {
arma_debug_check( (in_row >= n_rows) || (in_col >= n_cols), "SpSubview::o perator(): index out of bounds"); arma_debug_check( (in_row >= n_rows) || (in_col >= n_cols), "SpSubview::o perator(): index out of bounds");
skipping to change at line 823 skipping to change at line 817
return (*this).at(in_row, in_col); return (*this).at(in_row, in_col);
} }
template<typename eT> template<typename eT>
arma_hot arma_hot
inline inline
SpValProxy< SpSubview<eT> > SpValProxy< SpSubview<eT> >
SpSubview<eT>::at(const uword i) SpSubview<eT>::at(const uword i)
{ {
const uword row = i % n_rows; const uword lrow = i % n_rows;
const uword col = i / n_cols; const uword lcol = i / n_cols;
return (*this).at(row, col); return (*this).at(lrow, lcol);
} }
template<typename eT> template<typename eT>
arma_hot arma_hot
inline inline
eT eT
SpSubview<eT>::at(const uword i) const SpSubview<eT>::at(const uword i) const
{ {
const uword row = i % n_rows; const uword lrow = i % n_rows;
const uword col = i / n_cols; const uword lcol = i / n_cols;
return (*this).at(row, col); return (*this).at(lrow, lcol);
} }
template<typename eT> template<typename eT>
arma_hot arma_hot
inline inline
SpValProxy< SpSubview<eT> > SpValProxy< SpSubview<eT> >
SpSubview<eT>::at(const uword in_row, const uword in_col) SpSubview<eT>::at(const uword in_row, const uword in_col)
{ {
const uword colptr = m.col_ptrs[in_col + aux_col1]; const uword colptr = m.col_ptrs[in_col + aux_col1];
const uword next_colptr = m.col_ptrs[in_col + aux_col1 + 1]; const uword next_colptr = m.col_ptrs[in_col + aux_col1 + 1];
skipping to change at line 1193 skipping to change at line 1187
template<typename eT> template<typename eT>
inline inline
void void
SpSubview<eT>::swap_rows(const uword in_row1, const uword in_row2) SpSubview<eT>::swap_rows(const uword in_row1, const uword in_row2)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_check((in_row1 >= n_rows) || (in_row2 >= n_rows), "SpSubview:: swap_rows(): invalid row index"); arma_debug_check((in_row1 >= n_rows) || (in_row2 >= n_rows), "SpSubview:: swap_rows(): invalid row index");
const uword start_col = aux_col1; const uword lstart_col = aux_col1;
const uword end_col = aux_col1 + n_cols; const uword lend_col = aux_col1 + n_cols;
for(uword c = start_col; c < end_col; ++c) for(uword c = lstart_col; c < lend_col; ++c)
{ {
eT val = m.at(in_row1 + aux_row1, c); eT val = m.at(in_row1 + aux_row1, c);
access::rw(m).at(in_row2 + aux_row1, c) = m.at(in_row1 + aux_row1, c); access::rw(m).at(in_row2 + aux_row1, c) = m.at(in_row1 + aux_row1, c);
access::rw(m).at(in_row1 + aux_row1, c) = val; access::rw(m).at(in_row1 + aux_row1, c) = val;
} }
} }
template<typename eT> template<typename eT>
inline inline
void void
SpSubview<eT>::swap_cols(const uword in_col1, const uword in_col2) SpSubview<eT>::swap_cols(const uword in_col1, const uword in_col2)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_check((in_col1 >= n_cols) || (in_col2 >= n_cols), "SpSubview:: swap_cols(): invalid column index"); arma_debug_check((in_col1 >= n_cols) || (in_col2 >= n_cols), "SpSubview:: swap_cols(): invalid column index");
const uword start_row = aux_row1; const uword lstart_row = aux_row1;
const uword end_row = aux_row1 + n_rows; const uword lend_row = aux_row1 + n_rows;
for(uword r = start_row; r < end_row; ++r) for(uword r = lstart_row; r < lend_row; ++r)
{ {
eT val = m.at(r, in_col1 + aux_col1); eT val = m.at(r, in_col1 + aux_col1);
access::rw(m).at(r, in_col1 + aux_col1) = m.at(r, in_col2 + aux_col1); access::rw(m).at(r, in_col1 + aux_col1) = m.at(r, in_col2 + aux_col1);
access::rw(m).at(r, in_col2 + aux_col1) = val; access::rw(m).at(r, in_col2 + aux_col1) = val;
} }
} }
template<typename eT> template<typename eT>
inline inline
typename SpSubview<eT>::iterator typename SpSubview<eT>::iterator
 End of changes. 40 change blocks. 
84 lines changed or deleted 78 lines changed or added


 SpValProxy_bones.hpp   SpValProxy_bones.hpp 
// Copyright (C) 2011-2012 Ryan Curtin // Copyright (C) 2011-2012 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 SpValProxy //! \addtogroup SpValProxy
//! @{ //! @{
/** /**
* Sparse value proxy class, meant to prevent 0s from being added to sparse * Sparse value proxy class, meant to prevent 0s from being added to sparse
* matrices. T1 should be either SpMat or SpSubview, and if it's not, bad news * matrices. T1 should be either SpMat or SpSubview, and if it's not, bad news
* is probably coming. This class only uses T1::add_element() and * is probably coming. This class only uses T1::add_element() and
* T1::delete_element(). * T1::delete_element().
*/ */
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 SpValProxy_meat.hpp   SpValProxy_meat.hpp 
// Copyright (C) 2011-2012 Ryan Curtin // Copyright (C) 2011-2012 Ryan Curtin
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 SpValProxy //! \addtogroup SpValProxy
//! @{ //! @{
//! SpValProxy implementation. //! SpValProxy implementation.
template<typename T1> template<typename T1>
arma_inline arma_inline
SpValProxy<T1>::SpValProxy(uword in_row, uword in_col, T1& in_parent, eT* i n_val_ptr) SpValProxy<T1>::SpValProxy(uword in_row, uword in_col, T1& in_parent, eT* i n_val_ptr)
: row(in_row) : row(in_row)
, col(in_col) , col(in_col)
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 access.hpp   access.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 access //! \addtogroup access
//! @{ //! @{
class access class access
{ {
public: public:
//! internal function to allow modification of data declared as read-only (use with caution) //! internal function to allow modification of data declared as read-only (use with caution)
template<typename T1> arma_inline static T1& rw (const T1& x) { r eturn const_cast<T1& >(x); } template<typename T1> arma_inline static T1& rw (const T1& x) { r eturn const_cast<T1& >(x); }
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 arma_config.hpp   arma_config.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 //! \addtogroup arma_config
//! @{ //! @{
struct arma_config struct arma_config
{ {
#if defined(ARMA_MAT_PREALLOC) #if defined(ARMA_MAT_PREALLOC)
static const uword mat_prealloc = (sword(ARMA_MAT_PREALLOC) > 0) ? uwor d(ARMA_MAT_PREALLOC) : 1; static const uword mat_prealloc = (sword(ARMA_MAT_PREALLOC) > 0) ? uwor d(ARMA_MAT_PREALLOC) : 1;
#else #else
static const uword mat_prealloc = 16; static const uword mat_prealloc = 16;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 arma_ostream_bones.hpp   arma_ostream_bones.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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_ostream //! \addtogroup arma_ostream
//! @{ //! @{
class arma_ostream_state class arma_ostream_state
{ {
private: private:
const ios::fmtflags orig_flags; const ios::fmtflags orig_flags;
const std::streamsize orig_precision; const std::streamsize orig_precision;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 arma_ostream_meat.hpp   arma_ostream_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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_ostream //! \addtogroup arma_ostream
//! @{ //! @{
inline inline
arma_ostream_state::arma_ostream_state(const std::ostream& o) arma_ostream_state::arma_ostream_state(const std::ostream& o)
: orig_flags (o.flags()) : orig_flags (o.flags())
, orig_precision(o.precision()) , orig_precision(o.precision())
, orig_width (o.width()) , orig_width (o.width())
, orig_fill (o.fill()) , orig_fill (o.fill())
skipping to change at line 551 skipping to change at line 546
{ {
o << "[matrix size: " << m_n_rows << 'x' << m_n_cols << "]\n"; o << "[matrix size: " << m_n_rows << 'x' << m_n_cols << "]\n";
} }
else else
{ {
eT tmp[1]; eT tmp[1];
tmp[0] = eT(0); tmp[0] = eT(0);
const std::streamsize cell_width = modify ? arma_ostream::modify_stre am(o, &tmp[0], 1) : o.width(); const std::streamsize cell_width = modify ? arma_ostream::modify_stre am(o, &tmp[0], 1) : o.width();
const uword m_n_rows = m.n_rows;
const uword m_n_cols = m.n_cols;
for(uword row=0; row < m_n_rows; ++row) for(uword row=0; row < m_n_rows; ++row)
{ {
for(uword col=0; col < m_n_cols; ++col) for(uword col=0; col < m_n_cols; ++col)
{ {
o.width(cell_width); o.width(cell_width);
arma_ostream::print_elem_zero<eT>(o, modify); arma_ostream::print_elem_zero<eT>(o, modify);
o << ' '; o << ' ';
} }
 End of changes. 2 change blocks. 
11 lines changed or deleted 3 lines changed or added


 arma_static_check.hpp   arma_static_check.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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_check //! \addtogroup arma_static_check
//! @{ //! @{
template<bool ERROR___INCORRECT_OR_UNSUPPORTED_TYPE> template<bool ERROR___INCORRECT_OR_UNSUPPORTED_TYPE>
struct arma_type_check_cxx1998 struct arma_type_check_cxx1998
{ {
arma_inline arma_inline
static static
void void
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 arma_version.hpp   arma_version.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2013 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 //! \addtogroup arma_version
//! @{ //! @{
#define ARMA_VERSION_MAJOR 3 #define ARMA_VERSION_MAJOR 3
#define ARMA_VERSION_MINOR 6 #define ARMA_VERSION_MINOR 800
#define ARMA_VERSION_PATCH 4 #define ARMA_VERSION_PATCH 0
#define ARMA_VERSION_NAME "Piazza del Duomo" #define ARMA_VERSION_NAME "Miami Beach"
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
std::string std::string
 End of changes. 3 change blocks. 
13 lines changed or deleted 8 lines changed or added


 armadillo   armadillo 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2013 Conrad Sanderson
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au)
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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)
#ifndef ARMA_INCLUDES #ifndef ARMA_INCLUDES
#define ARMA_INCLUDES #define ARMA_INCLUDES
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <climits> #include <climits>
#include <cmath> #include <cmath>
#include <iostream> #include <iostream>
skipping to change at line 218 skipping to change at line 213
#include "armadillo_bits/op_misc_bones.hpp" #include "armadillo_bits/op_misc_bones.hpp"
#include "armadillo_bits/op_relational_bones.hpp" #include "armadillo_bits/op_relational_bones.hpp"
#include "armadillo_bits/op_find_bones.hpp" #include "armadillo_bits/op_find_bones.hpp"
#include "armadillo_bits/op_chol_bones.hpp" #include "armadillo_bits/op_chol_bones.hpp"
#include "armadillo_bits/op_cx_scalar_bones.hpp" #include "armadillo_bits/op_cx_scalar_bones.hpp"
#include "armadillo_bits/op_trimat_bones.hpp" #include "armadillo_bits/op_trimat_bones.hpp"
#include "armadillo_bits/op_cumsum_bones.hpp" #include "armadillo_bits/op_cumsum_bones.hpp"
#include "armadillo_bits/op_symmat_bones.hpp" #include "armadillo_bits/op_symmat_bones.hpp"
#include "armadillo_bits/op_hist_bones.hpp" #include "armadillo_bits/op_hist_bones.hpp"
#include "armadillo_bits/op_unique_bones.hpp" #include "armadillo_bits/op_unique_bones.hpp"
#include "armadillo_bits/op_toeplitz_bones.hpp"
#include "armadillo_bits/glue_times_bones.hpp" #include "armadillo_bits/glue_times_bones.hpp"
#include "armadillo_bits/glue_mixed_bones.hpp" #include "armadillo_bits/glue_mixed_bones.hpp"
#include "armadillo_bits/glue_cov_bones.hpp" #include "armadillo_bits/glue_cov_bones.hpp"
#include "armadillo_bits/glue_cor_bones.hpp" #include "armadillo_bits/glue_cor_bones.hpp"
#include "armadillo_bits/glue_kron_bones.hpp" #include "armadillo_bits/glue_kron_bones.hpp"
#include "armadillo_bits/glue_cross_bones.hpp" #include "armadillo_bits/glue_cross_bones.hpp"
#include "armadillo_bits/glue_join_bones.hpp" #include "armadillo_bits/glue_join_bones.hpp"
#include "armadillo_bits/glue_relational_bones.hpp" #include "armadillo_bits/glue_relational_bones.hpp"
#include "armadillo_bits/glue_solve_bones.hpp" #include "armadillo_bits/glue_solve_bones.hpp"
skipping to change at line 487 skipping to change at line 483
#include "armadillo_bits/op_misc_meat.hpp" #include "armadillo_bits/op_misc_meat.hpp"
#include "armadillo_bits/op_relational_meat.hpp" #include "armadillo_bits/op_relational_meat.hpp"
#include "armadillo_bits/op_find_meat.hpp" #include "armadillo_bits/op_find_meat.hpp"
#include "armadillo_bits/op_chol_meat.hpp" #include "armadillo_bits/op_chol_meat.hpp"
#include "armadillo_bits/op_cx_scalar_meat.hpp" #include "armadillo_bits/op_cx_scalar_meat.hpp"
#include "armadillo_bits/op_trimat_meat.hpp" #include "armadillo_bits/op_trimat_meat.hpp"
#include "armadillo_bits/op_cumsum_meat.hpp" #include "armadillo_bits/op_cumsum_meat.hpp"
#include "armadillo_bits/op_symmat_meat.hpp" #include "armadillo_bits/op_symmat_meat.hpp"
#include "armadillo_bits/op_hist_meat.hpp" #include "armadillo_bits/op_hist_meat.hpp"
#include "armadillo_bits/op_unique_meat.hpp" #include "armadillo_bits/op_unique_meat.hpp"
#include "armadillo_bits/op_toeplitz_meat.hpp"
#include "armadillo_bits/glue_times_meat.hpp" #include "armadillo_bits/glue_times_meat.hpp"
#include "armadillo_bits/glue_mixed_meat.hpp" #include "armadillo_bits/glue_mixed_meat.hpp"
#include "armadillo_bits/glue_cov_meat.hpp" #include "armadillo_bits/glue_cov_meat.hpp"
#include "armadillo_bits/glue_cor_meat.hpp" #include "armadillo_bits/glue_cor_meat.hpp"
#include "armadillo_bits/glue_kron_meat.hpp" #include "armadillo_bits/glue_kron_meat.hpp"
#include "armadillo_bits/glue_cross_meat.hpp" #include "armadillo_bits/glue_cross_meat.hpp"
#include "armadillo_bits/glue_join_meat.hpp" #include "armadillo_bits/glue_join_meat.hpp"
#include "armadillo_bits/glue_relational_meat.hpp" #include "armadillo_bits/glue_relational_meat.hpp"
#include "armadillo_bits/glue_solve_meat.hpp" #include "armadillo_bits/glue_solve_meat.hpp"
 End of changes. 4 change blocks. 
10 lines changed or deleted 7 lines changed or added


 arrayops_bones.hpp   arrayops_bones.hpp 
// Copyright (C) 2011-2012 NICTA (www.nicta.com.au) // Copyright (C) 2011-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2011-2012 Conrad Sanderson // Copyright (C) 2011-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 arrayops //! \addtogroup arrayops
//! @{ //! @{
class arrayops class arrayops
{ {
public: public:
template<typename eT> template<typename eT>
arma_hot arma_inline static void arma_hot arma_inline static void
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 arrayops_meat.hpp   arrayops_meat.hpp 
// Copyright (C) 2011-2012 NICTA (www.nicta.com.au) // Copyright (C) 2011-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2011-2012 Conrad Sanderson // Copyright (C) 2011-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 arrayops //! \addtogroup arrayops
//! @{ //! @{
template<typename eT> template<typename eT>
arma_hot arma_hot
arma_inline arma_inline
void void
arrayops::copy(eT* dest, const eT* src, const uword n_elem) arrayops::copy(eT* dest, const eT* src, const uword n_elem)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 atlas_bones.hpp   atlas_bones.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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)
#ifdef ARMA_USE_ATLAS #ifdef ARMA_USE_ATLAS
//! \namespace atlas namespace for ATLAS functions (imported from the globa l namespace) //! \namespace atlas namespace for ATLAS functions (imported from the globa l namespace)
namespace atlas namespace atlas
{ {
using ::CblasColMajor; using ::CblasColMajor;
using ::CblasNoTrans; using ::CblasNoTrans;
using ::CblasTrans; using ::CblasTrans;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 atlas_wrapper.hpp   atlas_wrapper.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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)
#ifdef ARMA_USE_ATLAS #ifdef ARMA_USE_ATLAS
//! \namespace atlas namespace for ATLAS functions (imported from the globa l namespace) //! \namespace atlas namespace for ATLAS functions (imported from the globa l namespace)
namespace atlas namespace atlas
{ {
template<typename eT> template<typename eT>
inline static const eT& tmp_real(const eT& X) { return X; } inline static const eT& tmp_real(const eT& X) { return X; }
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 auxlib_bones.hpp   auxlib_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// Copyright (C) 2009 Edmund Highcock // Copyright (C) 2009 Edmund Highcock
// Copyright (C) 2011 James Sanders // Copyright (C) 2011 James Sanders
// Copyright (C) 2012 Eric Jon Sundstrom // Copyright (C) 2012 Eric Jon Sundstrom
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 auxlib //! \addtogroup auxlib
//! @{ //! @{
//! wrapper for accessing external functions defined in ATLAS, LAPACK or BL AS libraries //! wrapper for accessing external functions defined in ATLAS, LAPACK or BL AS libraries
class auxlib class auxlib
{ {
public: public:
template<const uword row, const uword col> template<const uword row, const uword col>
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 auxlib_meat.hpp   auxlib_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2013 Conrad Sanderson
// Copyright (C) 2009 Edmund Highcock // Copyright (C) 2009 Edmund Highcock
// Copyright (C) 2011 James Sanders // Copyright (C) 2011 James Sanders
// Copyright (C) 2011 Stanislav Funiak // Copyright (C) 2011 Stanislav Funiak
// Copyright (C) 2012 Eric Jon Sundstrom // Copyright (C) 2012 Eric Jon Sundstrom
// Copyright (C) 2012 Michael McNeil Forbes // Copyright (C) 2012 Michael McNeil Forbes
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 auxlib //! \addtogroup auxlib
//! @{ //! @{
//! immediate matrix inverse //! immediate matrix inverse
template<typename eT, typename T1> template<typename eT, typename T1>
inline inline
bool bool
auxlib::inv(Mat<eT>& out, const Base<eT,T1>& X, const bool slow) auxlib::inv(Mat<eT>& out, const Base<eT,T1>& X, const bool slow)
{ {
skipping to change at line 368 skipping to change at line 363
if(info == 0) if(info == 0)
{ {
info = atlas::clapack_getri(atlas::CblasColMajor, out.n_rows, out.mem ptr(), out.n_rows, ipiv.memptr()); info = atlas::clapack_getri(atlas::CblasColMajor, out.n_rows, out.mem ptr(), out.n_rows, ipiv.memptr());
} }
return (info == 0); return (info == 0);
} }
#elif defined(ARMA_USE_LAPACK) #elif defined(ARMA_USE_LAPACK)
{ {
blas_int n_rows = out.n_rows; blas_int n_rows = out.n_rows;
blas_int n_cols = out.n_cols; blas_int n_cols = out.n_cols;
blas_int info = 0; blas_int lwork = 0;
blas_int lwork_min = (std::max)(blas_int(1), n_rows);
blas_int info = 0;
podarray<blas_int> ipiv(out.n_rows); podarray<blas_int> ipiv(out.n_rows);
// 84 was empirically found -- it is the maximum value suggested by LAP eT work_query[2];
ACK (as provided by ATLAS v3.6) blas_int lwork_query = -1;
// based on tests with various matrix types on 32-bit and 64-bit machin
es
//
// the "work" array is deliberately long so that a secondary (time-cons
uming)
// memory allocation is avoided, if possible
blas_int work_len = (std::max)(blas_int(1), n_rows*84);
podarray<eT> work( static_cast<uword>(work_len) );
lapack::getrf(&n_rows, &n_cols, out.memptr(), &n_rows, ipiv.memptr(), & info); lapack::getri(&n_rows, out.memptr(), &n_rows, ipiv.memptr(), &work_quer y[0], &lwork_query, &info);
if(info == 0) if(info == 0)
{ {
// query for optimum size of work_len const blas_int lwork_proposed = static_cast<blas_int>( access::tmp_re al(work_query[0]) );
blas_int work_len_tmp = -1; lwork = (lwork_proposed > lwork_min) ? lwork_proposed : lwork_min;
lapack::getri(&n_rows, out.memptr(), &n_rows, ipiv.memptr(), work.mem }
ptr(), &work_len_tmp, &info); else
{
return false;
}
if(info == 0) podarray<eT> work( static_cast<uword>(lwork) );
{
blas_int proposed_work_len = static_cast<blas_int>(access::tmp_real
(work[0]));
// if necessary, allocate more memory lapack::getrf(&n_rows, &n_cols, out.memptr(), &n_rows, ipiv.memptr(), &
if(work_len < proposed_work_len) info);
{
work_len = proposed_work_len;
work.set_size( static_cast<uword>(work_len) );
}
}
lapack::getri(&n_rows, out.memptr(), &n_rows, ipiv.memptr(), work.mem if(info == 0)
ptr(), &work_len, &info); {
lapack::getri(&n_rows, out.memptr(), &n_rows, ipiv.memptr(), work.mem
ptr(), &lwork, &info);
} }
return (info == 0); return (info == 0);
} }
#else #else
{ {
arma_ignore(out);
arma_stop("inv(): use of ATLAS or LAPACK needs to be enabled"); arma_stop("inv(): use of ATLAS or LAPACK needs to be enabled");
return false; return false;
} }
#endif #endif
} }
template<typename eT, typename T1> template<typename eT, typename T1>
inline inline
bool bool
auxlib::inv_tr(Mat<eT>& out, const Base<eT,T1>& X, const uword layout) auxlib::inv_tr(Mat<eT>& out, const Base<eT,T1>& X, const uword layout)
skipping to change at line 1141 skipping to change at line 1129
char jobz = 'N'; char jobz = 'N';
char uplo = 'U'; char uplo = 'U';
blas_int N = blas_int(A.n_rows); blas_int N = blas_int(A.n_rows);
blas_int lwork = 3 * ( (std::max)(blas_int(1), 3*N-1) ); blas_int lwork = 3 * ( (std::max)(blas_int(1), 3*N-1) );
blas_int info = 0; blas_int info = 0;
podarray<eT> work( static_cast<uword>(lwork) ); podarray<eT> work( static_cast<uword>(lwork) );
arma_extra_debug_print("lapack::syev()");
lapack::syev(&jobz, &uplo, &N, A.memptr(), &N, eigval.memptr(), work.me mptr(), &lwork, &info); lapack::syev(&jobz, &uplo, &N, A.memptr(), &N, eigval.memptr(), work.me mptr(), &lwork, &info);
return (info == 0); return (info == 0);
} }
#else #else
{ {
arma_ignore(eigval); arma_ignore(eigval);
arma_ignore(X); arma_ignore(X);
arma_stop("eig_sym(): use of LAPACK needs to be enabled"); arma_stop("eig_sym(): use of LAPACK needs to be enabled");
return false; return false;
skipping to change at line 1164 skipping to change at line 1151
} }
//! immediate eigenvalues of a hermitian complex matrix using LAPACK //! immediate eigenvalues of a hermitian complex matrix using LAPACK
template<typename T, typename T1> template<typename T, typename T1>
inline inline
bool bool
auxlib::eig_sym(Col<T>& eigval, const Base<std::complex<T>,T1>& X) auxlib::eig_sym(Col<T>& eigval, const Base<std::complex<T>,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<T> eT;
#if defined(ARMA_USE_LAPACK) #if defined(ARMA_USE_LAPACK)
{ {
typedef typename std::complex<T> eT;
Mat<eT> A(X.get_ref()); Mat<eT> A(X.get_ref());
arma_debug_check( (A.is_square() == false), "eig_sym(): given matrix is not square"); arma_debug_check( (A.is_square() == false), "eig_sym(): given matrix is not square");
if(A.is_empty()) if(A.is_empty())
{ {
eigval.reset(); eigval.reset();
return true; return true;
} }
skipping to change at line 1237 skipping to change at line 1224
char jobz = 'V'; char jobz = 'V';
char uplo = 'U'; char uplo = 'U';
blas_int N = blas_int(eigvec.n_rows); blas_int N = blas_int(eigvec.n_rows);
blas_int lwork = 3 * ( (std::max)(blas_int(1), 3*N-1) ); blas_int lwork = 3 * ( (std::max)(blas_int(1), 3*N-1) );
blas_int info = 0; blas_int info = 0;
podarray<eT> work( static_cast<uword>(lwork) ); podarray<eT> work( static_cast<uword>(lwork) );
arma_extra_debug_print("lapack::syev()");
lapack::syev(&jobz, &uplo, &N, eigvec.memptr(), &N, eigval.memptr(), wo rk.memptr(), &lwork, &info); lapack::syev(&jobz, &uplo, &N, eigvec.memptr(), &N, eigval.memptr(), wo rk.memptr(), &lwork, &info);
return (info == 0); return (info == 0);
} }
#else #else
{ {
arma_ignore(eigval); arma_ignore(eigval);
arma_ignore(eigvec); arma_ignore(eigvec);
arma_ignore(X); arma_ignore(X);
arma_stop("eig_sym(): use of LAPACK needs to be enabled"); arma_stop("eig_sym(): use of LAPACK needs to be enabled");
skipping to change at line 1261 skipping to change at line 1247
} }
//! immediate eigenvalues and eigenvectors of a hermitian complex matrix us ing LAPACK //! immediate eigenvalues and eigenvectors of a hermitian complex matrix us ing LAPACK
template<typename T, typename T1> template<typename T, typename T1>
inline inline
bool bool
auxlib::eig_sym(Col<T>& eigval, Mat< std::complex<T> >& eigvec, const Base< std::complex<T>,T1>& X) auxlib::eig_sym(Col<T>& eigval, Mat< std::complex<T> >& eigvec, const Base< std::complex<T>,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<T> eT;
#if defined(ARMA_USE_LAPACK) #if defined(ARMA_USE_LAPACK)
{ {
typedef typename std::complex<T> eT;
eigvec = X.get_ref(); eigvec = X.get_ref();
arma_debug_check( (eigvec.is_square() == false), "eig_sym(): given matr ix is not square" ); arma_debug_check( (eigvec.is_square() == false), "eig_sym(): given matr ix is not square" );
if(eigvec.is_empty()) if(eigvec.is_empty())
{ {
eigval.reset(); eigval.reset();
eigvec.reset(); eigvec.reset();
return true; return true;
} }
skipping to change at line 1362 skipping to change at line 1348
} }
//! immediate eigenvalues and eigenvectors of a hermitian complex matrix us ing LAPACK (divide and conquer algorithm) //! immediate eigenvalues and eigenvectors of a hermitian complex matrix us ing LAPACK (divide and conquer algorithm)
template<typename T, typename T1> template<typename T, typename T1>
inline inline
bool bool
auxlib::eig_sym_dc(Col<T>& eigval, Mat< std::complex<T> >& eigvec, const Ba se<std::complex<T>,T1>& X) auxlib::eig_sym_dc(Col<T>& eigval, Mat< std::complex<T> >& eigvec, const Ba se<std::complex<T>,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<T> eT;
#if defined(ARMA_USE_LAPACK) #if defined(ARMA_USE_LAPACK)
{ {
typedef typename std::complex<T> eT;
eigvec = X.get_ref(); eigvec = X.get_ref();
arma_debug_check( (eigvec.is_square() == false), "eig_sym(): given matr ix is not square" ); arma_debug_check( (eigvec.is_square() == false), "eig_sym(): given matr ix is not square" );
if(eigvec.is_empty()) if(eigvec.is_empty())
{ {
eigval.reset(); eigval.reset();
eigvec.reset(); eigvec.reset();
return true; return true;
} }
skipping to change at line 1525 skipping to change at line 1511
( (
Col< std::complex<T> >& eigval, Col< std::complex<T> >& eigval,
Mat< std::complex<T> >& l_eigvec, Mat< std::complex<T> >& l_eigvec,
Mat< std::complex<T> >& r_eigvec, Mat< std::complex<T> >& r_eigvec,
const Base< std::complex<T>, T1 >& X, const Base< std::complex<T>, T1 >& X,
const char side const char side
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<T> eT;
#if defined(ARMA_USE_LAPACK) #if defined(ARMA_USE_LAPACK)
{ {
typedef typename std::complex<T> eT;
char jobvl; char jobvl;
char jobvr; char jobvr;
switch(side) switch(side)
{ {
case 'l': // left case 'l': // left
jobvl = 'V'; jobvl = 'V';
jobvr = 'N'; jobvr = 'N';
break; break;
skipping to change at line 1671 skipping to change at line 1657
const uword R_n_rows = R.n_rows; const uword R_n_rows = R.n_rows;
const uword R_n_cols = R.n_cols; const uword R_n_cols = R.n_cols;
if(R.is_empty()) if(R.is_empty())
{ {
Q.eye(R_n_rows, R_n_rows); Q.eye(R_n_rows, R_n_rows);
return true; return true;
} }
blas_int m = static_cast<blas_int>(R_n_rows); blas_int m = static_cast<blas_int>(R_n_rows);
blas_int n = static_cast<blas_int>(R_n_cols); blas_int n = static_cast<blas_int>(R_n_cols);
blas_int work_len = (std::max)(blas_int(1), (std::max)(m,n)); blas_int lwork = 0;
blas_int work_len_tmp; blas_int lwork_min = (std::max)(blas_int(1), (std::max)(m,n)); // take
blas_int k = (std::min)(m,n); into account requirements of geqrf() _and_ orgqr()/ungqr()
blas_int info = 0; blas_int k = (std::min)(m,n);
blas_int info = 0;
podarray<eT> tau ( static_cast<uword>(k) );
podarray<eT> work( static_cast<uword>(work_len) ); podarray<eT> tau( static_cast<uword>(k) );
// query for the optimum value of work_len eT work_query[2];
work_len_tmp = -1; blas_int lwork_query = -1;
lapack::geqrf(&m, &n, R.memptr(), &m, tau.memptr(), work.memptr(), &wor
k_len_tmp, &info); lapack::geqrf(&m, &n, R.memptr(), &m, tau.memptr(), &work_query[0], &lw
ork_query, &info);
if(info == 0) if(info == 0)
{ {
work_len_tmp = static_cast<blas_int>(access::tmp_real(work[0])); const blas_int lwork_proposed = static_cast<blas_int>( access::tmp_re al(work_query[0]) );
if(work_len < work_len_tmp) lwork = (lwork_proposed > lwork_min) ? lwork_proposed : lwork_min;
{ }
work_len = work_len_tmp; else
{
work.set_size( static_cast<uword>(work_len) ); return false;
}
} }
lapack::geqrf(&m, &n, R.memptr(), &m, tau.memptr(), work.memptr(), &wor podarray<eT> work( static_cast<uword>(lwork) );
k_len, &info);
lapack::geqrf(&m, &n, R.memptr(), &m, tau.memptr(), work.memptr(), &lwo
rk, &info);
Q.set_size(R_n_rows, R_n_rows); Q.set_size(R_n_rows, R_n_rows);
arrayops::copy( Q.memptr(), R.memptr(), (std::min)(Q.n_elem, R.n_elem) ); arrayops::copy( Q.memptr(), R.memptr(), (std::min)(Q.n_elem, R.n_elem) );
// //
// construct R // construct R
for(uword col=0; col < R_n_cols; ++col) for(uword col=0; col < R_n_cols; ++col)
{ {
for(uword row=(col+1); row < R_n_rows; ++row) for(uword row=(col+1); row < R_n_rows; ++row)
{ {
R.at(row,col) = eT(0); R.at(row,col) = eT(0);
} }
} }
if( (is_float<eT>::value == true) || (is_double<eT>::value == true) ) if( (is_float<eT>::value == true) || (is_double<eT>::value == true) )
{ {
lapack::orgqr(&m, &m, &k, Q.memptr(), &m, tau.memptr(), work.memptr() , &work_len, &info); lapack::orgqr(&m, &m, &k, Q.memptr(), &m, tau.memptr(), work.memptr() , &lwork, &info);
} }
else else
if( (is_supported_complex_float<eT>::value == true) || (is_supported_co mplex_double<eT>::value == true) ) if( (is_supported_complex_float<eT>::value == true) || (is_supported_co mplex_double<eT>::value == true) )
{ {
lapack::ungqr(&m, &m, &k, Q.memptr(), &m, tau.memptr(), work.memptr() , &work_len, &info); lapack::ungqr(&m, &m, &k, Q.memptr(), &m, tau.memptr(), work.memptr() , &lwork, &info);
} }
return (info == 0); return (info == 0);
} }
#else #else
{ {
arma_ignore(Q); arma_ignore(Q);
arma_ignore(R); arma_ignore(R);
arma_ignore(X); arma_ignore(X);
arma_stop("qr(): use of LAPACK needs to be enabled"); arma_stop("qr(): use of LAPACK needs to be enabled");
skipping to change at line 1786 skipping to change at line 1773
return auxlib::qr(Q, R, Q); return auxlib::qr(Q, R, Q);
} }
if(Q.is_empty()) if(Q.is_empty())
{ {
Q.set_size(Q_n_rows, 0 ); Q.set_size(Q_n_rows, 0 );
R.set_size(0, Q_n_cols); R.set_size(0, Q_n_cols);
return true; return true;
} }
blas_int m = static_cast<blas_int>(Q_n_rows); blas_int m = static_cast<blas_int>(Q_n_rows);
blas_int n = static_cast<blas_int>(Q_n_cols); blas_int n = static_cast<blas_int>(Q_n_cols);
blas_int work_len = (std::max)(blas_int(1), (std::max)(m,n)); blas_int lwork = 0;
blas_int work_len_tmp; blas_int lwork_min = (std::max)(blas_int(1), (std::max)(m,n)); // take
blas_int k = (std::min)(m,n); into account requirements of geqrf() _and_ orgqr()/ungqr()
blas_int info = 0; blas_int k = (std::min)(m,n);
blas_int info = 0;
podarray<eT> tau ( static_cast<uword>(k) );
podarray<eT> work( static_cast<uword>(work_len) ); podarray<eT> tau( static_cast<uword>(k) );
// query for the optimum value of work_len eT work_query[2];
work_len_tmp = -1; blas_int lwork_query = -1;
lapack::geqrf(&m, &n, Q.memptr(), &m, tau.memptr(), work.memptr(), &wor
k_len_tmp, &info); lapack::geqrf(&m, &n, Q.memptr(), &m, tau.memptr(), &work_query[0], &lw
ork_query, &info);
if(info == 0) if(info == 0)
{ {
work_len_tmp = static_cast<blas_int>(access::tmp_real(work[0])); const blas_int lwork_proposed = static_cast<blas_int>( access::tmp_re al(work_query[0]) );
if(work_len < work_len_tmp) lwork = (lwork_proposed > lwork_min) ? lwork_proposed : lwork_min;
{
work_len = work_len_tmp;
work.set_size( static_cast<uword>(work_len) );
}
} }
else
{
return false;
}
podarray<eT> work( static_cast<uword>(lwork) );
lapack::geqrf(&m, &n, Q.memptr(), &m, tau.memptr(), work.memptr(), &wor k_len, &info); lapack::geqrf(&m, &n, Q.memptr(), &m, tau.memptr(), work.memptr(), &lwo rk, &info);
// Q now has the elements on and above the diagonal of the array // Q now has the elements on and above the diagonal of the array
// contain the min(M,N)-by-N upper trapezoidal matrix Q // contain the min(M,N)-by-N upper trapezoidal matrix Q
// (Q is upper triangular if m >= n); // (Q is upper triangular if m >= n);
// the elements below the diagonal, with the array TAU, // the elements below the diagonal, with the array TAU,
// represent the orthogonal matrix Q as a product of min(m,n) elementar y reflectors. // represent the orthogonal matrix Q as a product of min(m,n) elementar y reflectors.
R.set_size(Q_n_cols, Q_n_cols); R.set_size(Q_n_cols, Q_n_cols);
// //
skipping to change at line 1840 skipping to change at line 1828
} }
for(uword row=(col+1); row < Q_n_cols; ++row) for(uword row=(col+1); row < Q_n_cols; ++row)
{ {
R.at(row,col) = eT(0); R.at(row,col) = eT(0);
} }
} }
if( (is_float<eT>::value == true) || (is_double<eT>::value == true) ) if( (is_float<eT>::value == true) || (is_double<eT>::value == true) )
{ {
lapack::orgqr(&m, &n, &k, Q.memptr(), &m, tau.memptr(), work.memptr() , &work_len, &info); lapack::orgqr(&m, &n, &k, Q.memptr(), &m, tau.memptr(), work.memptr() , &lwork, &info);
} }
else else
if( (is_supported_complex_float<eT>::value == true) || (is_supported_co mplex_double<eT>::value == true) ) if( (is_supported_complex_float<eT>::value == true) || (is_supported_co mplex_double<eT>::value == true) )
{ {
lapack::ungqr(&m, &n, &k, Q.memptr(), &m, tau.memptr(), work.memptr() , &work_len, &info); lapack::ungqr(&m, &n, &k, Q.memptr(), &m, tau.memptr(), work.memptr() , &lwork, &info);
} }
return (info == 0); return (info == 0);
} }
#else #else
{ {
arma_ignore(Q); arma_ignore(Q);
arma_ignore(R); arma_ignore(R);
arma_ignore(X); arma_ignore(X);
arma_stop("qr_econ(): use of LAPACK needs to be enabled"); arma_stop("qr_econ(): use of LAPACK needs to be enabled");
skipping to change at line 1887 skipping to change at line 1875
S.reset(); S.reset();
return true; return true;
} }
Mat<eT> U(1, 1); Mat<eT> U(1, 1);
Mat<eT> V(1, A.n_cols); Mat<eT> V(1, A.n_cols);
char jobu = 'N'; char jobu = 'N';
char jobvt = 'N'; char jobvt = 'N';
blas_int m = A.n_rows; blas_int m = A.n_rows;
blas_int n = A.n_cols; blas_int n = A.n_cols;
blas_int min_mn = (std::min)(m,n); blas_int min_mn = (std::min)(m,n);
blas_int lda = A.n_rows; blas_int lda = A.n_rows;
blas_int ldu = U.n_rows; blas_int ldu = U.n_rows;
blas_int ldvt = V.n_rows; blas_int ldvt = V.n_rows;
blas_int lwork = 3 * ( (std::max)(blas_int(1), (std::max)( (3*min_mn blas_int lwork = 0;
+ (std::max)(m,n)), 5*min_mn ) ) ); blas_int lwork_min = (std::max)( blas_int(1), (std::max)( (3*min_mn +
blas_int info = 0; (std::max)(m,n)), 5*min_mn ) );
blas_int info = 0;
S.set_size( static_cast<uword>(min_mn) ); S.set_size( static_cast<uword>(min_mn) );
podarray<eT> work( static_cast<uword>(lwork) ); eT work_query[2];
blas_int lwork_query = -1;
// let gesvd_() calculate the optimum size of the workspace
blas_int lwork_tmp = -1;
lapack::gesvd<eT> lapack::gesvd<eT>
( (
&jobu, &jobvt, &jobu, &jobvt, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu
&m,&n, , V.memptr(), &ldvt, &work_query[0], &lwork_query, &info
A.memptr(), &lda,
S.memptr(),
U.memptr(), &ldu,
V.memptr(), &ldvt,
work.memptr(), &lwork_tmp,
&info
); );
if(info == 0) if(info == 0)
{ {
blas_int proposed_lwork = static_cast<blas_int>(work[0]); const blas_int lwork_proposed = static_cast<blas_int>( work_query[0] );
if(proposed_lwork > lwork) lwork = (lwork_proposed > lwork_min) ? lwork_proposed : lwork_min;
{
lwork = proposed_lwork; podarray<eT> work( static_cast<uword>(lwork) );
work.set_size( static_cast<uword>(lwork) );
}
lapack::gesvd<eT> lapack::gesvd<eT>
( (
&jobu, &jobvt, &jobu, &jobvt, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &l
&m, &n, du, V.memptr(), &ldvt, work.memptr(), &lwork, &info
A.memptr(), &lda,
S.memptr(),
U.memptr(), &ldu,
V.memptr(), &ldvt,
work.memptr(), &lwork,
&info
); );
} }
return (info == 0); return (info == 0);
} }
#else #else
{ {
arma_ignore(S); arma_ignore(S);
arma_ignore(X); arma_ignore(X);
arma_ignore(X_n_rows); arma_ignore(X_n_rows);
skipping to change at line 1959 skipping to change at line 1930
#endif #endif
} }
template<typename T, typename T1> template<typename T, typename T1>
inline inline
bool bool
auxlib::svd(Col<T>& S, const Base<std::complex<T>, T1>& X, uword& X_n_rows, uword& X_n_cols) auxlib::svd(Col<T>& S, const Base<std::complex<T>, T1>& X, uword& X_n_rows, uword& X_n_cols)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef std::complex<T> eT;
#if defined(ARMA_USE_LAPACK) #if defined(ARMA_USE_LAPACK)
{ {
typedef std::complex<T> eT;
Mat<eT> A(X.get_ref()); Mat<eT> A(X.get_ref());
X_n_rows = A.n_rows; X_n_rows = A.n_rows;
X_n_cols = A.n_cols; X_n_cols = A.n_cols;
if(A.is_empty()) if(A.is_empty())
{ {
S.reset(); S.reset();
return true; return true;
} }
skipping to change at line 2095 skipping to change at line 2066
V.eye(A.n_cols, A.n_cols); V.eye(A.n_cols, A.n_cols);
return true; return true;
} }
U.set_size(A.n_rows, A.n_rows); U.set_size(A.n_rows, A.n_rows);
V.set_size(A.n_cols, A.n_cols); V.set_size(A.n_cols, A.n_cols);
char jobu = 'A'; char jobu = 'A';
char jobvt = 'A'; char jobvt = 'A';
blas_int m = blas_int(A.n_rows); blas_int m = blas_int(A.n_rows);
blas_int n = blas_int(A.n_cols); blas_int n = blas_int(A.n_cols);
blas_int min_mn = (std::min)(m,n); blas_int min_mn = (std::min)(m,n);
blas_int lda = blas_int(A.n_rows); blas_int lda = blas_int(A.n_rows);
blas_int ldu = blas_int(U.n_rows); blas_int ldu = blas_int(U.n_rows);
blas_int ldvt = blas_int(V.n_rows); blas_int ldvt = blas_int(V.n_rows);
blas_int lwork = 3 * ( (std::max)(blas_int(1), (std::max)( (3*min_mn blas_int lwork_min = (std::max)( blas_int(1), (std::max)( (3*min_mn +
+ (std::max)(m,n)), 5*min_mn ) ) ); (std::max)(m,n)), 5*min_mn ) );
blas_int info = 0; blas_int lwork = 0;
blas_int info = 0;
S.set_size( static_cast<uword>(min_mn) ); S.set_size( static_cast<uword>(min_mn) );
podarray<eT> work( static_cast<uword>(lwork) );
// let gesvd_() calculate the optimum size of the workspace // let gesvd_() calculate the optimum size of the workspace
blas_int lwork_tmp = -1; eT work_query[2];
blas_int lwork_query = -1;
lapack::gesvd<eT> lapack::gesvd<eT>
( (
&jobu, &jobvt, &jobu, &jobvt, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu
&m, &n, , V.memptr(), &ldvt, &work_query[0], &lwork_query, &info
A.memptr(), &lda,
S.memptr(),
U.memptr(), &ldu,
V.memptr(), &ldvt,
work.memptr(), &lwork_tmp,
&info
); );
if(info == 0) if(info == 0)
{ {
blas_int proposed_lwork = static_cast<blas_int>(work[0]); const blas_int lwork_proposed = static_cast<blas_int>( work_query[0] );
if(proposed_lwork > lwork) lwork = (lwork_proposed > lwork_min) ? lwork_proposed : lwork_min;
{
lwork = proposed_lwork; podarray<eT> work( static_cast<uword>(lwork) );
work.set_size( static_cast<uword>(lwork) );
}
lapack::gesvd<eT> lapack::gesvd<eT>
( (
&jobu, &jobvt, &jobu, &jobvt, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &l
&m, &n, du, V.memptr(), &ldvt, work.memptr(), &lwork, &info
A.memptr(), &lda,
S.memptr(),
U.memptr(), &ldu,
V.memptr(), &ldvt,
work.memptr(), &lwork,
&info
); );
op_strans::apply(V,V); // op_strans will work out that an in-place t ranspose can be done op_strans::apply(V,V); // op_strans will work out that an in-place t ranspose can be done
} }
return (info == 0); return (info == 0);
} }
#else #else
{ {
arma_ignore(U); arma_ignore(U);
skipping to change at line 2169 skipping to change at line 2124
#endif #endif
} }
template<typename T, typename T1> template<typename T, typename T1>
inline inline
bool bool
auxlib::svd(Mat< std::complex<T> >& U, Col<T>& S, Mat< std::complex<T> >& V , const Base< std::complex<T>, T1>& X) auxlib::svd(Mat< std::complex<T> >& U, Col<T>& S, Mat< std::complex<T> >& V , const Base< std::complex<T>, T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef std::complex<T> eT;
#if defined(ARMA_USE_LAPACK) #if defined(ARMA_USE_LAPACK)
{ {
typedef std::complex<T> eT;
Mat<eT> A(X.get_ref()); Mat<eT> A(X.get_ref());
if(A.is_empty()) if(A.is_empty())
{ {
U.eye(A.n_rows, A.n_rows); U.eye(A.n_rows, A.n_rows);
S.reset(); S.reset();
V.eye(A.n_cols, A.n_cols); V.eye(A.n_cols, A.n_cols);
return true; return true;
} }
skipping to change at line 2401 skipping to change at line 2356
#endif #endif
} }
template<typename T, typename T1> template<typename T, typename T1>
inline inline
bool bool
auxlib::svd_econ(Mat< std::complex<T> >& U, Col<T>& S, Mat< std::complex<T> >& V, const Base< std::complex<T>, T1>& X, const char mode) auxlib::svd_econ(Mat< std::complex<T> >& U, Col<T>& S, Mat< std::complex<T> >& V, const Base< std::complex<T>, T1>& X, const char mode)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef std::complex<T> eT;
#if defined(ARMA_USE_LAPACK) #if defined(ARMA_USE_LAPACK)
{ {
typedef std::complex<T> eT;
Mat<eT> A(X.get_ref()); Mat<eT> A(X.get_ref());
blas_int m = blas_int(A.n_rows); blas_int m = blas_int(A.n_rows);
blas_int n = blas_int(A.n_cols); blas_int n = blas_int(A.n_cols);
blas_int min_mn = (std::min)(m,n); blas_int min_mn = (std::min)(m,n);
blas_int lda = blas_int(A.n_rows); blas_int lda = blas_int(A.n_rows);
S.set_size( static_cast<uword>(min_mn) ); S.set_size( static_cast<uword>(min_mn) );
blas_int ldu = 0; blas_int ldu = 0;
skipping to change at line 2603 skipping to change at line 2558
#endif #endif
} }
template<typename T, typename T1> template<typename T, typename T1>
inline inline
bool bool
auxlib::svd_dc(Mat< std::complex<T> >& U, Col<T>& S, Mat< std::complex<T> > & V, const Base< std::complex<T>, T1>& X) auxlib::svd_dc(Mat< std::complex<T> >& U, Col<T>& S, Mat< std::complex<T> > & V, const Base< std::complex<T>, T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef std::complex<T> eT;
#if defined(ARMA_USE_LAPACK) #if defined(ARMA_USE_LAPACK)
{ {
typedef std::complex<T> eT;
Mat<eT> A(X.get_ref()); Mat<eT> A(X.get_ref());
if(A.is_empty()) if(A.is_empty())
{ {
U.eye(A.n_rows, A.n_rows); U.eye(A.n_rows, A.n_rows);
S.reset(); S.reset();
V.eye(A.n_cols, A.n_cols); V.eye(A.n_cols, A.n_cols);
return true; return true;
} }
 End of changes. 55 change blocks. 
179 lines changed or deleted 136 lines changed or added


 blas_bones.hpp   blas_bones.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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)
#ifdef ARMA_USE_BLAS #ifdef ARMA_USE_BLAS
#if !defined(ARMA_BLAS_CAPITALS) #if !defined(ARMA_BLAS_CAPITALS)
#define arma_sdot sdot #define arma_sdot sdot
#define arma_ddot ddot #define arma_ddot ddot
#define arma_sgemv sgemv #define arma_sgemv sgemv
#define arma_dgemv dgemv #define arma_dgemv dgemv
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 blas_wrapper.hpp   blas_wrapper.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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)
#ifdef ARMA_USE_BLAS #ifdef ARMA_USE_BLAS
//! \namespace blas namespace for BLAS functions //! \namespace blas namespace for BLAS functions
namespace blas namespace blas
{ {
template<typename eT> template<typename eT>
inline inline
void void
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 cmath_wrap.hpp   cmath_wrap.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 cmath_wrap //! \addtogroup cmath_wrap
//! @{ //! @{
// //
// wrappers for isfinite // wrappers for isfinite
// //
template<typename eT> template<typename eT>
arma_inline arma_inline
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 compiler_setup.hpp   compiler_setup.hpp 
// Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // Copyright (C) 2008-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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)
#define arma_hot #define arma_hot
#define arma_cold #define arma_cold
#define arma_pure #define arma_pure
#define arma_const #define arma_const
#define arma_aligned #define arma_aligned
#define arma_warn_unused #define arma_warn_unused
#define arma_deprecated #define arma_deprecated
#define arma_malloc #define arma_malloc
#define arma_inline inline #define arma_inline inline
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 cond_rel_bones.hpp   cond_rel_bones.hpp 
// Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 cond_rel //! \addtogroup cond_rel
//! @{ //! @{
// //
// for preventing pedantic compiler warnings // for preventing pedantic compiler warnings
template<const bool do_eval> template<const bool do_eval>
class cond_rel class cond_rel
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 cond_rel_meat.hpp   cond_rel_meat.hpp 
// Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 cond_rel //! \addtogroup cond_rel
//! @{ //! @{
template<> template<>
template<typename eT> template<typename eT>
arma_inline arma_inline
bool bool
cond_rel<true>::lt(const eT A, const eT B) cond_rel<true>::lt(const eT A, const eT B)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 config.hpp   config.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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)
#if !defined(ARMA_USE_LAPACK) #if !defined(ARMA_USE_LAPACK)
#define ARMA_USE_LAPACK #define ARMA_USE_LAPACK
//// Uncomment the above line if you have LAPACK or a high-speed replacemen t for LAPACK, //// Uncomment the above line if you have LAPACK or a high-speed replacemen t for LAPACK,
//// such as Intel's MKL, AMD's ACML, or the Accelerate framework. //// such as Intel's MKL, AMD's ACML, or the Accelerate framework.
//// LAPACK is required for matrix decompositions (eg. SVD) and matrix inve rse. //// LAPACK is required for matrix decompositions (eg. SVD) and matrix inve rse.
#endif #endif
#if !defined(ARMA_USE_BLAS) #if !defined(ARMA_USE_BLAS)
#define ARMA_USE_BLAS #define ARMA_USE_BLAS
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 constants.hpp   constants.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 constants //! \addtogroup constants
//! @{ //! @{
namespace priv namespace priv
{ {
class Datum_helper class Datum_helper
{ {
public: public:
template<typename eT> template<typename eT>
static static
typename arma_float_only<eT>::result typename arma_real_only<eT>::result
nan(typename arma_float_only<eT>::result* junk = 0) nan(typename arma_real_only<eT>::result* junk = 0)
{ {
arma_ignore(junk); arma_ignore(junk);
if(std::numeric_limits<eT>::has_quiet_NaN == true) if(std::numeric_limits<eT>::has_quiet_NaN == true)
{ {
return std::numeric_limits<eT>::quiet_NaN(); return std::numeric_limits<eT>::quiet_NaN();
} }
else else
{ {
return eT(0); return eT(0);
skipping to change at line 63 skipping to change at line 58
typename arma_integral_only<eT>::result typename arma_integral_only<eT>::result
nan(typename arma_integral_only<eT>::result* junk = 0) nan(typename arma_integral_only<eT>::result* junk = 0)
{ {
arma_ignore(junk); arma_ignore(junk);
return eT(0); return eT(0);
} }
template<typename eT> template<typename eT>
static static
typename arma_float_only<eT>::result typename arma_real_only<eT>::result
inf(typename arma_float_only<eT>::result* junk = 0) inf(typename arma_real_only<eT>::result* junk = 0)
{ {
arma_ignore(junk); arma_ignore(junk);
if(std::numeric_limits<eT>::has_infinity == true) if(std::numeric_limits<eT>::has_infinity == true)
{ {
return std::numeric_limits<eT>::infinity(); return std::numeric_limits<eT>::infinity();
} }
else else
{ {
return std::numeric_limits<eT>::max(); return std::numeric_limits<eT>::max();
skipping to change at line 212 skipping to change at line 207
typedef Datum<float> fdatum; typedef Datum<float> fdatum;
typedef Datum<double> datum; typedef Datum<double> datum;
namespace priv namespace priv
{ {
template<typename eT> template<typename eT>
static static
arma_inline arma_inline
arma_hot arma_hot
typename arma_float_only<eT>::result typename arma_real_only<eT>::result
most_neg(typename arma_float_only<eT>::result* junk = 0) most_neg(typename arma_real_only<eT>::result* junk = 0)
{ {
arma_ignore(junk); arma_ignore(junk);
if(std::numeric_limits<eT>::has_infinity == true) if(std::numeric_limits<eT>::has_infinity == true)
{ {
return -(std::numeric_limits<eT>::infinity()); return -(std::numeric_limits<eT>::infinity());
} }
else else
{ {
return -(std::numeric_limits<eT>::max()); return -(std::numeric_limits<eT>::max());
skipping to change at line 243 skipping to change at line 238
{ {
arma_ignore(junk); arma_ignore(junk);
return std::numeric_limits<eT>::min(); return std::numeric_limits<eT>::min();
} }
template<typename eT> template<typename eT>
static static
arma_inline arma_inline
arma_hot arma_hot
typename arma_float_only<eT>::result typename arma_real_only<eT>::result
most_pos(typename arma_float_only<eT>::result* junk = 0) most_pos(typename arma_real_only<eT>::result* junk = 0)
{ {
arma_ignore(junk); arma_ignore(junk);
if(std::numeric_limits<eT>::has_infinity == true) if(std::numeric_limits<eT>::has_infinity == true)
{ {
return std::numeric_limits<eT>::infinity(); return std::numeric_limits<eT>::infinity();
} }
else else
{ {
return std::numeric_limits<eT>::max(); return std::numeric_limits<eT>::max();
 End of changes. 5 change blocks. 
16 lines changed or deleted 11 lines changed or added


 constants_compat.hpp   constants_compat.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 constants_compat //! \addtogroup constants_compat
//! @{ //! @{
// the Math and Phy classes are kept for compatibility with old code; // the Math and Phy classes are kept for compatibility with old code;
// for new code, use the Datum class instead // for new code, use the Datum class instead
// eg. instead of math::pi(), use datum::pi // eg. instead of math::pi(), use datum::pi
template<typename eT> template<typename eT>
class Math class Math
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 debug.hpp   debug.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// Copyright (C) 2011 Stanislav Funiak // Copyright (C) 2011 Stanislav Funiak
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 debug //! \addtogroup debug
//! @{ //! @{
template<typename T> template<typename T>
inline inline
std::ostream& std::ostream&
arma_stream_err1(std::ostream* user_stream) arma_stream_err1(std::ostream* user_stream)
{ {
static std::ostream* stream_err1 = &(ARMA_DEFAULT_OSTREAM); static std::ostream* stream_err1 = &(ARMA_DEFAULT_OSTREAM);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 diagmat_proxy.hpp   diagmat_proxy.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 diagmat_proxy //! \addtogroup diagmat_proxy
//! @{ //! @{
template<typename T1> template<typename T1>
class diagmat_proxy_default class diagmat_proxy_default
{ {
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 diagview_bones.hpp   diagview_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 diagview //! \addtogroup diagview
//! @{ //! @{
//! Class for storing data required to extract and set the diagonals of a m atrix //! Class for storing data required to extract and set the diagonals of a m atrix
template<typename eT> template<typename eT>
class diagview : public Base<eT, diagview<eT> > class diagview : public Base<eT, diagview<eT> >
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 diagview_meat.hpp   diagview_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 diagview //! \addtogroup diagview
//! @{ //! @{
template<typename eT> template<typename eT>
inline inline
diagview<eT>::~diagview() diagview<eT>::~diagview()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 diskio_bones.hpp   diskio_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// Copyright (C) 2009-2010 Ian Cullinan // Copyright (C) 2009-2010 Ian Cullinan
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 diskio //! \addtogroup diskio
//! @{ //! @{
//! class for saving and loading matrices and fields //! class for saving and loading matrices and fields
class diskio class diskio
{ {
public: public:
template<typename eT> inline static std::string gen_txt_header(const Mat< eT>& x); template<typename eT> inline static std::string gen_txt_header(const Mat< eT>& x);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 diskio_meat.hpp   diskio_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// Copyright (C) 2009-2010 Ian Cullinan // Copyright (C) 2009-2010 Ian Cullinan
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 diskio //! \addtogroup diskio
//! @{ //! @{
//! Generate the first line of the header used for saving matrices in text format. //! Generate the first line of the header used for saving matrices in text format.
//! Format: "ARMA_MAT_TXT_ABXYZ". //! Format: "ARMA_MAT_TXT_ABXYZ".
//! A is one of: I (for integral types) or F (for floating point types). //! A is one of: I (for integral types) or F (for floating point types).
//! B is one of: U (for unsigned types), S (for signed types), N (for not a ppliable) or C (for complex types). //! B is one of: U (for unsigned types), S (for signed types), N (for not a ppliable) or C (for complex types).
//! XYZ specifies the width of each element in terms of bytes, e.g. "008" i ndicates eight bytes. //! XYZ specifies the width of each element in terms of bytes, e.g. "008" i ndicates eight bytes.
template<typename eT> template<typename eT>
skipping to change at line 2582 skipping to change at line 2577
} }
return load_okay; return load_okay;
} }
template<typename T> template<typename T>
inline inline
bool bool
diskio::load_coord_ascii(SpMat< std::complex<T> >& x, std::istream& f, std: :string& err_msg) diskio::load_coord_ascii(SpMat< std::complex<T> >& x, std::istream& f, std: :string& err_msg)
{ {
typedef std::complex<T> eT;
bool load_okay = f.good(); bool load_okay = f.good();
f.clear(); f.clear();
const std::fstream::pos_type pos1 = f.tellg(); const std::fstream::pos_type pos1 = f.tellg();
// //
// work out the size // work out the size
uword f_n_rows = 0; uword f_n_rows = 0;
uword f_n_cols = 0; uword f_n_cols = 0;
 End of changes. 2 change blocks. 
10 lines changed or deleted 3 lines changed or added


 eGlueCube_bones.hpp   eGlueCube_bones.hpp 
// Copyright (C) 2010-2011 NICTA (www.nicta.com.au) // Copyright (C) 2010-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2011 Conrad Sanderson // Copyright (C) 2010-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 eGlueCube //! \addtogroup eGlueCube
//! @{ //! @{
template<typename T1, typename T2, typename eglue_type> template<typename T1, typename T2, typename eglue_type>
class eGlueCube : public BaseCube<typename T1::elem_type, eGlueCube<T1, T2, eglue_type> > class eGlueCube : public BaseCube<typename T1::elem_type, eGlueCube<T1, T2, eglue_type> >
{ {
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 eGlueCube_meat.hpp   eGlueCube_meat.hpp 
// Copyright (C) 2010-2011 NICTA (www.nicta.com.au) // Copyright (C) 2010-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2011 Conrad Sanderson // Copyright (C) 2010-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 eGlueCube //! \addtogroup eGlueCube
//! @{ //! @{
template<typename T1, typename T2, typename eglue_type> template<typename T1, typename T2, typename eglue_type>
arma_inline arma_inline
eGlueCube<T1,T2,eglue_type>::~eGlueCube() eGlueCube<T1,T2,eglue_type>::~eGlueCube()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
skipping to change at line 84 skipping to change at line 79
eGlueCube<T1,T2,eglue_type>::get_n_elem() const eGlueCube<T1,T2,eglue_type>::get_n_elem() const
{ {
return P1.get_n_elem(); return P1.get_n_elem();
} }
template<typename T1, typename T2, typename eglue_type> template<typename T1, typename T2, typename eglue_type>
arma_inline arma_inline
typename T1::elem_type typename T1::elem_type
eGlueCube<T1,T2,eglue_type>::operator[] (const uword i) const eGlueCube<T1,T2,eglue_type>::operator[] (const uword i) const
{ {
typedef typename T1::elem_type eT;
// the optimiser will keep only one return statement // the optimiser will keep only one return statement
if(is_same_type<eglue_type, eglue_plus >::value == true) { return P1 [i] + P2[i]; } if(is_same_type<eglue_type, eglue_plus >::value == true) { return P1 [i] + P2[i]; }
else if(is_same_type<eglue_type, eglue_minus>::value == true) { return P1 [i] - P2[i]; } else if(is_same_type<eglue_type, eglue_minus>::value == true) { return P1 [i] - P2[i]; }
else if(is_same_type<eglue_type, eglue_div >::value == true) { return P1 [i] / P2[i]; } else if(is_same_type<eglue_type, eglue_div >::value == true) { return P1 [i] / P2[i]; }
else if(is_same_type<eglue_type, eglue_schur>::value == true) { return P1 [i] * P2[i]; } else if(is_same_type<eglue_type, eglue_schur>::value == true) { return P1 [i] * P2[i]; }
} }
template<typename T1, typename T2, typename eglue_type> template<typename T1, typename T2, typename eglue_type>
arma_inline arma_inline
typename T1::elem_type typename T1::elem_type
eGlueCube<T1,T2,eglue_type>::at(const uword row, const uword col, const uwo rd slice) const eGlueCube<T1,T2,eglue_type>::at(const uword row, const uword col, const uwo rd slice) const
{ {
typedef typename T1::elem_type eT;
// the optimiser will keep only one return statement // the optimiser will keep only one return statement
if(is_same_type<eglue_type, eglue_plus >::value == true) { return P1 .at(row,col,slice) + P2.at(row,col,slice); } if(is_same_type<eglue_type, eglue_plus >::value == true) { return P1 .at(row,col,slice) + P2.at(row,col,slice); }
else if(is_same_type<eglue_type, eglue_minus>::value == true) { return P1 .at(row,col,slice) - P2.at(row,col,slice); } else if(is_same_type<eglue_type, eglue_minus>::value == true) { return P1 .at(row,col,slice) - P2.at(row,col,slice); }
else if(is_same_type<eglue_type, eglue_div >::value == true) { return P1 .at(row,col,slice) / P2.at(row,col,slice); } else if(is_same_type<eglue_type, eglue_div >::value == true) { return P1 .at(row,col,slice) / P2.at(row,col,slice); }
else if(is_same_type<eglue_type, eglue_schur>::value == true) { return P1 .at(row,col,slice) * P2.at(row,col,slice); } else if(is_same_type<eglue_type, eglue_schur>::value == true) { return P1 .at(row,col,slice) * P2.at(row,col,slice); }
} }
//! @} //! @}
 End of changes. 3 change blocks. 
12 lines changed or deleted 3 lines changed or added


 eGlue_bones.hpp   eGlue_bones.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 eGlue //! \addtogroup eGlue
//! @{ //! @{
template<typename T1, typename T2, typename eglue_type> template<typename T1, typename T2, typename eglue_type>
class eGlue : public Base<typename T1::elem_type, eGlue<T1, T2, eglue_type> > class eGlue : public Base<typename T1::elem_type, eGlue<T1, T2, eglue_type> >
{ {
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 eGlue_meat.hpp   eGlue_meat.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 eGlue //! \addtogroup eGlue
//! @{ //! @{
template<typename T1, typename T2, typename eglue_type> template<typename T1, typename T2, typename eglue_type>
arma_inline arma_inline
eGlue<T1,T2,eglue_type>::~eGlue() eGlue<T1,T2,eglue_type>::~eGlue()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
skipping to change at line 69 skipping to change at line 64
eGlue<T1,T2,eglue_type>::get_n_elem() const eGlue<T1,T2,eglue_type>::get_n_elem() const
{ {
return Proxy<T1>::is_fixed ? P1.get_n_elem() : ( Proxy<T2>::is_fixed ? P2 .get_n_elem() : P1.get_n_elem() ) ; return Proxy<T1>::is_fixed ? P1.get_n_elem() : ( Proxy<T2>::is_fixed ? P2 .get_n_elem() : P1.get_n_elem() ) ;
} }
template<typename T1, typename T2, typename eglue_type> template<typename T1, typename T2, typename eglue_type>
arma_inline arma_inline
typename T1::elem_type typename T1::elem_type
eGlue<T1,T2,eglue_type>::operator[] (const uword ii) const eGlue<T1,T2,eglue_type>::operator[] (const uword ii) const
{ {
typedef typename T1::elem_type eT;
// the optimiser will keep only one return statement // the optimiser will keep only one return statement
if(is_same_type<eglue_type, eglue_plus >::value == true) { return P1 [ii] + P2[ii]; } if(is_same_type<eglue_type, eglue_plus >::value == true) { return P1 [ii] + P2[ii]; }
else if(is_same_type<eglue_type, eglue_minus>::value == true) { return P1 [ii] - P2[ii]; } else if(is_same_type<eglue_type, eglue_minus>::value == true) { return P1 [ii] - P2[ii]; }
else if(is_same_type<eglue_type, eglue_div >::value == true) { return P1 [ii] / P2[ii]; } else if(is_same_type<eglue_type, eglue_div >::value == true) { return P1 [ii] / P2[ii]; }
else if(is_same_type<eglue_type, eglue_schur>::value == true) { return P1 [ii] * P2[ii]; } else if(is_same_type<eglue_type, eglue_schur>::value == true) { return P1 [ii] * P2[ii]; }
} }
template<typename T1, typename T2, typename eglue_type> template<typename T1, typename T2, typename eglue_type>
arma_inline arma_inline
typename T1::elem_type typename T1::elem_type
eGlue<T1,T2,eglue_type>::at(const uword row, const uword col) const eGlue<T1,T2,eglue_type>::at(const uword row, const uword col) const
{ {
typedef typename T1::elem_type eT;
// the optimiser will keep only one return statement // the optimiser will keep only one return statement
if(is_same_type<eglue_type, eglue_plus >::value == true) { return P1 .at(row,col) + P2.at(row,col); } if(is_same_type<eglue_type, eglue_plus >::value == true) { return P1 .at(row,col) + P2.at(row,col); }
else if(is_same_type<eglue_type, eglue_minus>::value == true) { return P1 .at(row,col) - P2.at(row,col); } else if(is_same_type<eglue_type, eglue_minus>::value == true) { return P1 .at(row,col) - P2.at(row,col); }
else if(is_same_type<eglue_type, eglue_div >::value == true) { return P1 .at(row,col) / P2.at(row,col); } else if(is_same_type<eglue_type, eglue_div >::value == true) { return P1 .at(row,col) / P2.at(row,col); }
else if(is_same_type<eglue_type, eglue_schur>::value == true) { return P1 .at(row,col) * P2.at(row,col); } else if(is_same_type<eglue_type, eglue_schur>::value == true) { return P1 .at(row,col) * P2.at(row,col); }
} }
//! @} //! @}
 End of changes. 3 change blocks. 
12 lines changed or deleted 3 lines changed or added


 eOpCube_bones.hpp   eOpCube_bones.hpp 
// Copyright (C) 2010-2011 NICTA (www.nicta.com.au) // Copyright (C) 2010-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2011 Conrad Sanderson // Copyright (C) 2010-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 eOpCube //! \addtogroup eOpCube
//! @{ //! @{
template<typename T1, typename eop_type> template<typename T1, typename eop_type>
class eOpCube : public BaseCube<typename T1::elem_type, eOpCube<T1, eop_typ e> > class eOpCube : public BaseCube<typename T1::elem_type, eOpCube<T1, eop_typ e> >
{ {
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 eOpCube_meat.hpp   eOpCube_meat.hpp 
// Copyright (C) 2010-2011 NICTA (www.nicta.com.au) // Copyright (C) 2010-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2011 Conrad Sanderson // Copyright (C) 2010-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 eOpCube //! \addtogroup eOpCube
//! @{ //! @{
template<typename T1, typename eop_type> template<typename T1, typename eop_type>
eOpCube<T1, eop_type>::eOpCube(const BaseCube<typename T1::elem_type, T1>& in_m) eOpCube<T1, eop_type>::eOpCube(const BaseCube<typename T1::elem_type, T1>& in_m)
: P (in_m.get_ref()) : P (in_m.get_ref())
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
skipping to change at line 120 skipping to change at line 115
eOpCube<T1, eop_type>::operator[] (const uword i) const eOpCube<T1, eop_type>::operator[] (const uword i) const
{ {
return eop_core<eop_type>::process(P[i], aux); return eop_core<eop_type>::process(P[i], aux);
} }
template<typename T1, typename eop_type> template<typename T1, typename eop_type>
arma_inline arma_inline
typename T1::elem_type typename T1::elem_type
eOpCube<T1, eop_type>::at(const uword row, const uword col, const uword sli ce) const eOpCube<T1, eop_type>::at(const uword row, const uword col, const uword sli ce) const
{ {
typedef typename T1::elem_type eT;
return eop_core<eop_type>::process(P.at(row, col, slice), aux); return eop_core<eop_type>::process(P.at(row, col, slice), aux);
} }
//! @} //! @}
 End of changes. 2 change blocks. 
10 lines changed or deleted 3 lines changed or added


 eOp_bones.hpp   eOp_bones.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 eOp //! \addtogroup eOp
//! @{ //! @{
template<typename T1, typename eop_type> template<typename T1, typename eop_type>
class eOp : public Base<typename T1::elem_type, eOp<T1, eop_type> > class eOp : public Base<typename T1::elem_type, eOp<T1, eop_type> >
{ {
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 eOp_meat.hpp   eOp_meat.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 eOp //! \addtogroup eOp
//! @{ //! @{
template<typename T1, typename eop_type> template<typename T1, typename eop_type>
eOp<T1, eop_type>::eOp(const T1& in_m) eOp<T1, eop_type>::eOp(const T1& in_m)
: P(in_m) : P(in_m)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 eglue_core_bones.hpp   eglue_core_bones.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 eglue_core //! \addtogroup eglue_core
//! @{ //! @{
template<typename eglue_type> template<typename eglue_type>
struct eglue_core struct eglue_core
{ {
// matrices // matrices
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 eglue_core_meat.hpp   eglue_core_meat.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 eglue_core //! \addtogroup eglue_core
//! @{ //! @{
#undef arma_applier_1 #undef arma_applier_1
#undef arma_applier_2 #undef arma_applier_2
#undef arma_applier_3 #undef arma_applier_3
#undef operatorA #undef operatorA
#undef operatorB #undef operatorB
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 eop_aux.hpp   eop_aux.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 eop_aux //! \addtogroup eop_aux
//! @{ //! @{
template<typename eT> template<typename eT>
struct eop_aux_randu struct eop_aux_randu
{ {
arma_inline arma_inline
operator eT () operator eT ()
{ {
skipping to change at line 195 skipping to change at line 190
//! http://en.wikipedia.org/wiki/SFINAE //! http://en.wikipedia.org/wiki/SFINAE
class eop_aux class eop_aux
{ {
public: public:
template<typename eT> arma_inline static typename arma_integral_only<eT>: :result acos (const eT x) { return eT( std::acos(double(x)) ); } template<typename eT> arma_inline static typename arma_integral_only<eT>: :result acos (const eT x) { return eT( std::acos(double(x)) ); }
template<typename eT> arma_inline static typename arma_integral_only<eT>: :result asin (const eT x) { return eT( std::asin(double(x)) ); } template<typename eT> arma_inline static typename arma_integral_only<eT>: :result asin (const eT x) { return eT( std::asin(double(x)) ); }
template<typename eT> arma_inline static typename arma_integral_only<eT>: :result atan (const eT x) { return eT( std::atan(double(x)) ); } template<typename eT> arma_inline static typename arma_integral_only<eT>: :result atan (const eT x) { return eT( std::atan(double(x)) ); }
template<typename eT> arma_inline static typename arma_float_only<eT>::re template<typename eT> arma_inline static typename arma_real_only<eT>::res
sult acos (const eT x) { return std::acos(x); } ult acos (const eT x) { return std::acos(x); }
template<typename eT> arma_inline static typename arma_float_only<eT>::re template<typename eT> arma_inline static typename arma_real_only<eT>::res
sult asin (const eT x) { return std::asin(x); } ult asin (const eT x) { return std::asin(x); }
template<typename eT> arma_inline static typename arma_float_only<eT>::re template<typename eT> arma_inline static typename arma_real_only<eT>::res
sult atan (const eT x) { return std::atan(x); } ult atan (const eT x) { return std::atan(x); }
template<typename eT> arma_inline static typename arma_cx_only<eT>::resul t acos (const eT x) { return arma_acos(x); } template<typename eT> arma_inline static typename arma_cx_only<eT>::resul t acos (const eT x) { return arma_acos(x); }
template<typename eT> arma_inline static typename arma_cx_only<eT>::resul t asin (const eT x) { return arma_asin(x); } template<typename eT> arma_inline static typename arma_cx_only<eT>::resul t asin (const eT x) { return arma_asin(x); }
template<typename eT> arma_inline static typename arma_cx_only<eT>::resul t atan (const eT x) { return arma_atan(x); } template<typename eT> arma_inline static typename arma_cx_only<eT>::resul t atan (const eT x) { return arma_atan(x); }
template<typename eT> arma_inline static typename arma_integral_only<eT>: :result acosh (const eT x) { return eT( arma_acosh(double(x)) ); } template<typename eT> arma_inline static typename arma_integral_only<eT>: :result acosh (const eT x) { return eT( arma_acosh(double(x)) ); }
template<typename eT> arma_inline static typename arma_integral_only<eT>: :result asinh (const eT x) { return eT( arma_asinh(double(x)) ); } template<typename eT> arma_inline static typename arma_integral_only<eT>: :result asinh (const eT x) { return eT( arma_asinh(double(x)) ); }
template<typename eT> arma_inline static typename arma_integral_only<eT>: :result atanh (const eT x) { return eT( arma_atanh(double(x)) ); } template<typename eT> arma_inline static typename arma_integral_only<eT>: :result atanh (const eT x) { return eT( arma_atanh(double(x)) ); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e template<typename eT> arma_inline static typename arma_real_or_cx_only<eT
T>::result acosh (const eT x) { return arma_acosh(x); } >::result acosh (const eT x) { return arma_acosh(x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e template<typename eT> arma_inline static typename arma_real_or_cx_only<eT
T>::result asinh (const eT x) { return arma_asinh(x); } >::result asinh (const eT x) { return arma_asinh(x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e template<typename eT> arma_inline static typename arma_real_or_cx_only<eT
T>::result atanh (const eT x) { return arma_atanh(x); } >::result atanh (const eT x) { return arma_atanh(x); }
template<typename eT> arma_inline static typename arma_not_cx<eT>::result conj(const eT x) { return x; } template<typename eT> arma_inline static typename arma_not_cx<eT>::result conj(const eT x) { return x; }
template<typename T> arma_inline static std::complex<T> conj(const std::complex<T>& x) { return std::conj(x); } template<typename T> arma_inline static std::complex<T> conj(const std::complex<T>& x) { return std::conj(x); }
template<typename eT> arma_inline static typename arma_integral_only<eT>: :result sqrt (const eT x) { return eT( std::sqrt (double(x)) ); } template<typename eT> arma_inline static typename arma_integral_only<eT>: :result sqrt (const eT x) { return eT( std::sqrt (double(x)) ); }
template<typename eT> arma_inline static typename arma_integral_only<eT>: :result log10 (const eT x) { return eT( std::log10(double(x)) ); } template<typename eT> arma_inline static typename arma_integral_only<eT>: :result log10 (const eT x) { return eT( std::log10(double(x)) ); }
template<typename eT> arma_inline static typename arma_integral_only<eT>: :result log (const eT x) { return eT( std::log (double(x)) ); } template<typename eT> arma_inline static typename arma_integral_only<eT>: :result log (const eT x) { return eT( std::log (double(x)) ); }
template<typename eT> arma_inline static typename arma_integral_only<eT>: :result exp (const eT x) { return eT( std::exp (double(x)) ); } template<typename eT> arma_inline static typename arma_integral_only<eT>: :result exp (const eT x) { return eT( std::exp (double(x)) ); }
template<typename eT> arma_inline static typename arma_integral_only<eT>: :result cos (const eT x) { return eT( std::cos (double(x)) ); } template<typename eT> arma_inline static typename arma_integral_only<eT>: :result cos (const eT x) { return eT( std::cos (double(x)) ); }
template<typename eT> arma_inline static typename arma_integral_only<eT>: :result sin (const eT x) { return eT( std::sin (double(x)) ); } template<typename eT> arma_inline static typename arma_integral_only<eT>: :result sin (const eT x) { return eT( std::sin (double(x)) ); }
template<typename eT> arma_inline static typename arma_integral_only<eT>: :result tan (const eT x) { return eT( std::tan (double(x)) ); } template<typename eT> arma_inline static typename arma_integral_only<eT>: :result tan (const eT x) { return eT( std::tan (double(x)) ); }
template<typename eT> arma_inline static typename arma_integral_only<eT>: :result cosh (const eT x) { return eT( std::cosh (double(x)) ); } template<typename eT> arma_inline static typename arma_integral_only<eT>: :result cosh (const eT x) { return eT( std::cosh (double(x)) ); }
template<typename eT> arma_inline static typename arma_integral_only<eT>: :result sinh (const eT x) { return eT( std::sinh (double(x)) ); } template<typename eT> arma_inline static typename arma_integral_only<eT>: :result sinh (const eT x) { return eT( std::sinh (double(x)) ); }
template<typename eT> arma_inline static typename arma_integral_only<eT>: :result tanh (const eT x) { return eT( std::tanh (double(x)) ); } template<typename eT> arma_inline static typename arma_integral_only<eT>: :result tanh (const eT x) { return eT( std::tanh (double(x)) ); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e template<typename eT> arma_inline static typename arma_real_or_cx_only<eT
T>::result sqrt (const eT x) { return std::sqrt (x); } >::result sqrt (const eT x) { return std::sqrt (x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e template<typename eT> arma_inline static typename arma_real_or_cx_only<eT
T>::result log10 (const eT x) { return std::log10(x); } >::result log10 (const eT x) { return std::log10(x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e template<typename eT> arma_inline static typename arma_real_or_cx_only<eT
T>::result log (const eT x) { return std::log (x); } >::result log (const eT x) { return std::log (x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e template<typename eT> arma_inline static typename arma_real_or_cx_only<eT
T>::result exp (const eT x) { return std::exp (x); } >::result exp (const eT x) { return std::exp (x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e template<typename eT> arma_inline static typename arma_real_or_cx_only<eT
T>::result cos (const eT x) { return std::cos (x); } >::result cos (const eT x) { return std::cos (x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e template<typename eT> arma_inline static typename arma_real_or_cx_only<eT
T>::result sin (const eT x) { return std::sin (x); } >::result sin (const eT x) { return std::sin (x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e template<typename eT> arma_inline static typename arma_real_or_cx_only<eT
T>::result tan (const eT x) { return std::tan (x); } >::result tan (const eT x) { return std::tan (x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e template<typename eT> arma_inline static typename arma_real_or_cx_only<eT
T>::result cosh (const eT x) { return std::cosh (x); } >::result cosh (const eT x) { return std::cosh (x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e template<typename eT> arma_inline static typename arma_real_or_cx_only<eT
T>::result sinh (const eT x) { return std::sinh (x); } >::result sinh (const eT x) { return std::sinh (x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e template<typename eT> arma_inline static typename arma_real_or_cx_only<eT
T>::result tanh (const eT x) { return std::tanh (x); } >::result tanh (const eT x) { return std::tanh (x); }
template<typename eT> arma_inline static typename arma_unsigned_integral_ only<eT>::result neg (const eT x) { return x; } template<typename eT> arma_inline static typename arma_unsigned_integral_ only<eT>::result neg (const eT x) { return x; }
template<typename eT> arma_inline static typename arma_signed_only<eT>::r esult neg (const eT x) { return -x; } template<typename eT> arma_inline static typename arma_signed_only<eT>::r esult neg (const eT x) { return -x; }
template<typename eT> arma_inline static typename arma_integral_only<eT>: :result floor(const eT x) { return x; } template<typename eT> arma_inline static typename arma_integral_only<eT>: :result floor(const eT x) { return x; }
template<typename eT> arma_inline static typename arma_float_only<eT>::re sult floor(const eT x) { return std::floor(x); } template<typename eT> arma_inline static typename arma_real_only<eT>::res ult floor(const eT x) { return std::floor(x); }
template<typename eT> arma_inline static typename arma_cx_only<eT>::resul t floor(const eT& x) { return eT( std::floor(x.real()), std::floor(x. imag()) ); } template<typename eT> arma_inline static typename arma_cx_only<eT>::resul t floor(const eT& x) { return eT( std::floor(x.real()), std::floor(x. imag()) ); }
template<typename eT> arma_inline static typename arma_integral_only<eT>: :result ceil(const eT x) { return x; } template<typename eT> arma_inline static typename arma_integral_only<eT>: :result ceil(const eT x) { return x; }
template<typename eT> arma_inline static typename arma_float_only<eT>::re sult ceil(const eT x) { return std::ceil(x); } template<typename eT> arma_inline static typename arma_real_only<eT>::res ult ceil(const eT x) { return std::ceil(x); }
template<typename eT> arma_inline static typename arma_cx_only<eT>::resul t ceil(const eT& x) { return eT( std::ceil(x.real()), std::ceil(x.im ag()) ); } template<typename eT> arma_inline static typename arma_cx_only<eT>::resul t ceil(const eT& x) { return eT( std::ceil(x.real()), std::ceil(x.im ag()) ); }
template<typename eT> arma_inline static typename arma_integral_only<eT>:
:result round(const eT x) { return x;
}
template<typename eT> arma_inline static typename arma_real_only<eT>::res
ult round(const eT x) { return (x >= eT(0)) ? std::floor(x+0.5) : std:
:ceil(x-0.5); }
template<typename eT> arma_inline static typename arma_cx_only<eT>::resul
t round(const eT& x) { return eT( eop_aux::round(x.real()), eop_aux::
round(x.imag()) ); }
template<typename eT> template<typename eT>
arma_inline arma_inline
static static
typename arma_integral_only<eT>::result typename arma_integral_only<eT>::result
log2 (const eT x) log2 (const eT x)
{ {
return eT( std::log(double(x))/ double(0.69314718055994530942) ); return eT( std::log(double(x))/ double(0.69314718055994530942) );
} }
template<typename eT> template<typename eT>
arma_inline arma_inline
static static
typename arma_float_or_cx_only<eT>::result typename arma_real_or_cx_only<eT>::result
log2 (const eT x) log2 (const eT x)
{ {
typedef typename get_pod_type<eT>::result T; typedef typename get_pod_type<eT>::result T;
return std::log(x) / T(0.69314718055994530942); return std::log(x) / T(0.69314718055994530942);
} }
template<typename eT> template<typename eT>
arma_inline arma_inline
static static
typename arma_integral_only<eT>::result typename arma_integral_only<eT>::result
exp10 (const eT x) exp10 (const eT x)
{ {
return eT( std::pow(double(10), double(x)) ); return eT( std::pow(double(10), double(x)) );
} }
template<typename eT> template<typename eT>
arma_inline arma_inline
static static
typename typename
arma_float_or_cx_only<eT>::result arma_real_or_cx_only<eT>::result
exp10 (const eT x) exp10 (const eT x)
{ {
typedef typename get_pod_type<eT>::result T; typedef typename get_pod_type<eT>::result T;
return std::pow( T(10), x); return std::pow( T(10), x);
} }
template<typename eT> template<typename eT>
arma_inline arma_inline
static static
typename arma_integral_only<eT>::result typename arma_integral_only<eT>::result
exp2 (const eT x) exp2 (const eT x)
{ {
return eT( std::pow(double(2), double(x)) ); return eT( std::pow(double(2), double(x)) );
} }
template<typename eT> template<typename eT>
arma_inline arma_inline
static static
typename arma_float_or_cx_only<eT>::result typename arma_real_or_cx_only<eT>::result
exp2 (const eT x) exp2 (const eT x)
{ {
typedef typename get_pod_type<eT>::result T; typedef typename get_pod_type<eT>::result T;
return std::pow( T(2), x); return std::pow( T(2), x);
} }
template<typename T1, typename T2> template<typename T1, typename T2>
arma_inline arma_inline
static static
typename arma_float_or_cx_only<T1>::result typename arma_real_or_cx_only<T1>::result
pow(const T1 base, const T2 exponent) pow(const T1 base, const T2 exponent)
{ {
return std::pow(base, exponent); return std::pow(base, exponent);
} }
template<typename T1, typename T2> template<typename T1, typename T2>
arma_inline arma_inline
static static
typename arma_integral_only<T1>::result typename arma_integral_only<T1>::result
pow(const T1 base, const T2 exponent) pow(const T1 base, const T2 exponent)
skipping to change at line 335 skipping to change at line 334
static static
typename arma_integral_only<eT>::result typename arma_integral_only<eT>::result
direct_eps(const eT) direct_eps(const eT)
{ {
return eT(0); return eT(0);
} }
template<typename eT> template<typename eT>
inline inline
static static
typename arma_float_only<eT>::result typename arma_real_only<eT>::result
direct_eps(const eT x) direct_eps(const eT x)
{ {
//arma_extra_debug_sigprint(); //arma_extra_debug_sigprint();
// acording to IEEE Standard for Floating-Point Arithmetic (IEEE 754) // acording to IEEE Standard for Floating-Point Arithmetic (IEEE 754)
// the mantissa length for double is 53 bits = std::numeric_limits<doub le>::digits // the mantissa length for double is 53 bits = std::numeric_limits<doub le>::digits
// the mantissa length for float is 24 bits = std::numeric_limits<floa t >::digits // the mantissa length for float is 24 bits = std::numeric_limits<floa t >::digits
//return std::pow( std::numeric_limits<eT>::radix, (std::floor(std::log 10(std::abs(x))/std::log10(std::numeric_limits<eT>::radix))-(std::numeric_l imits<eT>::digits-1)) ); //return std::pow( std::numeric_limits<eT>::radix, (std::floor(std::log 10(std::abs(x))/std::log10(std::numeric_limits<eT>::radix))-(std::numeric_l imits<eT>::digits-1)) );
const eT radix_eT = eT(std::numeric_limits<eT>::radix); const eT radix_eT = eT(std::numeric_limits<eT>::radix);
const eT digits_m1_eT = eT(std::numeric_limits<eT>::digits - 1); const eT digits_m1_eT = eT(std::numeric_limits<eT>::digits - 1);
// return std::pow( radix_eT, eT(std::floor(std::log10(std::abs(x))/std ::log10(radix_eT)) - digits_m1_eT) ); // return std::pow( radix_eT, eT(std::floor(std::log10(std::abs(x))/std ::log10(radix_eT)) - digits_m1_eT) );
return eop_aux::pow( radix_eT, eT(std::floor(std::log10(std::abs(x))/st d::log10(radix_eT)) - digits_m1_eT) ); return eop_aux::pow( radix_eT, eT(std::floor(std::log10(std::abs(x))/st d::log10(radix_eT)) - digits_m1_eT) );
} }
template<typename T> template<typename T>
inline inline
static static
typename arma_float_only<T>::result typename arma_real_only<T>::result
direct_eps(const std::complex<T> x) direct_eps(const std::complex<T> x)
{ {
//arma_extra_debug_sigprint(); //arma_extra_debug_sigprint();
//return std::pow( std::numeric_limits<T>::radix, (std::floor(std::log1 0(std::abs(x))/std::log10(std::numeric_limits<T>::radix))-(std::numeric_lim its<T>::digits-1)) ); //return std::pow( std::numeric_limits<T>::radix, (std::floor(std::log1 0(std::abs(x))/std::log10(std::numeric_limits<T>::radix))-(std::numeric_lim its<T>::digits-1)) );
const T radix_T = T(std::numeric_limits<T>::radix); const T radix_T = T(std::numeric_limits<T>::radix);
const T digits_m1_T = T(std::numeric_limits<T>::digits - 1); const T digits_m1_T = T(std::numeric_limits<T>::digits - 1);
return std::pow( radix_T, T(std::floor(std::log10(std::abs(x))/std::log 10(radix_T)) - digits_m1_T) ); return std::pow( radix_T, T(std::floor(std::log10(std::abs(x))/std::log 10(radix_T)) - digits_m1_T) );
} }
//! work around a bug in GCC 4.4 //! work around a bug in GCC 4.4
template<typename eT> arma_inline static template<typename eT> arma_inline static
typename arma_unsigned_integral_only<eT>::result arma_abs(const eT x) { return x; } typename arma_unsigned_integral_only<eT>::result arma_abs(const eT x) { return x; }
template<typename eT> arma_inline static template<typename eT> arma_inline static
typename arma_signed_integral_only<eT>::result arma_abs(const eT x) { return std::abs(x); } typename arma_signed_integral_only<eT>::result arma_abs(const eT x) { return std::abs(x); }
template<typename eT> arma_inline static template<typename eT> arma_inline static
typename arma_float_only<eT>::result arma_abs(const eT x) { return std::abs(x); } typename arma_real_only<eT>::result arma_abs(const eT x) { return std::abs(x); }
template<typename T> arma_inline static template<typename T> arma_inline static
typename arma_float_only<T>::result arma_abs(const std::comp lex<T> x) { return std::abs(x); } typename arma_real_only<T>::result arma_abs(const std::comp lex<T> x) { return std::abs(x); }
}; };
//! @} //! @}
 End of changes. 15 change blocks. 
50 lines changed or deleted 55 lines changed or added


 eop_core_bones.hpp   eop_core_bones.hpp 
// Copyright (C) 2010-2011 NICTA (www.nicta.com.au) // Copyright (C) 2010-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2011 Conrad Sanderson // Copyright (C) 2010-2013 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 eop_core //! \addtogroup eop_core
//! @{ //! @{
template<typename eop_type> template<typename eop_type>
class eop_core class eop_core
{ {
public: public:
// matrices // matrices
skipping to change at line 79 skipping to change at line 74
class eop_tanh : public eop_core<eop_tanh> {}; class eop_tanh : public eop_core<eop_tanh> {};
class eop_acosh : public eop_core<eop_acosh> {}; class eop_acosh : public eop_core<eop_acosh> {};
class eop_asinh : public eop_core<eop_asinh> {}; class eop_asinh : public eop_core<eop_asinh> {};
class eop_atanh : public eop_core<eop_atanh> {}; class eop_atanh : public eop_core<eop_atanh> {};
class eop_eps : public eop_core<eop_eps> {}; class eop_eps : public eop_core<eop_eps> {};
class eop_abs : public eop_core<eop_abs> {}; class eop_abs : public eop_core<eop_abs> {};
class eop_conj : public eop_core<eop_conj> {}; class eop_conj : public eop_core<eop_conj> {};
class eop_pow : public eop_core<eop_pow> {}; class eop_pow : public eop_core<eop_pow> {};
class eop_floor : public eop_core<eop_floor> {}; class eop_floor : public eop_core<eop_floor> {};
class eop_ceil : public eop_core<eop_ceil> {}; class eop_ceil : public eop_core<eop_ceil> {};
class eop_round : public eop_core<eop_round> {};
//! @} //! @}
 End of changes. 3 change blocks. 
10 lines changed or deleted 6 lines changed or added


 eop_core_meat.hpp   eop_core_meat.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2013 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 eop_core //! \addtogroup eop_core
//! @{ //! @{
#undef arma_applier_1 #undef arma_applier_1
#undef arma_applier_2 #undef arma_applier_2
#undef arma_applier_3 #undef arma_applier_3
#undef operatorA #undef operatorA
#define arma_applier_1(operatorA) \ #define arma_applier_1(operatorA) \
skipping to change at line 594 skipping to change at line 589
template<> template<typename eT> arma_hot arma_pure arma_inline eT template<> template<typename eT> arma_hot arma_pure arma_inline eT
eop_core<eop_pow >::process(const eT val, const eT k) { return eop_aux::pow(val, k); } eop_core<eop_pow >::process(const eT val, const eT k) { return eop_aux::pow(val, k); }
template<> template<typename eT> arma_hot arma_pure arma_inline eT template<> template<typename eT> arma_hot arma_pure arma_inline eT
eop_core<eop_floor >::process(const eT val, const eT ) { return eop_aux::floor(val); } eop_core<eop_floor >::process(const eT val, const eT ) { return eop_aux::floor(val); }
template<> template<typename eT> arma_hot arma_pure arma_inline eT template<> template<typename eT> arma_hot arma_pure arma_inline eT
eop_core<eop_ceil >::process(const eT val, const eT ) { return eop_aux::ceil(val); } eop_core<eop_ceil >::process(const eT val, const eT ) { return eop_aux::ceil(val); }
template<> template<typename eT> arma_hot arma_pure arma_inline eT
eop_core<eop_round >::process(const eT val, const eT ) { return
eop_aux::round(val); }
#undef arma_applier_1 #undef arma_applier_1
#undef arma_applier_2 #undef arma_applier_2
#undef arma_applier_3 #undef arma_applier_3
//! @} //! @}
 End of changes. 3 change blocks. 
10 lines changed or deleted 9 lines changed or added


 field_bones.hpp   field_bones.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// Copyright (C) 2009-2010 Ian Cullinan // Copyright (C) 2009-2010 Ian Cullinan
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 field //! \addtogroup field
//! @{ //! @{
struct field_prealloc_n_elem struct field_prealloc_n_elem
{ {
static const uword val = 16; static const uword val = 16;
}; };
//! A lightweight 2D container for abitrary objects //! A lightweight 2D container for abitrary objects
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 field_meat.hpp   field_meat.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// Copyright (C) 2009-2010 Ian Cullinan // Copyright (C) 2009-2010 Ian Cullinan
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 field //! \addtogroup field
//! @{ //! @{
template<typename oT> template<typename oT>
inline inline
field<oT>::~field() field<oT>::~field()
{ {
arma_extra_debug_sigprint_this(this); arma_extra_debug_sigprint_this(this);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_accu.hpp   fn_accu.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_accu //! \addtogroup fn_accu
//! @{ //! @{
template<typename T1> template<typename T1>
arma_hot arma_hot
inline inline
typename T1::elem_type typename T1::elem_type
accu_proxy_linear(const Proxy<T1>& P) accu_proxy_linear(const Proxy<T1>& P)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_as_scalar.hpp   fn_as_scalar.hpp 
// Copyright (C) 2010-2011 NICTA (www.nicta.com.au) // Copyright (C) 2010-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2011 Conrad Sanderson // Copyright (C) 2010-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_as_scalar //! \addtogroup fn_as_scalar
//! @{ //! @{
template<uword N> template<uword N>
struct as_scalar_redirect struct as_scalar_redirect
{ {
template<typename T1> template<typename T1>
inline static typename T1::elem_type apply(const T1& X); inline static typename T1::elem_type apply(const T1& X);
}; };
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_chol.hpp   fn_chol.hpp 
// Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // Copyright (C) 2009-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_chol //! \addtogroup fn_chol
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
const Op<T1, op_chol> const Op<T1, op_chol>
chol chol
( (
const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_type,T1>& X,
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_conv.hpp   fn_conv.hpp 
// Copyright (C) 2010 NICTA (www.nicta.com.au) // Copyright (C) 2010 NICTA (www.nicta.com.au)
// Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_conv //! \addtogroup fn_conv
//! @{ //! @{
//! Convolution, which is also equivalent to polynomial multiplication and FIR digital filtering. //! Convolution, which is also equivalent to polynomial multiplication and FIR digital filtering.
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
const Glue<T1, T2, glue_conv> const Glue<T1, T2, glue_conv>
conv(const Base<typename T1::elem_type,T1>& A, const Base<typename T1::elem _type,T2>& B) conv(const Base<typename T1::elem_type,T1>& A, const Base<typename T1::elem _type,T2>& B)
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_conv_to.hpp   fn_conv_to.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_conv_to //! \addtogroup fn_conv_to
//! @{ //! @{
//! conversion from Armadillo Base and BaseCube objects to scalars //! conversion from Armadillo Base and BaseCube objects to scalars
//! (kept only for compatibility with old code; use as_scalar() instead for Base objects like Mat) //! (kept only for compatibility with old code; use as_scalar() instead for Base objects like Mat)
template<typename out_eT> template<typename out_eT>
class conv_to class conv_to
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_cor.hpp   fn_cor.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_cor //! \addtogroup fn_cor
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
const Op<T1, op_cor> const Op<T1, op_cor>
cor(const Base<typename T1::elem_type,T1>& X, const uword norm_type = 0) cor(const Base<typename T1::elem_type,T1>& X, const uword norm_type = 0)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_cov.hpp   fn_cov.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_cov //! \addtogroup fn_cov
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
const Op<T1, op_cov> const Op<T1, op_cov>
cov(const Base<typename T1::elem_type,T1>& X, const uword norm_type = 0) cov(const Base<typename T1::elem_type,T1>& X, const uword norm_type = 0)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_cross.hpp   fn_cross.hpp 
// Copyright (C) 2010 NICTA (www.nicta.com.au) // Copyright (C) 2010 NICTA (www.nicta.com.au)
// Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_cross //! \addtogroup fn_cross
//! @{ //! @{
//! cross product (only valid for 3 dimensional vectors) //! cross product (only valid for 3 dimensional vectors)
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
const Glue<T1, T2, glue_cross> const Glue<T1, T2, glue_cross>
cross(const Base<typename T1::elem_type,T1>& X, const Base<typename T1::ele m_type,T2>& Y) cross(const Base<typename T1::elem_type,T1>& X, const Base<typename T1::ele m_type,T2>& Y)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_cumsum.hpp   fn_cumsum.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_cumsum //! \addtogroup fn_cumsum
//! @{ //! @{
template<typename T1> template<typename T1>
arma_inline arma_inline
const Op<T1, op_cumsum_mat> const Op<T1, op_cumsum_mat>
cumsum cumsum
( (
const T1& X, const T1& X,
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_det.hpp   fn_det.hpp 
// Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // Copyright (C) 2008-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_det //! \addtogroup fn_det
//! @{ //! @{
//! determinant of mat //! determinant of mat
template<typename T1> template<typename T1>
inline inline
arma_warn_unused arma_warn_unused
typename T1::elem_type typename T1::elem_type
det det
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_diagmat.hpp   fn_diagmat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_diagmat //! \addtogroup fn_diagmat
//! @{ //! @{
//! interpret a matrix or a vector as a diagonal matrix (i.e. off-diagonal entries are zero) //! interpret a matrix or a vector as a diagonal matrix (i.e. off-diagonal entries are zero)
template<typename T1> template<typename T1>
arma_inline arma_inline
typename typename
enable_if2 enable_if2
< <
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_diagvec.hpp   fn_diagvec.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_diagvec //! \addtogroup fn_diagvec
//! @{ //! @{
//! extract a diagonal from a matrix //! extract a diagonal from a matrix
template<typename T1> template<typename T1>
arma_inline arma_inline
const Op<T1, op_diagvec> const Op<T1, op_diagvec>
diagvec(const Base<typename T1::elem_type,T1>& X, const sword diag_id = 0) diagvec(const Base<typename T1::elem_type,T1>& X, const sword diag_id = 0)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_dot.hpp   fn_dot.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_dot //! \addtogroup fn_dot
//! @{ //! @{
template<typename T1, typename T2> template<typename T1, typename T2>
arma_inline arma_inline
arma_warn_unused arma_warn_unused
typename typename
enable_if2 enable_if2
< <
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_eig.hpp   fn_eig.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// Copyright (C) 2009 Edmund Highcock // Copyright (C) 2009 Edmund Highcock
// Copyright (C) 2011 Stanislav Funiak // Copyright (C) 2011 Stanislav Funiak
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_eig //! \addtogroup fn_eig
//! @{ //! @{
// //
// symmetric/hermitian matrices // symmetric/hermitian matrices
// //
//! Eigenvalues of real/complex symmetric/hermitian matrix X //! Eigenvalues of real/complex symmetric/hermitian matrix X
template<typename T1> template<typename T1>
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_elem.hpp   fn_elem.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2013 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_elem //! \addtogroup fn_elem
//! @{ //! @{
// //
// find // find
template<typename eT, typename T1> template<typename eT, typename T1>
inline inline
const mtOp<uword, T1, op_find> const mtOp<uword, T1, op_find>
skipping to change at line 157 skipping to change at line 152
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOpCube<T1, eop_log>(A.get_ref()); return eOpCube<T1, eop_log>(A.get_ref());
} }
// //
// log2 // log2
template<typename T1> template<typename T1>
arma_inline arma_inline
const eOp<T1, eop_log2> typename enable_if2< is_arma_type<T1>::value, const eOp<T1, eop_log2> >::re
log2(const Base<typename T1::elem_type,T1>& A) sult
log2(const T1& A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOp<T1, eop_log2>(A.get_ref()); return eOp<T1, eop_log2>(A);
} }
template<typename T1> template<typename T1>
arma_inline arma_inline
const eOpCube<T1, eop_log2> const eOpCube<T1, eop_log2>
log2(const BaseCube<typename T1::elem_type,T1>& A) log2(const BaseCube<typename T1::elem_type,T1>& A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOpCube<T1, eop_log2>(A.get_ref()); return eOpCube<T1, eop_log2>(A.get_ref());
} }
// //
// log10 // log10
template<typename T1> template<typename T1>
arma_inline arma_inline
const eOp<T1, eop_log10> typename enable_if2< is_arma_type<T1>::value, const eOp<T1, eop_log10> >::r
log10(const Base<typename T1::elem_type,T1>& A) esult
log10(const T1& A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOp<T1, eop_log10>(A.get_ref()); return eOp<T1, eop_log10>(A);
} }
template<typename T1> template<typename T1>
arma_inline arma_inline
const eOpCube<T1, eop_log10> const eOpCube<T1, eop_log10>
log10(const BaseCube<typename T1::elem_type,T1>& A) log10(const BaseCube<typename T1::elem_type,T1>& A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOpCube<T1, eop_log10>(A.get_ref()); return eOpCube<T1, eop_log10>(A.get_ref());
skipping to change at line 225 skipping to change at line 220
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOpCube<T1, eop_exp>(A.get_ref()); return eOpCube<T1, eop_exp>(A.get_ref());
} }
// exp2 // exp2
template<typename T1> template<typename T1>
arma_inline arma_inline
const eOp<T1, eop_exp2> typename enable_if2< is_arma_type<T1>::value, const eOp<T1, eop_exp2> >::re
exp2(const Base<typename T1::elem_type,T1>& A) sult
exp2(const T1& A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOp<T1, eop_exp2>(A.get_ref()); return eOp<T1, eop_exp2>(A);
} }
template<typename T1> template<typename T1>
arma_inline arma_inline
const eOpCube<T1, eop_exp2> const eOpCube<T1, eop_exp2>
exp2(const BaseCube<typename T1::elem_type,T1>& A) exp2(const BaseCube<typename T1::elem_type,T1>& A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOpCube<T1, eop_exp2>(A.get_ref()); return eOpCube<T1, eop_exp2>(A.get_ref());
} }
// exp10 // exp10
template<typename T1> template<typename T1>
arma_inline arma_inline
const eOp<T1, eop_exp10> typename enable_if2< is_arma_type<T1>::value, const eOp<T1, eop_exp10> >::r
exp10(const Base<typename T1::elem_type,T1>& A) esult
exp10(const T1& A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOp<T1, eop_exp10>(A.get_ref()); return eOp<T1, eop_exp10>(A);
} }
template<typename T1> template<typename T1>
arma_inline arma_inline
const eOpCube<T1, eop_exp10> const eOpCube<T1, eop_exp10>
exp10(const BaseCube<typename T1::elem_type,T1>& A) exp10(const BaseCube<typename T1::elem_type,T1>& A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOpCube<T1, eop_exp10>(A.get_ref()); return eOpCube<T1, eop_exp10>(A.get_ref());
skipping to change at line 534 skipping to change at line 529
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
return eOpCube<T1, eop_pow>(A.get_ref(), eT(exponent)); return eOpCube<T1, eop_pow>(A.get_ref(), eT(exponent));
} }
// //
// floor // floor
template<typename T1> template<typename T1>
arma_inline arma_inline
const eOp<T1, eop_floor> typename enable_if2< is_arma_type<T1>::value, const eOp<T1, eop_floor> >::r
floor(const Base<typename T1::elem_type,T1>& A) esult
floor(const T1& A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOp<T1, eop_floor>(A.get_ref()); return eOp<T1, eop_floor>(A);
} }
template<typename T1> template<typename T1>
arma_inline arma_inline
const eOpCube<T1, eop_floor> const eOpCube<T1, eop_floor>
floor(const BaseCube<typename T1::elem_type,T1>& A) floor(const BaseCube<typename T1::elem_type,T1>& A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOpCube<T1, eop_floor>(A.get_ref()); return eOpCube<T1, eop_floor>(A.get_ref());
} }
// //
// ceil // ceil
template<typename T1> template<typename T1>
arma_inline arma_inline
const eOp<T1, eop_ceil> typename enable_if2< is_arma_type<T1>::value, const eOp<T1, eop_ceil> >::re
ceil(const Base<typename T1::elem_type,T1>& A) sult
ceil(const T1& A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOp<T1, eop_ceil>(A.get_ref()); return eOp<T1, eop_ceil>(A);
} }
template<typename T1> template<typename T1>
arma_inline arma_inline
const eOpCube<T1, eop_ceil> const eOpCube<T1, eop_ceil>
ceil(const BaseCube<typename T1::elem_type,T1>& A) ceil(const BaseCube<typename T1::elem_type,T1>& A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOpCube<T1, eop_ceil>(A.get_ref()); return eOpCube<T1, eop_ceil>(A.get_ref());
} }
//
// round
template<typename T1>
arma_inline
typename enable_if2< is_arma_type<T1>::value, const eOp<T1, eop_round> >::r
esult
round(const T1& A)
{
arma_extra_debug_sigprint();
return eOp<T1, eop_round>(A);
}
template<typename T1>
arma_inline
const eOpCube<T1, eop_round>
round(const BaseCube<typename T1::elem_type,T1>& A)
{
arma_extra_debug_sigprint();
return eOpCube<T1, eop_round>(A.get_ref());
}
//! @} //! @}
 End of changes. 15 change blocks. 
28 lines changed or deleted 53 lines changed or added


 fn_eps.hpp   fn_eps.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_eps //! \addtogroup fn_eps
//! @{ //! @{
//! \brief //! \brief
//! eps version for non-complex matrices and vectors //! eps version for non-complex matrices and vectors
template<typename T1> template<typename T1>
inline inline
const eOp<T1, eop_eps> const eOp<T1, eop_eps>
eps(const Base<typename T1::elem_type, T1>& X, const typename arma_not_cx<t ypename T1::elem_type>::result* junk = 0) eps(const Base<typename T1::elem_type, T1>& X, const typename arma_not_cx<t ypename T1::elem_type>::result* junk = 0)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_ignore(junk); arma_ignore(junk);
typedef typename T1::elem_type eT;
return eOp<T1, eop_eps>(X.get_ref()); return eOp<T1, eop_eps>(X.get_ref());
} }
//! \brief //! \brief
//! eps version for complex matrices and vectors //! eps version for complex matrices and vectors
template<typename T1> template<typename T1>
inline inline
Mat< typename T1::pod_type > Mat< typename T1::pod_type >
eps(const Base< std::complex<typename T1::pod_type>, T1>& X, const typename arma_cx_only<typename T1::elem_type>::result* junk = 0) eps(const Base< std::complex<typename T1::pod_type>, T1>& X, const typename arma_cx_only<typename T1::elem_type>::result* junk = 0)
{ {
skipping to change at line 78 skipping to change at line 70
eps(const eT& x) eps(const eT& x)
{ {
arma_ignore(x); arma_ignore(x);
return eT(0); return eT(0);
} }
template<typename eT> template<typename eT>
arma_inline arma_inline
arma_warn_unused arma_warn_unused
typename arma_float_only<eT>::result typename arma_real_only<eT>::result
eps(const eT& x) eps(const eT& x)
{ {
return eop_aux::direct_eps(x); return eop_aux::direct_eps(x);
} }
template<typename T> template<typename T>
arma_inline arma_inline
arma_warn_unused arma_warn_unused
typename arma_float_only<T>::result typename arma_real_only<T>::result
eps(const std::complex<T>& x) eps(const std::complex<T>& x)
{ {
return eop_aux::direct_eps(x); return eop_aux::direct_eps(x);
} }
//! @} //! @}
 End of changes. 5 change blocks. 
13 lines changed or deleted 5 lines changed or added


 fn_eye.hpp   fn_eye.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_eye //! \addtogroup fn_eye
//! @{ //! @{
arma_inline arma_inline
const Gen<mat, gen_ones_diag> const Gen<mat, gen_ones_diag>
eye(const uword n_rows, const uword n_cols) eye(const uword n_rows, const uword n_cols)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_flip.hpp   fn_flip.hpp 
// Copyright (C) 2010 NICTA (www.nicta.com.au) // Copyright (C) 2010 NICTA (www.nicta.com.au)
// Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_flip //! \addtogroup fn_flip
//! @{ //! @{
template<typename T1> template<typename T1>
arma_inline arma_inline
const Op<T1, op_flipud> const Op<T1, op_flipud>
flipud(const Base<typename T1::elem_type,T1>& X) flipud(const Base<typename T1::elem_type,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_hist.hpp   fn_hist.hpp 
// Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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)
template<typename T1> template<typename T1>
inline inline
const mtOp<uword,T1,op_hist> const mtOp<uword,T1,op_hist>
hist hist
( (
const Base<typename T1::elem_type,T1>& A, const Base<typename T1::elem_type,T1>& A,
const uword n_bins = 10, const uword n_bins = 10,
const arma_empty_class junk1 = arma_empty_class(), const arma_empty_class junk1 = arma_empty_class(),
const typename arma_not_cx<typename T1::elem_type>::result* junk2 = 0 const typename arma_not_cx<typename T1::elem_type>::result* junk2 = 0
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_histc.hpp   fn_histc.hpp 
// Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// Copyright (C) 2012 Boris Sabanin // Copyright (C) 2012 Boris Sabanin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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)
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
const mtGlue<uword,T1,T2,glue_histc> const mtGlue<uword,T1,T2,glue_histc>
histc histc
( (
const Base<typename T1::elem_type,T1>& A, const Base<typename T1::elem_type,T1>& A,
const Base<typename T1::elem_type,T2>& B, const Base<typename T1::elem_type,T2>& B,
const uword dim = 0, const uword dim = 0,
const typename arma_not_cx<typename T1::elem_type>::result* junk = 0 const typename arma_not_cx<typename T1::elem_type>::result* junk = 0
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_inv.hpp   fn_inv.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_inv //! \addtogroup fn_inv
//! @{ //! @{
//! delayed matrix inverse (general matrices) //! delayed matrix inverse (general matrices)
template<typename T1> template<typename T1>
arma_inline arma_inline
const Op<T1, op_inv> const Op<T1, op_inv>
inv inv
( (
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_join.hpp   fn_join.hpp 
// Copyright (C) 2010 NICTA (www.nicta.com.au) // Copyright (C) 2010 NICTA (www.nicta.com.au)
// Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_join //! \addtogroup fn_join
//! @{ //! @{
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
const Glue<T1, T2, glue_join> const Glue<T1, T2, glue_join>
join_cols(const Base<typename T1::elem_type,T1>& A, const Base<typename T1: :elem_type,T2>& B) join_cols(const Base<typename T1::elem_type,T1>& A, const Base<typename T1: :elem_type,T2>& B)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_kron.hpp   fn_kron.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_kron //! \addtogroup fn_kron
//! @{ //! @{
//! \brief //! \brief
//! kronecker product of two matrices, //! kronecker product of two matrices,
//! with the matrices having the same element type //! with the matrices having the same element type
template<typename T1, typename T2> template<typename T1, typename T2>
arma_inline arma_inline
const Glue<T1,T2,glue_kron> const Glue<T1,T2,glue_kron>
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_log_det.hpp   fn_log_det.hpp 
// Copyright (C) 2010-2011 NICTA (www.nicta.com.au) // Copyright (C) 2010-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2011 Conrad Sanderson // Copyright (C) 2010-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_log_det //! \addtogroup fn_log_det
//! @{ //! @{
//! log determinant of mat //! log determinant of mat
template<typename T1> template<typename T1>
inline inline
bool bool
log_det log_det
( (
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_lu.hpp   fn_lu.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_lu //! \addtogroup fn_lu
//! @{ //! @{
//! immediate lower upper decomposition, permutation info is embedded into L (similar to Matlab/Octave) //! immediate lower upper decomposition, permutation info is embedded into L (similar to Matlab/Octave)
template<typename T1> template<typename T1>
inline inline
bool bool
lu lu
( (
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_max.hpp   fn_max.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_max //! \addtogroup fn_max
//! @{ //! @{
//! \brief //! \brief
//! Delayed 'maximum values' operation. //! Delayed 'maximum values' operation.
//! The dimension, along which the maxima are found, is set via 'dim'. //! The dimension, along which the maxima are found, is set via 'dim'.
//! For dim = 0, the maximum value of each column is found (i.e. searches b y traversing across rows). //! For dim = 0, the maximum value of each column is found (i.e. searches b y traversing across rows).
//! For dim = 1, the maximum value of each row is found (i.e. searches by t raversing across columns). //! For dim = 1, the maximum value of each row is found (i.e. searches by t raversing across columns).
//! The default is dim = 0. //! The default is dim = 0.
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_mean.hpp   fn_mean.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_mean //! \addtogroup fn_mean
//! @{ //! @{
template<typename T1> template<typename T1>
arma_inline arma_inline
const Op<T1, op_mean> const Op<T1, op_mean>
mean mean
( (
const T1& X, const T1& X,
skipping to change at line 80 skipping to change at line 75
//! invoked, for example, by: mean(mean(A)) //! invoked, for example, by: mean(mean(A))
template<typename T1> template<typename T1>
inline inline
arma_warn_unused arma_warn_unused
typename T1::elem_type typename T1::elem_type
mean(const Op<T1, op_mean>& in) mean(const Op<T1, op_mean>& in)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_extra_debug_print("mean(): two consecutive mean() calls detected"); arma_extra_debug_print("mean(): two consecutive mean() calls detected");
typedef typename T1::elem_type eT;
return op_mean::mean_all(in.m); return op_mean::mean_all(in.m);
} }
template<typename T1> template<typename T1>
arma_inline arma_inline
const Op< Op<T1, op_mean>, op_mean> const Op< Op<T1, op_mean>, op_mean>
mean(const Op<T1, op_mean>& in, const uword dim) mean(const Op<T1, op_mean>& in, const uword dim)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 2 change blocks. 
10 lines changed or deleted 3 lines changed or added


 fn_median.hpp   fn_median.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_median //! \addtogroup fn_median
//! @{ //! @{
template<typename T1> template<typename T1>
arma_inline arma_inline
const Op<T1, op_median> const Op<T1, op_median>
median median
( (
const T1& X, const T1& X,
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_min.hpp   fn_min.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_min //! \addtogroup fn_min
//! @{ //! @{
//! \brief //! \brief
//! Delayed 'minimum values' operation. //! Delayed 'minimum values' operation.
//! The dimension, along which the minima are found, is set via 'dim'. //! The dimension, along which the minima are found, is set via 'dim'.
//! For dim = 0, the minimum value of each column is found (i.e. searches b y traversing across rows). //! For dim = 0, the minimum value of each column is found (i.e. searches b y traversing across rows).
//! For dim = 1, the minimum value of each row is found (i.e. searches by t raversing across columns). //! For dim = 1, the minimum value of each row is found (i.e. searches by t raversing across columns).
//! The default is dim = 0. //! The default is dim = 0.
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_misc.hpp   fn_misc.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_misc //! \addtogroup fn_misc
//! @{ //! @{
//! \brief //! \brief
//! Generate a vector with 'num' elements. //! Generate a vector with 'num' elements.
//! The values of the elements linearly increase from 'start' upto (and inc luding) 'end'. //! The values of the elements linearly increase from 'start' upto (and inc luding) 'end'.
template<typename vec_type> template<typename vec_type>
inline inline
skipping to change at line 95 skipping to change at line 90
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return linspace<mat>(start, end, num); return linspace<mat>(start, end, num);
} }
// //
// log_add // log_add
template<typename eT> template<typename eT>
inline inline
typename arma_float_only<eT>::result typename arma_real_only<eT>::result
log_add(eT log_a, eT log_b) log_add(eT log_a, eT log_b)
{ {
if(log_a < log_b) if(log_a < log_b)
{ {
std::swap(log_a, log_b); std::swap(log_a, log_b);
} }
const eT negdelta = log_b - log_a; const eT negdelta = log_b - log_a;
if( (negdelta < Datum<eT>::log_min) || (arma_isfinite(negdelta) == false) ) if( (negdelta < Datum<eT>::log_min) || (arma_isfinite(negdelta) == false) )
skipping to change at line 172 skipping to change at line 167
template<typename T1> template<typename T1>
arma_inline arma_inline
Op<T1, op_sympd> Op<T1, op_sympd>
sympd(const Base<typename T1::elem_type,T1>& X) sympd(const Base<typename T1::elem_type,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return Op<T1, op_sympd>(X.get_ref()); return Op<T1, op_sympd>(X.get_ref());
} }
template<typename eT>
inline
void
swap(Mat<eT>& A, Mat<eT>& B)
{
arma_extra_debug_sigprint();
const uword A_mem_state = A.mem_state;
if( (A.vec_state == B.vec_state) && (A_mem_state == B.mem_state) && ((A_m
em_state == 0) || (A_mem_state == 3)) )
{
A.swap(B);
}
else
{
if(A.n_elem <= B.n_elem)
{
Mat<eT> C = A;
A.steal_mem(B);
B.steal_mem(C);
}
else
{
Mat<eT> C = B;
B.steal_mem(A);
A.steal_mem(C);
}
}
}
//! @} //! @}
 End of changes. 3 change blocks. 
9 lines changed or deleted 37 lines changed or added


 fn_n_unique.hpp   fn_n_unique.hpp 
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_n_unique //! \addtogroup fn_n_unique
//! @{ //! @{
//! \brief //! \brief
//! Get the number of unique nonzero elements in two sparse matrices. //! Get the number of unique nonzero elements in two sparse matrices.
//! This is very useful for determining the amount of memory necessary befo re //! This is very useful for determining the amount of memory necessary befo re
//! a sparse matrix operation on two matrices. //! a sparse matrix operation on two matrices.
template<typename T1, typename T2, typename op_n_unique_type> template<typename T1, typename T2, typename op_n_unique_type>
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_norm.hpp   fn_norm.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_norm //! \addtogroup fn_norm
//! @{ //! @{
template<typename T1> template<typename T1>
arma_hot arma_hot
inline inline
typename T1::pod_type typename T1::pod_type
arma_vec_norm_1(const Proxy<T1>& P) arma_vec_norm_1(const Proxy<T1>& P)
{ {
skipping to change at line 464 skipping to change at line 459
} }
template<typename T1> template<typename T1>
inline inline
arma_warn_unused arma_warn_unused
typename enable_if2< is_arma_type<T1>::value, typename T1::pod_type >::resu lt typename enable_if2< is_arma_type<T1>::value, typename T1::pod_type >::resu lt
norm norm
( (
const T1& X, const T1& X,
const uword k, const uword k,
const typename arma_float_or_cx_only<typename T1::elem_type>::result* jun k = 0 const typename arma_real_or_cx_only<typename T1::elem_type>::result* junk = 0
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_ignore(junk); arma_ignore(junk);
typedef typename T1::elem_type eT; typedef typename T1::pod_type T;
typedef typename T1::pod_type T;
const Proxy<T1> P(X); const Proxy<T1> P(X);
if(P.get_n_elem() == 0) if(P.get_n_elem() == 0)
{ {
return T(0); return T(0);
} }
const bool is_vec = (P.get_n_rows() == 1) || (P.get_n_cols() == 1); const bool is_vec = (P.get_n_rows() == 1) || (P.get_n_cols() == 1);
skipping to change at line 528 skipping to change at line 522
} }
template<typename T1> template<typename T1>
inline inline
arma_warn_unused arma_warn_unused
typename enable_if2< is_arma_type<T1>::value, typename T1::pod_type >::resu lt typename enable_if2< is_arma_type<T1>::value, typename T1::pod_type >::resu lt
norm norm
( (
const T1& X, const T1& X,
const char* method, const char* method,
const typename arma_float_or_cx_only<typename T1::elem_type>::result* jun k = 0 const typename arma_real_or_cx_only<typename T1::elem_type>::result* junk = 0
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_ignore(junk); arma_ignore(junk);
typedef typename T1::elem_type eT; typedef typename T1::pod_type T;
typedef typename T1::pod_type T;
const Proxy<T1> P(X); const Proxy<T1> P(X);
if(P.get_n_elem() == 0) if(P.get_n_elem() == 0)
{ {
return T(0); return T(0);
} }
const char sig = method[0]; const char sig = method[0];
const bool is_vec = (P.get_n_rows() == 1) || (P.get_n_cols() == 1); const bool is_vec = (P.get_n_rows() == 1) || (P.get_n_cols() == 1);
skipping to change at line 633 skipping to change at line 626
} }
template<typename T1> template<typename T1>
inline inline
arma_warn_unused arma_warn_unused
typename enable_if2< is_arma_sparse_type<T1>::value, typename T1::pod_type >::result typename enable_if2< is_arma_sparse_type<T1>::value, typename T1::pod_type >::result
norm norm
( (
const T1& X, const T1& X,
const uword k, const uword k,
const typename arma_float_or_cx_only<typename T1::elem_type>::result* jun k = 0 const typename arma_real_or_cx_only<typename T1::elem_type>::result* junk = 0
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_ignore(junk); arma_ignore(junk);
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
typedef typename T1::pod_type T; typedef typename T1::pod_type T;
const SpProxy<T1> P(X); const SpProxy<T1> P(X);
skipping to change at line 705 skipping to change at line 698
} }
template<typename T1> template<typename T1>
inline inline
arma_warn_unused arma_warn_unused
typename enable_if2< is_arma_sparse_type<T1>::value, typename T1::pod_type >::result typename enable_if2< is_arma_sparse_type<T1>::value, typename T1::pod_type >::result
norm norm
( (
const T1& X, const T1& X,
const char* method, const char* method,
const typename arma_float_or_cx_only<typename T1::elem_type>::result* jun k = 0 const typename arma_real_or_cx_only<typename T1::elem_type>::result* junk = 0
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_ignore(junk); arma_ignore(junk);
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
typedef typename T1::pod_type T; typedef typename T1::pod_type T;
const SpProxy<T1> P(X); const SpProxy<T1> P(X);
 End of changes. 7 change blocks. 
16 lines changed or deleted 9 lines changed or added


 fn_ones.hpp   fn_ones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_ones //! \addtogroup fn_ones
//! @{ //! @{
arma_inline arma_inline
const Gen<vec, gen_ones_full> const Gen<vec, gen_ones_full>
ones(const uword n_elem) ones(const uword n_elem)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_pinv.hpp   fn_pinv.hpp 
// Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // Copyright (C) 2009-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2011 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_pinv //! \addtogroup fn_pinv
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
const Op<T1, op_pinv> const Op<T1, op_pinv>
pinv pinv
( (
const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_type,T1>& X,
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_princomp.hpp   fn_princomp.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// Copyright (C) 2010 Dimitrios Bouzas // Copyright (C) 2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_princomp //! \addtogroup fn_princomp
//! @{ //! @{
//! \brief //! \brief
//! principal component analysis -- 4 arguments version //! principal component analysis -- 4 arguments version
//! coeff_out -> principal component coefficients //! coeff_out -> principal component coefficients
//! score_out -> projected samples //! score_out -> projected samples
//! latent_out -> eigenvalues of principal vectors //! latent_out -> eigenvalues of principal vectors
//! tsquared_out -> Hotelling's T^2 statistic //! tsquared_out -> Hotelling's T^2 statistic
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_prod.hpp   fn_prod.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_prod //! \addtogroup fn_prod
//! @{ //! @{
//! \brief //! \brief
//! Delayed product of elements of a matrix along a specified dimension (ei ther rows or columns). //! Delayed product of elements of a matrix along a specified dimension (ei ther rows or columns).
//! The result is stored in a dense matrix that has either one column or on e row. //! The result is stored in a dense matrix that has either one column or on e row.
//! For dim = 0, find the sum of each column (i.e. traverse across rows) //! For dim = 0, find the sum of each column (i.e. traverse across rows)
//! For dim = 1, find the sum of each row (i.e. traverse across columns) //! For dim = 1, find the sum of each row (i.e. traverse across columns)
//! The default is dim = 0. //! The default is dim = 0.
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_qr.hpp   fn_qr.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_qr //! \addtogroup fn_qr
//! @{ //! @{
//! QR decomposition //! QR decomposition
template<typename T1> template<typename T1>
inline inline
bool bool
qr qr
( (
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_randn.hpp   fn_randn.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_randn //! \addtogroup fn_randn
//! @{ //! @{
inline inline
double double
randn() randn()
{ {
return double(eop_aux_randn<double>()); return double(eop_aux_randn<double>());
} }
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_randu.hpp   fn_randu.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_randu //! \addtogroup fn_randu
//! @{ //! @{
inline inline
double double
randu() randu()
{ {
return double(eop_aux_randu<double>()); return double(eop_aux_randu<double>());
} }
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_rank.hpp   fn_rank.hpp 
// Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // Copyright (C) 2009-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2011 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// Copyright (C) 2011 Stanislav Funiak // Copyright (C) 2011 Stanislav Funiak
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_rank //! \addtogroup fn_rank
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
arma_warn_unused arma_warn_unused
uword uword
rank rank
( (
const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_type,T1>& X,
typename T1::pod_type tol = 0.0, typename T1::pod_type tol = 0.0,
const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0 const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_ignore(junk); arma_ignore(junk);
typedef typename T1::elem_type eT; typedef typename T1::pod_type T;
typedef typename T1::pod_type T;
uword X_n_rows; uword X_n_rows;
uword X_n_cols; uword X_n_cols;
Col<T> s; Col<T> s;
const bool status = auxlib::svd(s, X, X_n_rows, X_n_cols); const bool status = auxlib::svd(s, X, X_n_rows, X_n_cols);
const uword n_elem = s.n_elem; const uword n_elem = s.n_elem;
if(status == true) if(status == true)
{ {
 End of changes. 2 change blocks. 
10 lines changed or deleted 4 lines changed or added


 fn_repmat.hpp   fn_repmat.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_repmat //! \addtogroup fn_repmat
//! @{ //! @{
//! \brief //! \brief
//! delayed 'repeat matrix' construction of a matrix //! delayed 'repeat matrix' construction of a matrix
template<typename T1> template<typename T1>
arma_inline arma_inline
const Op<T1, op_repmat> const Op<T1, op_repmat>
repmat(const Base<typename T1::elem_type,T1>& A, const uword r, const uword c) repmat(const Base<typename T1::elem_type,T1>& A, const uword r, const uword c)
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_reshape.hpp   fn_reshape.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_reshape //! \addtogroup fn_reshape
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
const Op<T1, op_reshape> const Op<T1, op_reshape>
reshape(const Base<typename T1::elem_type,T1>& X, const uword in_n_rows, co nst uword in_n_cols, const uword dim = 0) reshape(const Base<typename T1::elem_type,T1>& X, const uword in_n_rows, co nst uword in_n_cols, const uword dim = 0)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_check( (dim > 1), "reshape(): dim must be 0 or 1"); arma_debug_check( (dim > 1), "reshape(): dim must be 0 or 1");
typedef typename T1::elem_type eT;
return Op<T1, op_reshape>(X.get_ref(), in_n_rows, in_n_cols, dim, 'j'); return Op<T1, op_reshape>(X.get_ref(), in_n_rows, in_n_cols, dim, 'j');
} }
template<typename T1> template<typename T1>
inline inline
const OpCube<T1, op_reshape> const OpCube<T1, op_reshape>
reshape(const BaseCube<typename T1::elem_type,T1>& X, const uword in_n_rows , const uword in_n_cols, const uword in_n_slices, const uword dim = 0) reshape(const BaseCube<typename T1::elem_type,T1>& X, const uword in_n_rows , const uword in_n_cols, const uword in_n_slices, const uword dim = 0)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_check( (dim > 1), "reshape(): dim must be 0 or 1"); arma_debug_check( (dim > 1), "reshape(): dim must be 0 or 1");
typedef typename T1::elem_type eT;
return OpCube<T1, op_reshape>(X.get_ref(), in_n_rows, in_n_cols, in_n_sli ces, dim, 'j'); return OpCube<T1, op_reshape>(X.get_ref(), in_n_rows, in_n_cols, in_n_sli ces, dim, 'j');
} }
//! @} //! @}
 End of changes. 3 change blocks. 
12 lines changed or deleted 3 lines changed or added


 fn_resize.hpp   fn_resize.hpp 
// Copyright (C) 2011 NICTA (www.nicta.com.au) // Copyright (C) 2011 NICTA (www.nicta.com.au)
// Copyright (C) 2011 Conrad Sanderson // Copyright (C) 2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_resize //! \addtogroup fn_resize
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
const Op<T1, op_resize> const Op<T1, op_resize>
resize(const Base<typename T1::elem_type,T1>& X, const uword in_n_rows, con st uword in_n_cols) resize(const Base<typename T1::elem_type,T1>& X, const uword in_n_rows, con st uword in_n_cols)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_shuffle.hpp   fn_shuffle.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_shuffle //! \addtogroup fn_shuffle
//! @{ //! @{
//! \brief //! \brief
//! Shuffle the rows or the columns of a matrix or vector in random fashion . //! Shuffle the rows or the columns of a matrix or vector in random fashion .
//! If dim = 0, shuffle the columns (default operation). //! If dim = 0, shuffle the columns (default operation).
//! If dim = 1, shuffle the rows. //! If dim = 1, shuffle the rows.
template<typename T1> template<typename T1>
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_solve.hpp   fn_solve.hpp 
// Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // Copyright (C) 2009-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_solve //! \addtogroup fn_solve
//! @{ //! @{
//! Solve a system of linear equations, i.e., A*X = B, where X is unknown. //! Solve a system of linear equations, i.e., A*X = B, where X is unknown.
//! For a square matrix A, this function is conceptually the same as X = in v(A)*B, //! For a square matrix A, this function is conceptually the same as X = in v(A)*B,
//! but is done more efficiently. //! but is done more efficiently.
//! The number of rows in A and B must be the same. //! The number of rows in A and B must be the same.
//! B can be either a column vector or a matrix. //! B can be either a column vector or a matrix.
//! This function will also try to provide approximate solutions //! This function will also try to provide approximate solutions
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_sort.hpp   fn_sort.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_sort //! \addtogroup fn_sort
//! @{ //! @{
template<typename T1> template<typename T1>
arma_inline arma_inline
typename typename
enable_if2 enable_if2
< <
( (is_arma_type<T1>::value == true) && (resolves_to_vector<T1>::value == false) ), ( (is_arma_type<T1>::value == true) && (resolves_to_vector<T1>::value == false) ),
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_sort_index.hpp   fn_sort_index.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_sort_index //! \addtogroup fn_sort_index
//! @{ //! @{
template<typename T1, typename T2> template<typename T1, typename T2>
struct arma_sort_index_packet struct arma_sort_index_packet
{ {
T1 val; T1 val;
T2 index; T2 index;
}; };
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_speye.hpp   fn_speye.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_speye //! \addtogroup fn_speye
//! @{ //! @{
//! Generate a sparse matrix with the values along the main diagonal set to one //! Generate a sparse matrix with the values along the main diagonal set to one
template<typename obj_type> template<typename obj_type>
inline inline
obj_type obj_type
speye(const uword n_rows, const uword n_cols, const typename arma_SpMat_SpC ol_SpRow_only<obj_type>::result* junk = NULL) speye(const uword n_rows, const uword n_cols, const typename arma_SpMat_SpC ol_SpRow_only<obj_type>::result* junk = NULL)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_spones.hpp   fn_spones.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_spones //! \addtogroup fn_spones
//! @{ //! @{
//! Generate a sparse matrix with the non-zero values in the same locations as in the given sparse matrix X, //! Generate a sparse matrix with the non-zero values in the same locations as in the given sparse matrix X,
//! with the non-zero values set to one //! with the non-zero values set to one
template<typename T1> template<typename T1>
inline inline
SpMat<typename T1::elem_type> SpMat<typename T1::elem_type>
spones(const SpBase<typename T1::elem_type, T1>& X) spones(const SpBase<typename T1::elem_type, T1>& X)
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_sprandn.hpp   fn_sprandn.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_sprandn //! \addtogroup fn_sprandn
//! @{ //! @{
//! Generate a sparse matrix with a randomly selected subset of the element s //! Generate a sparse matrix with a randomly selected subset of the element s
//! set to random values from a Gaussian distribution with zero mean and un it variance //! set to random values from a Gaussian distribution with zero mean and un it variance
template<typename obj_type> template<typename obj_type>
inline inline
obj_type obj_type
sprandn sprandn
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_sprandu.hpp   fn_sprandu.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_sprandu //! \addtogroup fn_sprandu
//! @{ //! @{
//! Generate a sparse matrix with a randomly selected subset of the element s //! Generate a sparse matrix with a randomly selected subset of the element s
//! set to random values in the [0,1] interval (uniform distribution) //! set to random values in the [0,1] interval (uniform distribution)
template<typename obj_type> template<typename obj_type>
inline inline
obj_type obj_type
sprandu sprandu
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_stddev.hpp   fn_stddev.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_stddev //! \addtogroup fn_stddev
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
const mtOp<typename T1::pod_type, T1, op_stddev> const mtOp<typename T1::pod_type, T1, op_stddev>
stddev stddev
( (
const T1& X, const T1& X,
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_strans.hpp   fn_strans.hpp 
// Copyright (C) 2011-2012 NICTA (www.nicta.com.au) // Copyright (C) 2011-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2011-2012 Conrad Sanderson // Copyright (C) 2011-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_strans //! \addtogroup fn_strans
//! @{ //! @{
template<typename T1> template<typename T1>
arma_inline arma_inline
const Op<T1, op_strans> const Op<T1, op_strans>
strans strans
( (
const T1& X, const T1& X,
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_sum.hpp   fn_sum.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_sum //! \addtogroup fn_sum
//! @{ //! @{
//! \brief //! \brief
//! Delayed sum of elements of a matrix along a specified dimension (either rows or columns). //! Delayed sum of elements of a matrix along a specified dimension (either rows or columns).
//! The result is stored in a dense matrix that has either one column or on e row. //! The result is stored in a dense matrix that has either one column or on e row.
//! For dim = 0, find the sum of each column (traverse across rows) //! For dim = 0, find the sum of each column (traverse across rows)
//! For dim = 1, find the sum of each row (traverse across columns) //! For dim = 1, find the sum of each row (traverse across columns)
//! The default is dim = 0. //! The default is dim = 0.
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_svd.hpp   fn_svd.hpp 
// Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // Copyright (C) 2009-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_svd //! \addtogroup fn_svd
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
bool bool
svd svd
( (
Col<typename T1::pod_type>& S, Col<typename T1::pod_type>& S,
skipping to change at line 83 skipping to change at line 78
Col<typename T1::pod_type >& S, Col<typename T1::pod_type >& S,
Mat<typename T1::elem_type>& V, Mat<typename T1::elem_type>& V,
const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_type,T1>& X,
const char* method = "", const char* method = "",
const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0 const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_ignore(junk); arma_ignore(junk);
typedef typename T1::elem_type eT;
arma_debug_check arma_debug_check
( (
( ((void*)(&U) == (void*)(&S)) || (&U == &V) || ((void*)(&S) == (void*) (&V)) ), ( ((void*)(&U) == (void*)(&S)) || (&U == &V) || ((void*)(&S) == (void*) (&V)) ),
"svd(): two or more output objects are the same object" "svd(): two or more output objects are the same object"
); );
bool use_divide_and_conquer = false; bool use_divide_and_conquer = false;
const char sig = method[0]; const char sig = method[0];
skipping to change at line 142 skipping to change at line 135
Col<typename T1::pod_type >& S, Col<typename T1::pod_type >& S,
Mat<typename T1::elem_type>& V, Mat<typename T1::elem_type>& V,
const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_type,T1>& X,
const char mode = 'b', const char mode = 'b',
const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0 const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_ignore(junk); arma_ignore(junk);
typedef typename T1::elem_type eT;
arma_debug_check arma_debug_check
( (
( ((void*)(&U) == (void*)(&S)) || (&U == &V) || ((void*)(&S) == (void*) (&V)) ), ( ((void*)(&U) == (void*)(&S)) || (&U == &V) || ((void*)(&S) == (void*) (&V)) ),
"svd_econ(): two or more output objects are the same object" "svd_econ(): two or more output objects are the same object"
); );
arma_debug_check arma_debug_check
( (
( (mode != 'l') && (mode != 'r') && (mode != 'b') ), ( (mode != 'l') && (mode != 'r') && (mode != 'b') ),
"svd_econ(): parameter 'mode' is incorrect" "svd_econ(): parameter 'mode' is incorrect"
 End of changes. 3 change blocks. 
12 lines changed or deleted 3 lines changed or added


 fn_syl_lyap.hpp   fn_syl_lyap.hpp 
// Copyright (C) 2011-2012 NICTA (www.nicta.com.au) // Copyright (C) 2011-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2011-2012 Conrad Sanderson // Copyright (C) 2011-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_syl_lyap //! \addtogroup fn_syl_lyap
//! @{ //! @{
//! find the solution of the Sylvester equation AX + XB = C //! find the solution of the Sylvester equation AX + XB = C
template<typename T1, typename T2, typename T3> template<typename T1, typename T2, typename T3>
inline inline
bool bool
syl syl
( (
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_symmat.hpp   fn_symmat.hpp 
// Copyright (C) 2011 NICTA (www.nicta.com.au) // Copyright (C) 2011 NICTA (www.nicta.com.au)
// Copyright (C) 2011 Conrad Sanderson // Copyright (C) 2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_symmat //! \addtogroup fn_symmat
//! @{ //! @{
template<typename T1> template<typename T1>
arma_inline arma_inline
const Op<T1, op_symmat> const Op<T1, op_symmat>
symmatu(const Base<typename T1::elem_type,T1>& X) symmatu(const Base<typename T1::elem_type,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_toeplitz.hpp   fn_toeplitz.hpp 
// Copyright (C) 2010-2011 NICTA (www.nicta.com.au) // Copyright (C) 2010-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2011 Conrad Sanderson // Copyright (C) 2010-2013 Conrad Sanderson
// Copyright (C) 2011 Alcatel Lucent
// Copyright (C) 2011 Gerhard Schreiber
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_toeplitz //! \addtogroup fn_toeplitz
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
Glue<T1, T1, glue_toeplitz> Op<T1, op_toeplitz>
toeplitz(const Base<typename T1::elem_type,T1>& X) toeplitz(const Base<typename T1::elem_type,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return Glue<T1, T1, glue_toeplitz>( X.get_ref(), X.get_ref() ); return Op<T1, op_toeplitz>( X.get_ref() );
} }
template<typename T1, typename T2> template<typename T1>
inline inline
Glue<T1, T2, glue_toeplitz> Op<T1, op_toeplitz_c>
toeplitz(const Base<typename T1::elem_type,T1>& X, const Base<typename T1:: circ_toeplitz(const Base<typename T1::elem_type,T1>& X)
elem_type,T2>& Y)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return Glue<T1, T2, glue_toeplitz>( X.get_ref(), Y.get_ref() ); return Op<T1, op_toeplitz_c>( X.get_ref() );
} }
template<typename T1> template<typename T1, typename T2>
inline inline
Glue<T1, T1, glue_toeplitz_circ> Glue<T1, T2, glue_toeplitz>
circ_toeplitz(const Base<typename T1::elem_type,T1>& X) toeplitz(const Base<typename T1::elem_type,T1>& X, const Base<typename T1::
elem_type,T2>& Y)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return Glue<T1, T1, glue_toeplitz_circ>( X.get_ref(), X.get_ref() ); return Glue<T1, T2, glue_toeplitz>( X.get_ref(), Y.get_ref() );
} }
//! @} //! @}
 End of changes. 10 change blocks. 
23 lines changed or deleted 16 lines changed or added


 fn_trace.hpp   fn_trace.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_trace //! \addtogroup fn_trace
//! @{ //! @{
//! Immediate trace (sum of diagonal elements) of a square dense matrix //! Immediate trace (sum of diagonal elements) of a square dense matrix
template<typename T1> template<typename T1>
arma_hot arma_hot
arma_warn_unused arma_warn_unused
inline inline
typename enable_if2<is_arma_type<T1>::value, typename T1::elem_type>::resul t typename enable_if2<is_arma_type<T1>::value, typename T1::elem_type>::resul t
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_trans.hpp   fn_trans.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_trans //! \addtogroup fn_trans
//! @{ //! @{
template<typename T1> template<typename T1>
arma_inline arma_inline
const Op<T1, op_htrans> const Op<T1, op_htrans>
trans trans
( (
const T1& X, const T1& X,
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_trig.hpp   fn_trig.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_trig //! \addtogroup fn_trig
//! @{ //! @{
// //
// trigonometric functions: // trigonometric functions:
// cos family: cos, acos, cosh, acosh // cos family: cos, acos, cosh, acosh
// sin family: sin, asin, sinh, asinh // sin family: sin, asin, sinh, asinh
// tan family: tan, atan, tanh, atanh // tan family: tan, atan, tanh, atanh
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_trimat.hpp   fn_trimat.hpp 
// Copyright (C) 2010 NICTA (www.nicta.com.au) // Copyright (C) 2010 NICTA (www.nicta.com.au)
// Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_trimat //! \addtogroup fn_trimat
//! @{ //! @{
template<typename T1> template<typename T1>
arma_inline arma_inline
const Op<T1, op_trimat> const Op<T1, op_trimat>
trimatu(const Base<typename T1::elem_type,T1>& X) trimatu(const Base<typename T1::elem_type,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_trunc_exp.hpp   fn_trunc_exp.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_trunc_exp //! \addtogroup fn_trunc_exp
//! @{ //! @{
template<typename eT> template<typename eT>
inline inline
static static
typename arma_float_only<eT>::result typename arma_real_only<eT>::result
trunc_exp(const eT x) trunc_exp(const eT x)
{ {
if(std::numeric_limits<eT>::is_iec559 && (x >= Math<eT>::log_max() )) if(std::numeric_limits<eT>::is_iec559 && (x >= Math<eT>::log_max() ))
{ {
return std::numeric_limits<eT>::max(); return std::numeric_limits<eT>::max();
} }
else else
{ {
return std::exp(x); return std::exp(x);
} }
 End of changes. 2 change blocks. 
9 lines changed or deleted 4 lines changed or added


 fn_trunc_log.hpp   fn_trunc_log.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_trunc_log //! \addtogroup fn_trunc_log
//! @{ //! @{
template<typename eT> template<typename eT>
inline inline
static static
typename arma_float_only<eT>::result typename arma_real_only<eT>::result
trunc_log(const eT x) trunc_log(const eT x)
{ {
if(std::numeric_limits<eT>::is_iec559) if(std::numeric_limits<eT>::is_iec559)
{ {
if(x == std::numeric_limits<eT>::infinity()) if(x == std::numeric_limits<eT>::infinity())
{ {
return Math<eT>::log_max(); return Math<eT>::log_max();
} }
else else
{ {
 End of changes. 2 change blocks. 
9 lines changed or deleted 4 lines changed or added


 fn_unique.hpp   fn_unique.hpp 
// Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// Copyright (C) 2012 Arnold Wiliem // Copyright (C) 2012 Arnold Wiliem
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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)
template<typename T1> template<typename T1>
inline inline
const Op<T1,op_unique> const Op<T1,op_unique>
unique unique
( (
const Base<typename T1::elem_type,T1>& A, const Base<typename T1::elem_type,T1>& A,
const typename arma_not_cx<typename T1::elem_type>::result* junk = 0 const typename arma_not_cx<typename T1::elem_type>::result* junk = 0
) )
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_var.hpp   fn_var.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_var //! \addtogroup fn_var
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
const mtOp<typename T1::pod_type, T1, op_var> const mtOp<typename T1::pod_type, T1, op_var>
var var
( (
const T1& X, const T1& X,
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 fn_zeros.hpp   fn_zeros.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 fn_zeros //! \addtogroup fn_zeros
//! @{ //! @{
//! Generate a vector with all elements set to zero //! Generate a vector with all elements set to zero
arma_inline arma_inline
const Gen<vec, gen_zeros> const Gen<vec, gen_zeros>
zeros(const uword n_elem) zeros(const uword n_elem)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 format_wrap.hpp   format_wrap.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 format_wrap //! \addtogroup format_wrap
//! @{ //! @{
//! \namespace arma_boost namespace for functions and classes which partial ly emulate Boost functionality //! \namespace arma_boost namespace for functions and classes which partial ly emulate Boost functionality
namespace arma_boost namespace arma_boost
{ {
#if defined(ARMA_USE_BOOST_FORMAT) #if defined(ARMA_USE_BOOST_FORMAT)
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 forward_bones.hpp   forward_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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)
using std::cout; using std::cout;
using std::cerr; using std::cerr;
using std::endl; using std::endl;
using std::ios; using std::ios;
template<typename elem_type, typename derived> struct Base; template<typename elem_type, typename derived> struct Base;
template<typename elem_type, typename derived> struct BaseCube; template<typename elem_type, typename derived> struct BaseCube;
template<typename eT> class Mat; template<typename eT> class Mat;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 gemm.hpp   gemm.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 gemm //! \addtogroup gemm
//! @{ //! @{
//! for tiny square matrices, size <= 4x4 //! for tiny square matrices, size <= 4x4
template<const bool do_trans_A=false, const bool use_alpha=false, const boo l use_beta=false> template<const bool do_trans_A=false, const bool use_alpha=false, const boo l use_beta=false>
class gemm_emul_tinysq class gemm_emul_tinysq
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 gemm_mixed.hpp   gemm_mixed.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 gemm_mixed //! \addtogroup gemm_mixed
//! @{ //! @{
//! \brief //! \brief
//! Matrix multplication where the matrices have differing element types. //! Matrix multplication where the matrices have differing element types.
//! Uses caching for speedup. //! Uses caching for speedup.
//! Matrix 'C' is assumed to have been set to the correct size (i.e. taking into account transposes) //! Matrix 'C' is assumed to have been set to the correct size (i.e. taking into account transposes)
template<const bool do_trans_A=false, const bool do_trans_B=false, const bo ol use_alpha=false, const bool use_beta=false> template<const bool do_trans_A=false, const bool do_trans_B=false, const bo ol use_alpha=false, const bool use_beta=false>
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 gemv.hpp   gemv.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 gemv //! \addtogroup gemv
//! @{ //! @{
//! for tiny square matrices, size <= 4x4 //! for tiny square matrices, size <= 4x4
template<const bool do_trans_A=false, const bool use_alpha=false, const boo l use_beta=false> template<const bool do_trans_A=false, const bool use_alpha=false, const boo l use_beta=false>
class gemv_emul_tinysq class gemv_emul_tinysq
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_conv_bones.hpp   glue_conv_bones.hpp 
// Copyright (C) 2010 NICTA (www.nicta.com.au) // Copyright (C) 2010 NICTA (www.nicta.com.au)
// Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_conv //! \addtogroup glue_conv
//! @{ //! @{
class glue_conv class glue_conv
{ {
public: public:
template<typename T1, typename T2> inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_conv>& X); template<typename T1, typename T2> inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_conv>& X);
}; };
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_conv_meat.hpp   glue_conv_meat.hpp 
// Copyright (C) 2010-2011 NICTA (www.nicta.com.au) // Copyright (C) 2010-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2011 Conrad Sanderson // Copyright (C) 2010-2013 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_conv //! \addtogroup glue_conv
//! @{ //! @{
//! rudimentary implementation of the convolution operation //! rudimentary implementation of the convolution operation
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
void void
glue_conv::apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_co nv>& X) glue_conv::apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_co nv>& X)
skipping to change at line 33 skipping to change at line 28
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
const unwrap_check<T1> A_tmp(X.A, out); const unwrap_check<T1> A_tmp(X.A, out);
const unwrap_check<T2> B_tmp(X.B, out); const unwrap_check<T2> B_tmp(X.B, out);
const Mat<eT>& A = A_tmp.M; const Mat<eT>& A = A_tmp.M;
const Mat<eT>& B = B_tmp.M; const Mat<eT>& B = B_tmp.M;
arma_debug_check( ( (A.is_vec() == false) || (B.is_vec() == false) ), "co arma_debug_check
nv(): inputs must be vectors" ); (
( ((A.is_vec() == false) && (A.is_empty() == false)) || ((B.is_vec() ==
false) && (B.is_empty() == false)) ),
"conv(): given object is not a vector"
);
const Mat<eT>& h = (A.n_elem <= B.n_elem) ? A : B; const Mat<eT>& h = (A.n_elem <= B.n_elem) ? A : B;
const Mat<eT>& x = (A.n_elem <= B.n_elem) ? B : A; const Mat<eT>& x = (A.n_elem <= B.n_elem) ? B : A;
const uword h_n_elem = h.n_elem; const uword h_n_elem = h.n_elem;
const uword x_n_elem = x.n_elem; const uword x_n_elem = x.n_elem;
const uword out_n_elem = h_n_elem + x_n_elem - 1; const uword out_n_elem = h_n_elem + x_n_elem - 1;
if( (h_n_elem == 0) || (x_n_elem == 0) ) if( (h_n_elem == 0) || (x_n_elem == 0) )
{ {
 End of changes. 3 change blocks. 
12 lines changed or deleted 11 lines changed or added


 glue_cor_bones.hpp   glue_cor_bones.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_cor //! \addtogroup glue_cor
//! @{ //! @{
class glue_cor class glue_cor
{ {
public: public:
template<typename eT> inline static void direct_cor(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B, c onst uword norm_type); template<typename eT> inline static void direct_cor(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B, c onst uword norm_type);
template<typename T> inline static void direct_cor(Mat< std::complex<T> >& out, const Mat< std::complex<T> >& A, const Mat< std::complex<T> >& B, c onst uword norm_type); template<typename T> inline static void direct_cor(Mat< std::complex<T> >& out, const Mat< std::complex<T> >& A, const Mat< std::complex<T> >& B, c onst uword norm_type);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_cor_meat.hpp   glue_cor_meat.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_cor //! \addtogroup glue_cor
//! @{ //! @{
template<typename eT> template<typename eT>
inline inline
void void
glue_cor::direct_cor(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B, cons t uword norm_type) glue_cor::direct_cor(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B, cons t uword norm_type)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_cov_bones.hpp   glue_cov_bones.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_cov //! \addtogroup glue_cov
//! @{ //! @{
class glue_cov class glue_cov
{ {
public: public:
template<typename eT> inline static void direct_cov(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B, c onst uword norm_type); template<typename eT> inline static void direct_cov(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B, c onst uword norm_type);
template<typename T> inline static void direct_cov(Mat< std::complex<T> >& out, const Mat< std::complex<T> >& A, const Mat< std::complex<T> >& B, c onst uword norm_type); template<typename T> inline static void direct_cov(Mat< std::complex<T> >& out, const Mat< std::complex<T> >& A, const Mat< std::complex<T> >& B, c onst uword norm_type);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_cov_meat.hpp   glue_cov_meat.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_cov //! \addtogroup glue_cov
//! @{ //! @{
template<typename eT> template<typename eT>
inline inline
void void
glue_cov::direct_cov(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B, cons t uword norm_type) glue_cov::direct_cov(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B, cons t uword norm_type)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_cross_bones.hpp   glue_cross_bones.hpp 
// Copyright (C) 2010 NICTA (www.nicta.com.au) // Copyright (C) 2010 NICTA (www.nicta.com.au)
// Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_cross //! \addtogroup glue_cross
//! @{ //! @{
class glue_cross class glue_cross
{ {
public: public:
template<typename T1, typename T2> inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_cross>& X); template<typename T1, typename T2> inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_cross>& X);
}; };
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_cross_meat.hpp   glue_cross_meat.hpp 
// Copyright (C) 2010-2011 NICTA (www.nicta.com.au) // Copyright (C) 2010-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2011 Conrad Sanderson // Copyright (C) 2010-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_cross //! \addtogroup glue_cross
//! @{ //! @{
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
void void
glue_cross::apply(Mat<typename T1::elem_type>& out, const Glue<T1, T2, glue _cross>& X) glue_cross::apply(Mat<typename T1::elem_type>& out, const Glue<T1, T2, glue _cross>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_hist_bones.hpp   glue_hist_bones.hpp 
// Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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)
class glue_hist class glue_hist
{ {
public: public:
template<typename T1, typename T2> inline static void apply(Mat<uword>& out, const mtGlue<uword,T1,T2,glue_hist>& in); template<typename T1, typename T2> inline static void apply(Mat<uword>& out, const mtGlue<uword,T1,T2,glue_hist>& in);
}; };
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_hist_meat.hpp   glue_hist_meat.hpp 
// Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012-2013 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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)
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
void void
glue_hist::apply(Mat<uword>& out, const mtGlue<uword,T1,T2,glue_hist>& in) glue_hist::apply(Mat<uword>& out, const mtGlue<uword,T1,T2,glue_hist>& in)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
const uword dim = in.aux_uword; const uword dim = in.aux_uword;
const unwrap_check_mixed<T1> tmp1(in.A, out); const unwrap_check_mixed<T1> tmp1(in.A, out);
const unwrap_check_mixed<T2> tmp2(in.B, out); const unwrap_check_mixed<T2> tmp2(in.B, out);
const Mat<eT>& X = tmp1.M; const Mat<eT>& X = tmp1.M;
const Mat<eT>& C = tmp2.M; const Mat<eT>& C = tmp2.M;
arma_debug_check arma_debug_check
( (
(C.is_vec() == false), ((C.is_vec() == false) && (C.is_empty() == false)),
"hist(): parameter 'centers' must be a vector" "hist(): parameter 'centers' must be a vector"
); );
arma_debug_check arma_debug_check
( (
(dim > 1), (dim > 1),
"hist(): parameter 'dim' must be 0 or 1" "hist(): parameter 'dim' must be 0 or 1"
); );
const uword X_n_rows = X.n_rows; const uword X_n_rows = X.n_rows;
 End of changes. 3 change blocks. 
11 lines changed or deleted 6 lines changed or added


 glue_histc_bones.hpp   glue_histc_bones.hpp 
// Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// Copyright (C) 2012 Boris Sabanin // Copyright (C) 2012 Boris Sabanin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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)
class glue_histc class glue_histc
{ {
public: public:
template<typename T1, typename T2> inline static void apply(Mat<uword>& out, const mtGlue<uword,T1,T2,glue_histc>& in); template<typename T1, typename T2> inline static void apply(Mat<uword>& out, const mtGlue<uword,T1,T2,glue_histc>& in);
}; };
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_histc_meat.hpp   glue_histc_meat.hpp 
// Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012-2013 Conrad Sanderson
// Copyright (C) 2012 Boris Sabanin // Copyright (C) 2012 Boris Sabanin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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)
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
void void
glue_histc::apply(Mat<uword>& out, const mtGlue<uword,T1,T2,glue_histc>& in ) glue_histc::apply(Mat<uword>& out, const mtGlue<uword,T1,T2,glue_histc>& in )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
const uword dim = in.aux_uword; const uword dim = in.aux_uword;
const unwrap_check_mixed<T1> tmp1(in.A, out); const unwrap_check_mixed<T1> tmp1(in.A, out);
const unwrap_check_mixed<T2> tmp2(in.B, out); const unwrap_check_mixed<T2> tmp2(in.B, out);
const Mat<eT>& X = tmp1.M; const Mat<eT>& X = tmp1.M;
const Mat<eT>& E = tmp2.M; const Mat<eT>& E = tmp2.M;
arma_debug_check arma_debug_check
( (
(E.is_vec() == false), ((E.is_vec() == false) && (E.is_empty() == false)),
"histc(): parameter 'edges' must be a vector" "histc(): parameter 'edges' must be a vector"
); );
arma_debug_check arma_debug_check
( (
(dim > 1), (dim > 1),
"histc(): parameter 'dim' must be 0 or 1" "histc(): parameter 'dim' must be 0 or 1"
); );
const uword X_n_elem = X.n_elem; const uword X_n_elem = X.n_elem;
 End of changes. 3 change blocks. 
11 lines changed or deleted 6 lines changed or added


 glue_join_bones.hpp   glue_join_bones.hpp 
// Copyright (C) 2010 NICTA (www.nicta.com.au) // Copyright (C) 2010 NICTA (www.nicta.com.au)
// Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_join //! \addtogroup glue_join
//! @{ //! @{
class glue_join class glue_join
{ {
public: public:
template<typename T1, typename T2> template<typename T1, typename T2>
inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1, T2,glue_join>& X); inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1, T2,glue_join>& X);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_join_meat.hpp   glue_join_meat.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_join //! \addtogroup glue_join
//! @{ //! @{
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
void void
glue_join::apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_jo in>& X) glue_join::apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_jo in>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_kron_bones.hpp   glue_kron_bones.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_kron //! \addtogroup glue_kron
//! @{ //! @{
class glue_kron class glue_kron
{ {
public: public:
template<typename eT> inline static void direct_kron(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B); template<typename eT> inline static void direct_kron(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B);
template<typename T> inline static void direct_kron(Mat< std::complex<T> >& out, const Mat< std::complex<T> >& A, const Mat<T>& B); template<typename T> inline static void direct_kron(Mat< std::complex<T> >& out, const Mat< std::complex<T> >& A, const Mat<T>& B);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_kron_meat.hpp   glue_kron_meat.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_kron //! \addtogroup glue_kron
//! @{ //! @{
//! \brief //! \brief
//! both input matrices have the same element type //! both input matrices have the same element type
template<typename eT> template<typename eT>
inline inline
void void
glue_kron::direct_kron(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B) glue_kron::direct_kron(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B)
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_mixed_bones.hpp   glue_mixed_bones.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_mixed //! \addtogroup glue_mixed
//! @{ //! @{
class glue_mixed_times class glue_mixed_times
{ {
public: public:
template<typename T1, typename T2> template<typename T1, typename T2>
inline static void apply(Mat<typename eT_promoter<T1,T2>::eT>& out, const mtGlue<typename eT_promoter<T1,T2>::eT, T1, T2, glue_mixed_times>& X); inline static void apply(Mat<typename eT_promoter<T1,T2>::eT>& out, const mtGlue<typename eT_promoter<T1,T2>::eT, T1, T2, glue_mixed_times>& X);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_mixed_meat.hpp   glue_mixed_meat.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_mixed //! \addtogroup glue_mixed
//! @{ //! @{
//! matrix multiplication with different element types //! matrix multiplication with different element types
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
void void
glue_mixed_times::apply(Mat<typename eT_promoter<T1,T2>::eT>& out, const mt Glue<typename eT_promoter<T1,T2>::eT, T1, T2, glue_mixed_times>& X) glue_mixed_times::apply(Mat<typename eT_promoter<T1,T2>::eT>& out, const mt Glue<typename eT_promoter<T1,T2>::eT, T1, T2, glue_mixed_times>& X)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_relational_bones.hpp   glue_relational_bones.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_relational //! \addtogroup glue_relational
//! @{ //! @{
class glue_rel_lt class glue_rel_lt
{ {
public: public:
template<typename T1, typename T2> template<typename T1, typename T2>
inline static void apply(Mat <uword>& out, const mtGlue<uword, T1, T2, gl ue_rel_lt>& X); inline static void apply(Mat <uword>& out, const mtGlue<uword, T1, T2, gl ue_rel_lt>& X);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_relational_meat.hpp   glue_relational_meat.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_relational //! \addtogroup glue_relational
//! @{ //! @{
#undef operator_rel #undef operator_rel
#undef operator_str #undef operator_str
#undef arma_applier_mat #undef arma_applier_mat
#undef arma_applier_cube #undef arma_applier_cube
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_solve_bones.hpp   glue_solve_bones.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_solve //! \addtogroup glue_solve
//! @{ //! @{
class glue_solve class glue_solve
{ {
public: public:
template<typename eT, typename T2> inline static void solve_direct(Mat<eT >& out, Mat<eT>& A, const Base<eT,T2>& X, const bool slow); template<typename eT, typename T2> inline static void solve_direct(Mat<eT >& out, Mat<eT>& A, const Base<eT,T2>& X, const bool slow);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_solve_meat.hpp   glue_solve_meat.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_solve //! \addtogroup glue_solve
//! @{ //! @{
template<typename eT, typename T2> template<typename eT, typename T2>
inline inline
void void
glue_solve::solve_direct(Mat<eT>& out, Mat<eT>& A, const Base<eT,T2>& X, co nst bool slow) glue_solve::solve_direct(Mat<eT>& out, Mat<eT>& A, const Base<eT,T2>& X, co nst bool slow)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_times_bones.hpp   glue_times_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_times //! \addtogroup glue_times
//! @{ //! @{
//! \brief //! \brief
//! Template metaprogram depth_lhs //! Template metaprogram depth_lhs
//! calculates the number of Glue<Tx,Ty, glue_type> instances on the left h and side argument of Glue<Tx,Ty, glue_type> //! calculates the number of Glue<Tx,Ty, glue_type> instances on the left h and side argument of Glue<Tx,Ty, glue_type>
//! i.e. it recursively expands each Tx, until the type of Tx is not "Glue< ..,.., glue_type>" (i.e the "glue_type" changes) //! i.e. it recursively expands each Tx, until the type of Tx is not "Glue< ..,.., glue_type>" (i.e the "glue_type" changes)
template<typename glue_type, typename T1> template<typename glue_type, typename T1>
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 glue_times_meat.hpp   glue_times_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_times //! \addtogroup glue_times
//! @{ //! @{
template<bool is_eT_blas_type> template<bool is_eT_blas_type>
template<typename T1, typename T2> template<typename T1, typename T2>
arma_hot arma_hot
inline inline
void void
glue_times_redirect2_helper<is_eT_blas_type>::apply(Mat<typename T1::elem_t ype>& out, const Glue<T1,T2,glue_times>& X) glue_times_redirect2_helper<is_eT_blas_type>::apply(Mat<typename T1::elem_t ype>& out, const Glue<T1,T2,glue_times>& X)
skipping to change at line 80 skipping to change at line 75
partial_unwrap_check<T1>::do_trans, partial_unwrap_check<T1>::do_trans,
partial_unwrap_check<T2>::do_trans, partial_unwrap_check<T2>::do_trans,
(partial_unwrap_check<T1>::do_times || partial_unwrap_check<T2>::do_t imes) (partial_unwrap_check<T1>::do_times || partial_unwrap_check<T2>::do_t imes)
> >
(out, A, B, alpha); (out, A, B, alpha);
} }
else else
{ {
arma_extra_debug_print("glue_times_redirect<2>::apply(): detected inv(A )*B"); arma_extra_debug_print("glue_times_redirect<2>::apply(): detected inv(A )*B");
typedef typename strip_inv<T1>::stored_type T1_stripped;
const strip_inv<T1> A_strip(X.A); const strip_inv<T1> A_strip(X.A);
Mat<eT> A = A_strip.M; Mat<eT> A = A_strip.M;
arma_debug_check( (A.is_square() == false), "inv(): given matrix is not square" ); arma_debug_check( (A.is_square() == false), "inv(): given matrix is not square" );
const unwrap_check<T2> B_tmp(X.B, out); const unwrap_check<T2> B_tmp(X.B, out);
const Mat<eT>& B = B_tmp.M; const Mat<eT>& B = B_tmp.M;
glue_solve::solve_direct( out, A, B, A_strip.slow ); glue_solve::solve_direct( out, A, B, A_strip.slow );
skipping to change at line 222 skipping to change at line 215
} }
template<typename T1, typename T2> template<typename T1, typename T2>
arma_hot arma_hot
inline inline
void void
glue_times::apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_t imes>& X) glue_times::apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_t imes>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT;
const sword N_mat = 1 + depth_lhs< glue_times, Glue<T1,T2,glue_times> >:: num; const sword N_mat = 1 + depth_lhs< glue_times, Glue<T1,T2,glue_times> >:: num;
arma_extra_debug_print(arma_boost::format("N_mat = %d") % N_mat); arma_extra_debug_print(arma_boost::format("N_mat = %d") % N_mat);
glue_times_redirect<N_mat>::apply(out, X); glue_times_redirect<N_mat>::apply(out, X);
} }
template<typename T1> template<typename T1>
arma_hot arma_hot
inline inline
 End of changes. 3 change blocks. 
12 lines changed or deleted 3 lines changed or added


 glue_toeplitz_bones.hpp   glue_toeplitz_bones.hpp 
// Copyright (C) 2010-2011 NICTA (www.nicta.com.au) // Copyright (C) 2010-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2011 Conrad Sanderson // Copyright (C) 2010-2013 Conrad Sanderson
// Copyright (C) 2011 Alcatel Lucent
// Copyright (C) 2011 Gerhard Schreiber
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_toeplitz //! \addtogroup glue_toeplitz
//! @{ //! @{
class glue_toeplitz class glue_toeplitz
{ {
public: public:
template<typename T1, typename T2> inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1, T2, glue_toeplitz>& in); template<typename T1, typename T2> inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1, T2, glue_toeplitz>& in);
}; };
class glue_toeplitz_circ
{
public:
template<typename T1, typename T2> inline static void apply(Mat<typename
T1::elem_type>& out, const Glue<T1, T2, glue_toeplitz_circ>& in);
};
//! @} //! @}
 End of changes. 3 change blocks. 
20 lines changed or deleted 5 lines changed or added


 glue_toeplitz_meat.hpp   glue_toeplitz_meat.hpp 
// Copyright (C) 2010-2011 NICTA (www.nicta.com.au) // Copyright (C) 2010-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2011 Conrad Sanderson // Copyright (C) 2010-2013 Conrad Sanderson
// Copyright (C) 2011 Alcatel Lucent
// Copyright (C) 2011 Gerhard Schreiber
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 glue_toeplitz //! \addtogroup glue_toeplitz
//! @{ //! @{
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
void void
glue_toeplitz::apply(Mat<typename T1::elem_type>& out, const Glue<T1, T2, g lue_toeplitz>& in) glue_toeplitz::apply(Mat<typename T1::elem_type>& out, const Glue<T1, T2, g lue_toeplitz>& in)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
if( ((void*)(&in.A)) == ((void*)(&in.B)) ) const unwrap_check<T1> tmp1(in.A, out);
{ const unwrap_check<T2> tmp2(in.B, out);
arma_extra_debug_print("glue_toeplitz::apply(): one argument version");
const unwrap_check<T1> tmp(in.A, out);
const Mat<eT>& A = tmp.M;
arma_debug_check( (A.is_vec() == false), "toeplitz(): input argument mu const Mat<eT>& A = tmp1.M;
st be a vector" ); const Mat<eT>& B = tmp2.M;
const uword N = A.n_elem; arma_debug_check
const eT* A_mem = A.memptr(); (
( ((A.is_vec() == false) && (A.is_empty() == false)) || ((B.is_vec() ==
false) && (B.is_empty() == false)) ),
"toeplitz(): given object is not a vector"
);
out.set_size(N,N); const uword A_N = A.n_elem;
const uword B_N = B.n_elem;
for(uword col=0; col<N; ++col) const eT* A_mem = A.memptr();
{ const eT* B_mem = B.memptr();
eT* col_mem = out.colptr(col);
uword i; out.set_size(A_N, B_N);
i = col; if( out.is_empty() ) { return; }
for(uword row=0; row<col; ++row, --i)
{
col_mem[row] = A_mem[i];
}
i = 0; for(uword col=0; col < B_N; ++col)
for(uword row=col; row<N; ++row, ++i)
{
col_mem[row] = A_mem[i];
}
}
}
else
{ {
arma_extra_debug_print("glue_toeplitz::apply(): two argument version"); eT* col_mem = out.colptr(col);
const unwrap_check<T1> tmp1(in.A, out);
const unwrap_check<T2> tmp2(in.B, out);
const Mat<eT>& A = tmp1.M;
const Mat<eT>& B = tmp2.M;
arma_debug_check( ( (A.is_vec() == false) || (B.is_vec() == false) ), "
toeplitz(): input arguments must be vectors" );
const uword A_N = A.n_elem;
const uword B_N = B.n_elem;
const eT* A_mem = A.memptr();
const eT* B_mem = B.memptr();
out.set_size(A_N, B_N);
if( out.is_empty() )
{
return;
}
for(uword col=0; col<B_N; ++col)
{
eT* col_mem = out.colptr(col);
uword i = 0;
for(uword row=col; row<A_N; ++row, ++i)
{
col_mem[row] = A_mem[i];
}
}
for(uword row=0; row<A_N; ++row)
{
uword i = 1;
for(uword col=(row+1); col<B_N; ++col, ++i)
{
out.at(row,col) = B_mem[i];
}
}
uword i = 0;
for(uword row=col; row < A_N; ++row, ++i) { col_mem[row] = A_mem[i]; }
} }
} for(uword row=0; row < A_N; ++row)
template<typename T1, typename T2>
inline
void
glue_toeplitz_circ::apply(Mat<typename T1::elem_type>& out, const Glue<T1,
T2, glue_toeplitz_circ>& in)
{
arma_extra_debug_sigprint();
typedef typename T1::elem_type eT;
if( ((void*)(&in.A)) == ((void*)(&in.B)) )
{ {
arma_extra_debug_print("glue_toeplitz_circ::apply(): one argument versi uword i = 1;
on"); for(uword col=(row+1); col < B_N; ++col, ++i) { out.at(row,col) = B_me
m[i]; }
const unwrap_check<T1> tmp(in.A, out);
const Mat<eT>& A = tmp.M;
arma_debug_check( (A.is_vec() == false), "toeplitz(): input argument mu
st be a vector" );
const uword N = A.n_elem;
const eT* A_mem = A.memptr();
out.set_size(N,N);
if(A.is_colvec())
{
// A is interpreted as colvec
for(uword col=0; col<N; ++col)
{
eT* col_mem = out.colptr(col);
uword i = col;
for(uword row=0; row<col; ++row, --i)
{
col_mem[row] = A_mem[N-i];
}
i = 0;
for(uword row=col; row<N; ++row, ++i)
{
col_mem[row] = A_mem[i];
}
}
}
else
{
// A is interpreted as rowvec - probably not the computationally most
efficient way to do this ;-)
for(uword row=0; row<N; ++row)
{
uword i = row;
for(uword col=0; col<row; ++col, --i)
{
out.at(row,col) = A_mem[N-i];
}
i = 0;
for(uword col=row; col<N; ++col, ++i)
{
out.at(row,col) = A_mem[i];
}
}
}
} }
} }
//! @} //! @}
 End of changes. 14 change blocks. 
156 lines changed or deleted 29 lines changed or added


 hdf5_misc.hpp   hdf5_misc.hpp 
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 hdf5_misc //! \addtogroup hdf5_misc
//! @{ //! @{
#if defined(ARMA_USE_HDF5) #if defined(ARMA_USE_HDF5)
namespace hdf5_misc namespace hdf5_misc
{ {
//! Given a certain type, find the corresponding HDF5 datatype. This can't be //! Given a certain type, find the corresponding HDF5 datatype. This can't be
//! done entirely at compile time, unfortunately, because the H5T_* macros //! done entirely at compile time, unfortunately, because the H5T_* macros
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 include_atlas.hpp   include_atlas.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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)
#if defined(ARMA_USE_ATLAS) #if defined(ARMA_USE_ATLAS)
#if !defined(ARMA_ATLAS_INCLUDE_DIR) #if !defined(ARMA_ATLAS_INCLUDE_DIR)
extern "C" extern "C"
{ {
#include <cblas.h> #include <cblas.h>
#include <clapack.h> #include <clapack.h>
} }
#else #else
#define ARMA_STR1(x) x #define ARMA_STR1(x) x
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 injector_bones.hpp   injector_bones.hpp 
// Copyright (C) 2010 NICTA (www.nicta.com.au) // Copyright (C) 2010 NICTA (www.nicta.com.au)
// Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 injector //! \addtogroup injector
//! @{ //! @{
template<typename eT> template<typename eT>
class mat_injector_row class mat_injector_row
{ {
public: public:
inline mat_injector_row(); inline mat_injector_row();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 injector_meat.hpp   injector_meat.hpp 
// Copyright (C) 2010 NICTA (www.nicta.com.au) // Copyright (C) 2010 NICTA (www.nicta.com.au)
// Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 injector //! \addtogroup injector
//! @{ //! @{
template<typename eT> template<typename eT>
inline inline
mat_injector_row<eT>::mat_injector_row() mat_injector_row<eT>::mat_injector_row()
: n_cols(0) : n_cols(0)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 lapack_bones.hpp   lapack_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// Copyright (C) 2009 Edmund Highcock // Copyright (C) 2009 Edmund Highcock
// Copyright (C) 2011 James Sanders // Copyright (C) 2011 James Sanders
// Copyright (C) 2012 Eric Jon Sundstrom // Copyright (C) 2012 Eric Jon Sundstrom
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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)
#ifdef ARMA_USE_LAPACK #ifdef ARMA_USE_LAPACK
#if !defined(ARMA_BLAS_CAPITALS) #if !defined(ARMA_BLAS_CAPITALS)
#define arma_sgetrf sgetrf #define arma_sgetrf sgetrf
#define arma_dgetrf dgetrf #define arma_dgetrf dgetrf
#define arma_cgetrf cgetrf #define arma_cgetrf cgetrf
#define arma_zgetrf zgetrf #define arma_zgetrf zgetrf
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 lapack_wrapper.hpp   lapack_wrapper.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// Copyright (C) 2009 Edmund Highcock // Copyright (C) 2009 Edmund Highcock
// Copyright (C) 2011 James Sanders // Copyright (C) 2011 James Sanders
// Copyright (C) 2012 Eric Jon Sundstrom // Copyright (C) 2012 Eric Jon Sundstrom
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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)
#ifdef ARMA_USE_LAPACK #ifdef ARMA_USE_LAPACK
//! \namespace lapack namespace for LAPACK functions //! \namespace lapack namespace for LAPACK functions
namespace lapack namespace lapack
{ {
template<typename eT> template<typename eT>
inline inline
void void
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 memory.hpp   memory.hpp 
// Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 memory //! \addtogroup memory
//! @{ //! @{
class memory class memory
{ {
public: public:
arma_inline static uword enlarge_to_mul t_of_chunksize(const uword n_elem); arma_inline static uword enlarge_to_mul t_of_chunksize(const uword n_elem);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 mtGlueCube_bones.hpp   mtGlueCube_bones.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 mtGlueCube //! \addtogroup mtGlueCube
//! @{ //! @{
template<typename out_eT, typename T1, typename T2, typename glue_type> template<typename out_eT, typename T1, typename T2, typename glue_type>
class mtGlueCube : public BaseCube<out_eT, mtGlueCube<out_eT, T1, T2, glue_ type> > class mtGlueCube : public BaseCube<out_eT, mtGlueCube<out_eT, T1, T2, glue_ type> >
{ {
public: public:
typedef out_eT elem_type; typedef out_eT elem_type;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 mtGlueCube_meat.hpp   mtGlueCube_meat.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 mtGlueCube //! \addtogroup mtGlueCube
//! @{ //! @{
template<typename out_eT, typename T1, typename T2, typename glue_type> template<typename out_eT, typename T1, typename T2, typename glue_type>
inline inline
mtGlueCube<out_eT,T1,T2,glue_type>::mtGlueCube(const T1& in_A, const T2& in _B) mtGlueCube<out_eT,T1,T2,glue_type>::mtGlueCube(const T1& in_A, const T2& in _B)
: A(in_A) : A(in_A)
, B(in_B) , B(in_B)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 mtGlue_bones.hpp   mtGlue_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 mtGlue //! \addtogroup mtGlue
//! @{ //! @{
template<typename out_eT, typename T1, typename T2, typename glue_type> template<typename out_eT, typename T1, typename T2, typename glue_type>
class mtGlue : public Base<out_eT, mtGlue<out_eT, T1, T2, glue_type> > class mtGlue : public Base<out_eT, mtGlue<out_eT, T1, T2, glue_type> >
{ {
public: public:
typedef out_eT elem_type; typedef out_eT elem_type;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 mtGlue_meat.hpp   mtGlue_meat.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 mtGlue //! \addtogroup mtGlue
//! @{ //! @{
template<typename out_eT, typename T1, typename T2, typename glue_type> template<typename out_eT, typename T1, typename T2, typename glue_type>
inline inline
mtGlue<out_eT,T1,T2,glue_type>::mtGlue(const T1& in_A, const T2& in_B) mtGlue<out_eT,T1,T2,glue_type>::mtGlue(const T1& in_A, const T2& in_B)
: A(in_A) : A(in_A)
, B(in_B) , B(in_B)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 mtOpCube_bones.hpp   mtOpCube_bones.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 mtOpCube //! \addtogroup mtOpCube
//! @{ //! @{
template<typename out_eT, typename T1, typename op_type> template<typename out_eT, typename T1, typename op_type>
class mtOpCube : public BaseCube<out_eT, mtOpCube<out_eT, T1, op_type> > class mtOpCube : public BaseCube<out_eT, mtOpCube<out_eT, T1, op_type> >
{ {
public: public:
typedef out_eT elem_type; typedef out_eT elem_type;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 mtOpCube_meat.hpp   mtOpCube_meat.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 mtOpCube //! \addtogroup mtOpCube
//! @{ //! @{
template<typename out_eT, typename T1, typename op_type> template<typename out_eT, typename T1, typename op_type>
inline inline
mtOpCube<out_eT, T1, op_type>::mtOpCube(const T1& in_m) mtOpCube<out_eT, T1, op_type>::mtOpCube(const T1& in_m)
: m(in_m) : m(in_m)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 mtOp_bones.hpp   mtOp_bones.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 mtOp //! \addtogroup mtOp
//! @{ //! @{
template<typename out_eT, typename T1, typename op_type> template<typename out_eT, typename T1, typename op_type>
class mtOp : public Base<out_eT, mtOp<out_eT, T1, op_type> > class mtOp : public Base<out_eT, mtOp<out_eT, T1, op_type> >
{ {
public: public:
typedef out_eT elem_type; typedef out_eT elem_type;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 mtOp_meat.hpp   mtOp_meat.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 mtOp //! \addtogroup mtOp
//! @{ //! @{
template<typename out_eT, typename T1, typename op_type> template<typename out_eT, typename T1, typename op_type>
inline inline
mtOp<out_eT, T1, op_type>::mtOp(const T1& in_m) mtOp<out_eT, T1, op_type>::mtOp(const T1& in_m)
: m(in_m) : m(in_m)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 mtSpOp_bones.hpp   mtSpOp_bones.hpp 
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 mtSpOp //! \addtogroup mtSpOp
//! @{ //! @{
// Class for delayed multi-type sparse operations. These are operations wh ere // Class for delayed multi-type sparse operations. These are operations wh ere
// the resulting type is different than the stored type. // the resulting type is different than the stored type.
template<typename out_eT, typename T1, typename op_type> template<typename out_eT, typename T1, typename op_type>
class mtSpOp : public SpBase<out_eT, mtSpOp<out_eT, T1, op_type> > class mtSpOp : public SpBase<out_eT, mtSpOp<out_eT, T1, op_type> >
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 mtSpOp_meat.hpp   mtSpOp_meat.hpp 
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 mtSpOp //! \addtogroup mtSpOp
//! @{ //! @{
template<typename out_eT, typename T1, typename op_type> template<typename out_eT, typename T1, typename op_type>
inline inline
mtSpOp<out_eT, T1, op_type>::mtSpOp(const T1& in_m) mtSpOp<out_eT, T1, op_type>::mtSpOp(const T1& in_m)
: m(in_m) : m(in_m)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_chol_bones.hpp   op_chol_bones.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_chol //! \addtogroup op_chol
//! @{ //! @{
class op_chol class op_chol
{ {
public: public:
template<typename T1> template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op _chol>& X); inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op _chol>& X);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_chol_meat.hpp   op_chol_meat.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_chol //! \addtogroup op_chol
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
void void
op_chol::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_chol>& X) op_chol::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_chol>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_cor_bones.hpp   op_cor_bones.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_cor //! \addtogroup op_cor
//! @{ //! @{
class op_cor class op_cor
{ {
public: public:
template<typename eT> inline static void direct_cor(Mat<eT>& out, const Mat<eT>& X, const uword norm_type); template<typename eT> inline static void direct_cor(Mat<eT>& out, const Mat<eT>& X, const uword norm_type);
template<typename T> inline static void direct_cor(Mat< std::complex<T> >& out, const Mat< std::complex<T> >& X, const uword norm_type); template<typename T> inline static void direct_cor(Mat< std::complex<T> >& out, const Mat< std::complex<T> >& X, const uword norm_type);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_cor_meat.hpp   op_cor_meat.hpp 
// Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // Copyright (C) 2009-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2011 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_cor //! \addtogroup op_cor
//! @{ //! @{
template<typename eT> template<typename eT>
inline inline
void void
op_cor::direct_cor(Mat<eT>& out, const Mat<eT>& A, const uword norm_type) op_cor::direct_cor(Mat<eT>& out, const Mat<eT>& A, const uword norm_type)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_cov_bones.hpp   op_cov_bones.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_cov //! \addtogroup op_cov
//! @{ //! @{
class op_cov class op_cov
{ {
public: public:
template<typename eT> inline static void direct_cov(Mat<eT>& out, const Mat<eT>& X, const uword norm_type); template<typename eT> inline static void direct_cov(Mat<eT>& out, const Mat<eT>& X, const uword norm_type);
template<typename T> inline static void direct_cov(Mat< std::complex<T> >& out, const Mat< std::complex<T> >& X, const uword norm_type); template<typename T> inline static void direct_cov(Mat< std::complex<T> >& out, const Mat< std::complex<T> >& X, const uword norm_type);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_cov_meat.hpp   op_cov_meat.hpp 
// Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // Copyright (C) 2009-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2011 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_cov //! \addtogroup op_cov
//! @{ //! @{
template<typename eT> template<typename eT>
inline inline
void void
op_cov::direct_cov(Mat<eT>& out, const Mat<eT>& A, const uword norm_type) op_cov::direct_cov(Mat<eT>& out, const Mat<eT>& A, const uword norm_type)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_cumsum_bones.hpp   op_cumsum_bones.hpp 
// Copyright (C) 2010 NICTA (www.nicta.com.au) // Copyright (C) 2010 NICTA (www.nicta.com.au)
// Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_cumsum //! \addtogroup op_cumsum
//! @{ //! @{
class op_cumsum_mat class op_cumsum_mat
{ {
public: public:
template<typename T1> template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op _cumsum_mat>& in); inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op _cumsum_mat>& in);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_cumsum_meat.hpp   op_cumsum_meat.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_cumsum //! \addtogroup op_cumsum
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
void void
op_cumsum_mat::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_cumsu m_mat>& in) op_cumsum_mat::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_cumsu m_mat>& in)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_cx_scalar_bones.hpp   op_cx_scalar_bones.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_cx_scalar //! \addtogroup op_cx_scalar
//! @{ //! @{
class op_cx_scalar_times class op_cx_scalar_times
{ {
public: public:
template<typename T1> template<typename T1>
inline static void inline static void
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_cx_scalar_meat.hpp   op_cx_scalar_meat.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2013 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_cx_scalar //! \addtogroup op_cx_scalar
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
void void
op_cx_scalar_times::apply op_cx_scalar_times::apply
( (
Mat< typename std::complex<typename T1::pod_type> >& out, Mat< typename std::complex<typename T1::pod_type> >& out,
const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar _times>& X const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar _times>& X
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; typedef typename std::complex<typename T1::pod_type> eT;
typedef typename T1::pod_type T;
const Proxy<T1> A(X.m); const Proxy<T1> A(X.m);
out.set_size(A.get_n_rows(), A.get_n_cols()); const uword n_rows = A.get_n_rows();
const uword n_cols = A.get_n_cols();
out.set_size(n_rows, n_cols);
const eT k = X.aux_out_eT; const eT k = X.aux_out_eT;
const uword n_elem = out.n_elem;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
for(uword i=0; i<n_elem; ++i) if(Proxy<T1>::prefer_at_accessor == false)
{ {
out_mem[i] = A[i] * k; const uword n_elem = A.get_n_elem();
for(uword i=0; i<n_elem; ++i)
{
out_mem[i] = A[i] * k;
}
}
else
{
for(uword col=0; col < n_cols; ++col)
for(uword row=0; row < n_rows; ++row)
{
*out_mem = A.at(row,col) * k; ++out_mem;
}
} }
} }
template<typename T1> template<typename T1>
inline inline
void void
op_cx_scalar_plus::apply op_cx_scalar_plus::apply
( (
Mat< typename std::complex<typename T1::pod_type> >& out, Mat< typename std::complex<typename T1::pod_type> >& out,
const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar _plus>& X const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar _plus>& X
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; typedef typename std::complex<typename T1::pod_type> eT;
typedef typename T1::pod_type T;
const Proxy<T1> A(X.m); const Proxy<T1> A(X.m);
out.set_size(A.get_n_rows(), A.get_n_cols()); const uword n_rows = A.get_n_rows();
const uword n_cols = A.get_n_cols();
out.set_size(n_rows, n_cols);
const eT k = X.aux_out_eT; const eT k = X.aux_out_eT;
const uword n_elem = out.n_elem;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
for(uword i=0; i<n_elem; ++i) if(Proxy<T1>::prefer_at_accessor == false)
{ {
out_mem[i] = A[i] + k; const uword n_elem = A.get_n_elem();
for(uword i=0; i<n_elem; ++i)
{
out_mem[i] = A[i] + k;
}
}
else
{
for(uword col=0; col < n_cols; ++col)
for(uword row=0; row < n_rows; ++row)
{
*out_mem = A.at(row,col) + k; ++out_mem;
}
} }
} }
template<typename T1> template<typename T1>
inline inline
void void
op_cx_scalar_minus_pre::apply op_cx_scalar_minus_pre::apply
( (
Mat< typename std::complex<typename T1::pod_type> >& out, Mat< typename std::complex<typename T1::pod_type> >& out,
const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar _minus_pre>& X const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar _minus_pre>& X
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; typedef typename std::complex<typename T1::pod_type> eT;
typedef typename T1::pod_type T;
const Proxy<T1> A(X.m); const Proxy<T1> A(X.m);
out.set_size(A.get_n_rows(), A.get_n_cols()); const uword n_rows = A.get_n_rows();
const uword n_cols = A.get_n_cols();
out.set_size(n_rows, n_cols);
const eT k = X.aux_out_eT; const eT k = X.aux_out_eT;
const uword n_elem = out.n_elem;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
for(uword i=0; i<n_elem; ++i) if(Proxy<T1>::prefer_at_accessor == false)
{ {
out_mem[i] = k - A[i]; const uword n_elem = A.get_n_elem();
for(uword i=0; i<n_elem; ++i)
{
out_mem[i] = k - A[i];
}
}
else
{
for(uword col=0; col < n_cols; ++col)
for(uword row=0; row < n_rows; ++row)
{
*out_mem = k - A.at(row,col); ++out_mem;
}
} }
} }
template<typename T1> template<typename T1>
inline inline
void void
op_cx_scalar_minus_post::apply op_cx_scalar_minus_post::apply
( (
Mat< typename std::complex<typename T1::pod_type> >& out, Mat< typename std::complex<typename T1::pod_type> >& out,
const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar _minus_post>& X const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar _minus_post>& X
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; typedef typename std::complex<typename T1::pod_type> eT;
typedef typename T1::pod_type T;
const Proxy<T1> A(X.m); const Proxy<T1> A(X.m);
out.set_size(A.get_n_rows(), A.get_n_cols()); const uword n_rows = A.get_n_rows();
const uword n_cols = A.get_n_cols();
out.set_size(n_rows, n_cols);
const eT k = X.aux_out_eT; const eT k = X.aux_out_eT;
const uword n_elem = out.n_elem;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
for(uword i=0; i<n_elem; ++i) if(Proxy<T1>::prefer_at_accessor == false)
{ {
out_mem[i] = A[i] - k; const uword n_elem = A.get_n_elem();
for(uword i=0; i<n_elem; ++i)
{
out_mem[i] = A[i] - k;
}
}
else
{
for(uword col=0; col < n_cols; ++col)
for(uword row=0; row < n_rows; ++row)
{
*out_mem = A.at(row,col) - k; ++out_mem;
}
} }
} }
template<typename T1> template<typename T1>
inline inline
void void
op_cx_scalar_div_pre::apply op_cx_scalar_div_pre::apply
( (
Mat< typename std::complex<typename T1::pod_type> >& out, Mat< typename std::complex<typename T1::pod_type> >& out,
const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar _div_pre>& X const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar _div_pre>& X
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; typedef typename std::complex<typename T1::pod_type> eT;
typedef typename T1::pod_type T;
const Proxy<T1> A(X.m); const Proxy<T1> A(X.m);
out.set_size(A.get_n_rows(), A.get_n_cols()); const uword n_rows = A.get_n_rows();
const uword n_cols = A.get_n_cols();
out.set_size(n_rows, n_cols);
const eT k = X.aux_out_eT; const eT k = X.aux_out_eT;
const uword n_elem = out.n_elem;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
for(uword i=0; i<n_elem; ++i) if(Proxy<T1>::prefer_at_accessor == false)
{ {
out_mem[i] = k / A[i]; const uword n_elem = A.get_n_elem();
for(uword i=0; i<n_elem; ++i)
{
out_mem[i] = k / A[i];
}
}
else
{
for(uword col=0; col < n_cols; ++col)
for(uword row=0; row < n_rows; ++row)
{
*out_mem = k / A.at(row,col); ++out_mem;
}
} }
} }
template<typename T1> template<typename T1>
inline inline
void void
op_cx_scalar_div_post::apply op_cx_scalar_div_post::apply
( (
Mat< typename std::complex<typename T1::pod_type> >& out, Mat< typename std::complex<typename T1::pod_type> >& out,
const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar _div_post>& X const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar _div_post>& X
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; typedef typename std::complex<typename T1::pod_type> eT;
typedef typename T1::pod_type T;
const Proxy<T1> A(X.m); const Proxy<T1> A(X.m);
out.set_size(A.get_n_rows(), A.get_n_cols()); const uword n_rows = A.get_n_rows();
const uword n_cols = A.get_n_cols();
out.set_size(n_rows, n_cols);
const eT k = X.aux_out_eT; const eT k = X.aux_out_eT;
const uword n_elem = out.n_elem;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
for(uword i=0; i<n_elem; ++i) if(Proxy<T1>::prefer_at_accessor == false)
{ {
out_mem[i] = A[i] / k; const uword n_elem = A.get_n_elem();
for(uword i=0; i<n_elem; ++i)
{
out_mem[i] = A[i] / k;
}
}
else
{
for(uword col=0; col < n_cols; ++col)
for(uword row=0; row < n_rows; ++row)
{
*out_mem = A.at(row,col) / k; ++out_mem;
}
} }
} }
// //
// //
// //
template<typename T1> template<typename T1>
inline inline
void void
op_cx_scalar_times::apply op_cx_scalar_times::apply
( (
Cube< typename std::complex<typename T1::pod_type> >& out, Cube< typename std::complex<typename T1::pod_type> >& out,
const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_sc alar_times>& X const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_sc alar_times>& X
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; typedef typename std::complex<typename T1::pod_type> eT;
typedef typename T1::pod_type T;
const ProxyCube<T1> A(X.m); const ProxyCube<T1> A(X.m);
out.set_size(A.get_n_rows(), A.get_n_cols(), A.get_n_slices()); out.set_size(A.get_n_rows(), A.get_n_cols(), A.get_n_slices());
const eT k = X.aux_out_eT; const eT k = X.aux_out_eT;
const uword n_elem = out.n_elem; const uword n_elem = out.n_elem;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
// TODO: implement handling for ProxyCube<T1>::prefer_at_accessor == true
for(uword i=0; i<n_elem; ++i) for(uword i=0; i<n_elem; ++i)
{ {
out_mem[i] = A[i] * k; out_mem[i] = A[i] * k;
} }
} }
template<typename T1> template<typename T1>
inline inline
void void
op_cx_scalar_plus::apply op_cx_scalar_plus::apply
( (
Cube< typename std::complex<typename T1::pod_type> >& out, Cube< typename std::complex<typename T1::pod_type> >& out,
const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_sc alar_plus>& X const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_sc alar_plus>& X
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; typedef typename std::complex<typename T1::pod_type> eT;
typedef typename T1::pod_type T;
const ProxyCube<T1> A(X.m); const ProxyCube<T1> A(X.m);
out.set_size(A.get_n_rows(), A.get_n_cols(), A.get_n_slices()); out.set_size(A.get_n_rows(), A.get_n_cols(), A.get_n_slices());
const eT k = X.aux_out_eT; const eT k = X.aux_out_eT;
const uword n_elem = out.n_elem; const uword n_elem = out.n_elem;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
for(uword i=0; i<n_elem; ++i) for(uword i=0; i<n_elem; ++i)
{ {
out_mem[i] = A[i] + k; out_mem[i] = A[i] + k;
} }
} }
template<typename T1> template<typename T1>
inline inline
void void
op_cx_scalar_minus_pre::apply op_cx_scalar_minus_pre::apply
( (
Cube< typename std::complex<typename T1::pod_type> >& out, Cube< typename std::complex<typename T1::pod_type> >& out,
const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_sc alar_minus_pre>& X const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_sc alar_minus_pre>& X
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; typedef typename std::complex<typename T1::pod_type> eT;
typedef typename T1::pod_type T;
const ProxyCube<T1> A(X.m); const ProxyCube<T1> A(X.m);
out.set_size(A.get_n_rows(), A.get_n_cols(), A.get_n_slices()); out.set_size(A.get_n_rows(), A.get_n_cols(), A.get_n_slices());
const eT k = X.aux_out_eT; const eT k = X.aux_out_eT;
const uword n_elem = out.n_elem; const uword n_elem = out.n_elem;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
for(uword i=0; i<n_elem; ++i) for(uword i=0; i<n_elem; ++i)
{ {
out_mem[i] = k - A[i]; out_mem[i] = k - A[i];
} }
} }
template<typename T1> template<typename T1>
inline inline
void void
op_cx_scalar_minus_post::apply op_cx_scalar_minus_post::apply
( (
Cube< typename std::complex<typename T1::pod_type> >& out, Cube< typename std::complex<typename T1::pod_type> >& out,
const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_sc alar_minus_post>& X const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_sc alar_minus_post>& X
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; typedef typename std::complex<typename T1::pod_type> eT;
typedef typename T1::pod_type T;
const ProxyCube<T1> A(X.m); const ProxyCube<T1> A(X.m);
out.set_size(A.get_n_rows(), A.get_n_cols(), A.get_n_slices()); out.set_size(A.get_n_rows(), A.get_n_cols(), A.get_n_slices());
const eT k = X.aux_out_eT; const eT k = X.aux_out_eT;
const uword n_elem = out.n_elem; const uword n_elem = out.n_elem;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
for(uword i=0; i<n_elem; ++i) for(uword i=0; i<n_elem; ++i)
{ {
out_mem[i] = A[i] - k; out_mem[i] = A[i] - k;
} }
} }
template<typename T1> template<typename T1>
inline inline
void void
op_cx_scalar_div_pre::apply op_cx_scalar_div_pre::apply
( (
Cube< typename std::complex<typename T1::pod_type> >& out, Cube< typename std::complex<typename T1::pod_type> >& out,
const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_sc alar_div_pre>& X const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_sc alar_div_pre>& X
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; typedef typename std::complex<typename T1::pod_type> eT;
typedef typename T1::pod_type T;
const ProxyCube<T1> A(X.m); const ProxyCube<T1> A(X.m);
out.set_size(A.get_n_rows(), A.get_n_cols(), A.get_n_slices()); out.set_size(A.get_n_rows(), A.get_n_cols(), A.get_n_slices());
const eT k = X.aux_out_eT; const eT k = X.aux_out_eT;
const uword n_elem = out.n_elem; const uword n_elem = out.n_elem;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
for(uword i=0; i<n_elem; ++i) for(uword i=0; i<n_elem; ++i)
{ {
out_mem[i] = k / A[i]; out_mem[i] = k / A[i];
} }
} }
template<typename T1> template<typename T1>
inline inline
void void
op_cx_scalar_div_post::apply op_cx_scalar_div_post::apply
( (
Cube< typename std::complex<typename T1::pod_type> >& out, Cube< typename std::complex<typename T1::pod_type> >& out,
const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_sc alar_div_post>& X const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_sc alar_div_post>& X
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; typedef typename std::complex<typename T1::pod_type> eT;
typedef typename T1::pod_type T;
const ProxyCube<T1> A(X.m); const ProxyCube<T1> A(X.m);
out.set_size(A.get_n_rows(), A.get_n_cols(), A.get_n_slices()); out.set_size(A.get_n_rows(), A.get_n_cols(), A.get_n_slices());
const eT k = X.aux_out_eT; const eT k = X.aux_out_eT;
const uword n_elem = out.n_elem; const uword n_elem = out.n_elem;
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
for(uword i=0; i<n_elem; ++i) for(uword i=0; i<n_elem; ++i)
{ {
out_mem[i] = A[i] / k; out_mem[i] = A[i] / k;
} }
} }
//! @} //! @}
 End of changes. 51 change blocks. 
58 lines changed or deleted 132 lines changed or added


 op_diagmat_bones.hpp   op_diagmat_bones.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_diagmat //! \addtogroup op_diagmat
//! @{ //! @{
class op_diagmat class op_diagmat
{ {
public: public:
template<typename T1> template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op _diagmat>& X); inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op _diagmat>& X);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_diagmat_meat.hpp   op_diagmat_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_diagmat //! \addtogroup op_diagmat
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
void void
op_diagmat::apply(Mat<typename T1::elem_type>& out, const Op<T1, op_diagmat >& X) op_diagmat::apply(Mat<typename T1::elem_type>& out, const Op<T1, op_diagmat >& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_diagvec_bones.hpp   op_diagvec_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_diagvec //! \addtogroup op_diagvec
//! @{ //! @{
class op_diagvec class op_diagvec
{ {
public: public:
template<typename T1> template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op _diagvec>& X); inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op _diagvec>& X);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_diagvec_meat.hpp   op_diagvec_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_diagvec //! \addtogroup op_diagvec
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
void void
op_diagvec::apply(Mat<typename T1::elem_type>& out, const Op<T1, op_diagvec >& X) op_diagvec::apply(Mat<typename T1::elem_type>& out, const Op<T1, op_diagvec >& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_dot_bones.hpp   op_dot_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_dot //! \addtogroup op_dot
//! @{ //! @{
//! \brief //! \brief
//! dot product operation //! dot product operation
class op_dot class op_dot
{ {
public: public:
skipping to change at line 34 skipping to change at line 29
arma_hot arma_pure arma_inline static arma_hot arma_pure arma_inline static
typename arma_not_cx<eT>::result typename arma_not_cx<eT>::result
direct_dot_arma(const uword n_elem, const eT* const A, const eT* const B) ; direct_dot_arma(const uword n_elem, const eT* const A, const eT* const B) ;
template<typename eT> template<typename eT>
arma_hot arma_pure inline static arma_hot arma_pure inline static
typename arma_cx_only<eT>::result typename arma_cx_only<eT>::result
direct_dot_arma(const uword n_elem, const eT* const A, const eT* const B) ; direct_dot_arma(const uword n_elem, const eT* const A, const eT* const B) ;
template<typename eT> template<typename eT>
arma_hot arma_pure inline static typename arma_float_only<eT>::result arma_hot arma_pure inline static typename arma_real_only<eT>::result
direct_dot(const uword n_elem, const eT* const A, const eT* const B); direct_dot(const uword n_elem, const eT* const A, const eT* const B);
template<typename eT> template<typename eT>
arma_hot arma_pure inline static typename arma_cx_only<eT>::result arma_hot arma_pure inline static typename arma_cx_only<eT>::result
direct_dot(const uword n_elem, const eT* const A, const eT* const B); direct_dot(const uword n_elem, const eT* const A, const eT* const B);
template<typename eT> template<typename eT>
arma_hot arma_pure inline static typename arma_integral_only<eT>::result arma_hot arma_pure inline static typename arma_integral_only<eT>::result
direct_dot(const uword n_elem, const eT* const A, const eT* const B); direct_dot(const uword n_elem, const eT* const A, const eT* const B);
 End of changes. 2 change blocks. 
9 lines changed or deleted 4 lines changed or added


 op_dot_meat.hpp   op_dot_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_dot //! \addtogroup op_dot
//! @{ //! @{
//! for two arrays, generic version for non-complex values //! for two arrays, generic version for non-complex values
template<typename eT> template<typename eT>
arma_hot arma_hot
arma_pure arma_pure
arma_inline arma_inline
typename arma_not_cx<eT>::result typename arma_not_cx<eT>::result
skipping to change at line 83 skipping to change at line 78
} }
return std::complex<T>(val_real, val_imag); return std::complex<T>(val_real, val_imag);
} }
//! for two arrays, float and double version //! for two arrays, float and double version
template<typename eT> template<typename eT>
arma_hot arma_hot
arma_pure arma_pure
inline inline
typename arma_float_only<eT>::result typename arma_real_only<eT>::result
op_dot::direct_dot(const uword n_elem, const eT* const A, const eT* const B ) op_dot::direct_dot(const uword n_elem, const eT* const A, const eT* const B )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if( n_elem <= 32u ) if( n_elem <= 32u )
{ {
return op_dot::direct_dot_arma(n_elem, A, B); return op_dot::direct_dot_arma(n_elem, A, B);
} }
else else
{ {
skipping to change at line 301 skipping to change at line 296
arma_debug_check( (N != PB.get_n_elem()), "dot(): objects must have the same number of elements" ); arma_debug_check( (N != PB.get_n_elem()), "dot(): objects must have the same number of elements" );
ea_type1 A = PA.get_ea(); ea_type1 A = PA.get_ea();
ea_type2 B = PB.get_ea(); ea_type2 B = PB.get_ea();
T val_real = T(0); T val_real = T(0);
T val_imag = T(0); T val_imag = T(0);
for(uword i=0; i<N; ++i) for(uword i=0; i<N; ++i)
{ {
const std::complex<T> X = A[i]; const std::complex<T> xx = A[i];
const std::complex<T> Y = B[i]; const std::complex<T> yy = B[i];
const T a = X.real(); const T a = xx.real();
const T b = X.imag(); const T b = xx.imag();
const T c = Y.real(); const T c = yy.real();
const T d = Y.imag(); const T d = yy.imag();
val_real += (a*c) - (b*d); val_real += (a*c) - (b*d);
val_imag += (a*d) + (b*c); val_imag += (a*d) + (b*c);
} }
return std::complex<T>(val_real, val_imag); return std::complex<T>(val_real, val_imag);
} }
else else
{ {
return op_dot::apply_unwrap(X,Y); return op_dot::apply_unwrap(X,Y);
 End of changes. 5 change blocks. 
15 lines changed or deleted 10 lines changed or added


 op_dotext_bones.hpp   op_dotext_bones.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_dotext //! \addtogroup op_dotext
//! @{ //! @{
class op_dotext class op_dotext
{ {
public: public:
template<typename eT> template<typename eT>
inline static eT direct_rowvec_mat_colvec (const eT* A_mem, const M at<eT>& B, const eT* C_mem); inline static eT direct_rowvec_mat_colvec (const eT* A_mem, const M at<eT>& B, const eT* C_mem);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_dotext_meat.hpp   op_dotext_meat.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_dotext //! \addtogroup op_dotext
//! @{ //! @{
template<typename eT> template<typename eT>
inline inline
eT eT
op_dotext::direct_rowvec_mat_colvec op_dotext::direct_rowvec_mat_colvec
( (
const eT* A_mem, const eT* A_mem,
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_find_bones.hpp   op_find_bones.hpp 
// Copyright (C) 2010 NICTA (www.nicta.com.au) // Copyright (C) 2010 NICTA (www.nicta.com.au)
// Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 Conrad Sanderson
// Copyright (C) 2010 Dimitrios Bouzas // Copyright (C) 2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_find //! \addtogroup op_find
//! @{ //! @{
class op_find class op_find
{ {
public: public:
template<typename T1> template<typename T1>
inline static uword inline static uword
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_find_meat.hpp   op_find_meat.hpp 
// Copyright (C) 2010 NICTA (www.nicta.com.au) // Copyright (C) 2010-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010-2013 Conrad Sanderson
// Copyright (C) 2010 Dimitrios Bouzas // Copyright (C) 2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_find //! \addtogroup op_find
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
uword uword
op_find::helper op_find::helper
( (
Mat<uword>& indices, Mat<uword>& indices,
const Base<typename T1::elem_type, T1>& X const Base<typename T1::elem_type, T1>& X
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
typedef typename Proxy<T1>::ea_type ea_type;
const Proxy<T1> A(X.get_ref()); const Proxy<T1> A(X.get_ref());
ea_type PA = A.get_ea();
const uword n_elem = A.get_n_elem(); const uword n_elem = A.get_n_elem();
indices.set_size(n_elem, 1); indices.set_size(n_elem, 1);
uword* indices_mem = indices.memptr(); uword* indices_mem = indices.memptr();
uword n_nz = 0; uword n_nz = 0;
for(uword i=0; i<n_elem; ++i) if(Proxy<T1>::prefer_at_accessor == false)
{ {
if(PA[i] != eT(0)) typename Proxy<T1>::ea_type PA = A.get_ea();
for(uword i=0; i<n_elem; ++i)
{ {
indices_mem[n_nz] = i; if(PA[i] != eT(0)) { indices_mem[n_nz] = i; ++n_nz; }
++n_nz; }
}
else
{
const uword n_rows = A.get_n_rows();
const uword n_cols = A.get_n_cols();
uword i = 0;
for(uword col=0; col < n_cols; ++col)
for(uword row=0; row < n_rows; ++row)
{
if(A.at(row,col) != eT(0)) { indices_mem[n_nz] = i; ++n_nz; }
++i;
} }
} }
return n_nz; return n_nz;
} }
template<typename T1, typename op_type> template<typename T1, typename op_type>
inline inline
uword uword
op_find::helper op_find::helper
skipping to change at line 68 skipping to change at line 77
Mat<uword>& indices, Mat<uword>& indices,
const mtOp<uword, T1, op_type>& X, const mtOp<uword, T1, op_type>& X,
const typename arma_op_rel_only<op_type>::result junk1, const typename arma_op_rel_only<op_type>::result junk1,
const typename arma_not_cx<typename T1::elem_type>::result junk2 const typename arma_not_cx<typename T1::elem_type>::result junk2
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_ignore(junk1); arma_ignore(junk1);
arma_ignore(junk2); arma_ignore(junk2);
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
typedef typename Proxy<T1>::ea_type ea_type;
const eT val = X.aux; const eT val = X.aux;
const Proxy<T1> A(X.m); const Proxy<T1> A(X.m);
ea_type PA = A.get_ea();
const uword n_elem = A.get_n_elem(); const uword n_elem = A.get_n_elem();
indices.set_size(n_elem, 1); indices.set_size(n_elem, 1);
uword* indices_mem = indices.memptr(); uword* indices_mem = indices.memptr();
uword n_nz = 0; uword n_nz = 0;
for(uword i=0; i<n_elem; ++i) if(Proxy<T1>::prefer_at_accessor == false)
{ {
const eT tmp = PA[i]; typename Proxy<T1>::ea_type PA = A.get_ea();
bool not_zero; uword i,j;
for(i=0, j=1; j < n_elem; i+=2, j+=2)
{
const eT tpi = PA[i];
const eT tpj = PA[j];
if(is_same_type<op_type, op_rel_lt_pre >::value == true) { not_ bool not_zero_i;
zero = (val < tmp); } bool not_zero_j;
else if(is_same_type<op_type, op_rel_lt_post >::value == true) { not_
zero = (tmp < val); } if(is_same_type<op_type, op_rel_lt_pre >::value == true) { no
else if(is_same_type<op_type, op_rel_gt_pre >::value == true) { not_ t_zero_i = (val < tpi); }
zero = (val > tmp); } else if(is_same_type<op_type, op_rel_lt_post >::value == true) { no
else if(is_same_type<op_type, op_rel_gt_post >::value == true) { not_ t_zero_i = (tpi < val); }
zero = (tmp > val); } else if(is_same_type<op_type, op_rel_gt_pre >::value == true) { no
else if(is_same_type<op_type, op_rel_lteq_pre >::value == true) { not_ t_zero_i = (val > tpi); }
zero = (val <= tmp); } else if(is_same_type<op_type, op_rel_gt_post >::value == true) { no
else if(is_same_type<op_type, op_rel_lteq_post>::value == true) { not_ t_zero_i = (tpi > val); }
zero = (tmp <= val); } else if(is_same_type<op_type, op_rel_lteq_pre >::value == true) { no
else if(is_same_type<op_type, op_rel_gteq_pre >::value == true) { not_ t_zero_i = (val <= tpi); }
zero = (val >= tmp); } else if(is_same_type<op_type, op_rel_lteq_post>::value == true) { no
else if(is_same_type<op_type, op_rel_gteq_post>::value == true) { not_ t_zero_i = (tpi <= val); }
zero = (tmp >= val); } else if(is_same_type<op_type, op_rel_gteq_pre >::value == true) { no
else if(is_same_type<op_type, op_rel_eq >::value == true) { not_ t_zero_i = (val >= tpi); }
zero = (tmp == val); } else if(is_same_type<op_type, op_rel_gteq_post>::value == true) { no
else if(is_same_type<op_type, op_rel_noteq >::value == true) { not_ t_zero_i = (tpi >= val); }
zero = (tmp != val); } else if(is_same_type<op_type, op_rel_eq >::value == true) { no
else not_zero = false; t_zero_i = (tpi == val); }
else if(is_same_type<op_type, op_rel_noteq >::value == true) { no
t_zero_i = (tpi != val); }
else not_zero_i = false;
if(is_same_type<op_type, op_rel_lt_pre >::value == true) { no
t_zero_j = (val < tpj); }
else if(is_same_type<op_type, op_rel_lt_post >::value == true) { no
t_zero_j = (tpj < val); }
else if(is_same_type<op_type, op_rel_gt_pre >::value == true) { no
t_zero_j = (val > tpj); }
else if(is_same_type<op_type, op_rel_gt_post >::value == true) { no
t_zero_j = (tpj > val); }
else if(is_same_type<op_type, op_rel_lteq_pre >::value == true) { no
t_zero_j = (val <= tpj); }
else if(is_same_type<op_type, op_rel_lteq_post>::value == true) { no
t_zero_j = (tpj <= val); }
else if(is_same_type<op_type, op_rel_gteq_pre >::value == true) { no
t_zero_j = (val >= tpj); }
else if(is_same_type<op_type, op_rel_gteq_post>::value == true) { no
t_zero_j = (tpj >= val); }
else if(is_same_type<op_type, op_rel_eq >::value == true) { no
t_zero_j = (tpj == val); }
else if(is_same_type<op_type, op_rel_noteq >::value == true) { no
t_zero_j = (tpj != val); }
else not_zero_j = false;
if(not_zero_i == true) { indices_mem[n_nz] = i; ++n_nz; }
if(not_zero_j == true) { indices_mem[n_nz] = j; ++n_nz; }
}
if(not_zero == true) if(i < n_elem)
{ {
indices_mem[n_nz] = i; bool not_zero;
++n_nz;
const eT tmp = PA[i];
if(is_same_type<op_type, op_rel_lt_pre >::value == true) { no
t_zero = (val < tmp); }
else if(is_same_type<op_type, op_rel_lt_post >::value == true) { no
t_zero = (tmp < val); }
else if(is_same_type<op_type, op_rel_gt_pre >::value == true) { no
t_zero = (val > tmp); }
else if(is_same_type<op_type, op_rel_gt_post >::value == true) { no
t_zero = (tmp > val); }
else if(is_same_type<op_type, op_rel_lteq_pre >::value == true) { no
t_zero = (val <= tmp); }
else if(is_same_type<op_type, op_rel_lteq_post>::value == true) { no
t_zero = (tmp <= val); }
else if(is_same_type<op_type, op_rel_gteq_pre >::value == true) { no
t_zero = (val >= tmp); }
else if(is_same_type<op_type, op_rel_gteq_post>::value == true) { no
t_zero = (tmp >= val); }
else if(is_same_type<op_type, op_rel_eq >::value == true) { no
t_zero = (tmp == val); }
else if(is_same_type<op_type, op_rel_noteq >::value == true) { no
t_zero = (tmp != val); }
else not_zero = false;
if(not_zero == true) { indices_mem[n_nz] = i; ++n_nz; }
}
}
else
{
const uword n_rows = A.get_n_rows();
const uword n_cols = A.get_n_cols();
uword i = 0;
for(uword col=0; col < n_cols; ++col)
for(uword row=0; row < n_rows; ++row)
{
const eT tmp = A.at(row,col);
bool not_zero;
if(is_same_type<op_type, op_rel_lt_pre >::value == true) { no
t_zero = (val < tmp); }
else if(is_same_type<op_type, op_rel_lt_post >::value == true) { no
t_zero = (tmp < val); }
else if(is_same_type<op_type, op_rel_gt_pre >::value == true) { no
t_zero = (val > tmp); }
else if(is_same_type<op_type, op_rel_gt_post >::value == true) { no
t_zero = (tmp > val); }
else if(is_same_type<op_type, op_rel_lteq_pre >::value == true) { no
t_zero = (val <= tmp); }
else if(is_same_type<op_type, op_rel_lteq_post>::value == true) { no
t_zero = (tmp <= val); }
else if(is_same_type<op_type, op_rel_gteq_pre >::value == true) { no
t_zero = (val >= tmp); }
else if(is_same_type<op_type, op_rel_gteq_post>::value == true) { no
t_zero = (tmp >= val); }
else if(is_same_type<op_type, op_rel_eq >::value == true) { no
t_zero = (tmp == val); }
else if(is_same_type<op_type, op_rel_noteq >::value == true) { no
t_zero = (tmp != val); }
else not_zero = false;
if(not_zero == true) { indices_mem[n_nz] = i; ++n_nz; }
++i;
} }
} }
return n_nz; return n_nz;
} }
template<typename T1, typename op_type> template<typename T1, typename op_type>
inline inline
uword uword
op_find::helper op_find::helper
skipping to change at line 133 skipping to change at line 209
arma_ignore(junk1); arma_ignore(junk1);
arma_ignore(junk2); arma_ignore(junk2);
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
typedef typename Proxy<T1>::ea_type ea_type; typedef typename Proxy<T1>::ea_type ea_type;
const eT val = X.aux; const eT val = X.aux;
const Proxy<T1> A(X.m); const Proxy<T1> A(X.m);
ea_type PA = A.get_ea(); ea_type PA = A.get_ea();
const uword n_elem = A.get_n_elem(); const uword n_elem = A.get_n_elem();
indices.set_size(n_elem, 1); indices.set_size(n_elem, 1);
uword* indices_mem = indices.memptr(); uword* indices_mem = indices.memptr();
uword n_nz = 0; uword n_nz = 0;
for(uword i=0; i<n_elem; ++i) for(uword i=0; i<n_elem; ++i)
{ {
const eT tmp = PA[i]; const eT tmp = PA[i];
bool not_zero; bool not_zero;
if(is_same_type<op_type, op_rel_eq >::value == true) { not_zero = (tmp == val); } if(is_same_type<op_type, op_rel_eq >::value == true) { not_zero = (tmp == val); }
else if(is_same_type<op_type, op_rel_noteq>::value == true) { not_zero = (tmp != val); } else if(is_same_type<op_type, op_rel_noteq>::value == true) { not_zero = (tmp != val); }
else not_zero = false; else not_zero = false;
if(not_zero == true) if(not_zero == true) { indices_mem[n_nz] = i; ++n_nz; }
{
indices_mem[n_nz] = i;
++n_nz;
}
} }
return n_nz; return n_nz;
} }
template<typename T1, typename T2, typename glue_type> template<typename T1, typename T2, typename glue_type>
inline inline
uword uword
op_find::helper op_find::helper
( (
skipping to change at line 189 skipping to change at line 261
typedef typename T2::elem_type eT2; typedef typename T2::elem_type eT2;
typedef typename Proxy<T1>::ea_type ea_type1; typedef typename Proxy<T1>::ea_type ea_type1;
typedef typename Proxy<T2>::ea_type ea_type2; typedef typename Proxy<T2>::ea_type ea_type2;
const Proxy<T1> A(X.A); const Proxy<T1> A(X.A);
const Proxy<T2> B(X.B); const Proxy<T2> B(X.B);
arma_debug_assert_same_size(A, B, "relational operator"); arma_debug_assert_same_size(A, B, "relational operator");
ea_type1 PA = A.get_ea(); ea_type1 PA = A.get_ea();
ea_type2 PB = B.get_ea(); ea_type2 PB = B.get_ea();
const uword n_elem = B.get_n_elem(); const uword n_elem = B.get_n_elem();
indices.set_size(n_elem, 1); indices.set_size(n_elem, 1);
uword* indices_mem = indices.memptr(); uword* indices_mem = indices.memptr();
uword n_nz = 0; uword n_nz = 0;
for(uword i=0; i<n_elem; ++i) for(uword i=0; i<n_elem; ++i)
{ {
const eT1 tmp1 = PA[i]; const eT1 tmp1 = PA[i];
skipping to change at line 213 skipping to change at line 286
bool not_zero; bool not_zero;
if(is_same_type<glue_type, glue_rel_lt >::value == true) { not _zero = (tmp1 < tmp2); } if(is_same_type<glue_type, glue_rel_lt >::value == true) { not _zero = (tmp1 < tmp2); }
else if(is_same_type<glue_type, glue_rel_gt >::value == true) { not _zero = (tmp1 > tmp2); } else if(is_same_type<glue_type, glue_rel_gt >::value == true) { not _zero = (tmp1 > tmp2); }
else if(is_same_type<glue_type, glue_rel_lteq >::value == true) { not _zero = (tmp1 <= tmp2); } else if(is_same_type<glue_type, glue_rel_lteq >::value == true) { not _zero = (tmp1 <= tmp2); }
else if(is_same_type<glue_type, glue_rel_gteq >::value == true) { not _zero = (tmp1 >= tmp2); } else if(is_same_type<glue_type, glue_rel_gteq >::value == true) { not _zero = (tmp1 >= tmp2); }
else if(is_same_type<glue_type, glue_rel_eq >::value == true) { not _zero = (tmp1 == tmp2); } else if(is_same_type<glue_type, glue_rel_eq >::value == true) { not _zero = (tmp1 == tmp2); }
else if(is_same_type<glue_type, glue_rel_noteq >::value == true) { not _zero = (tmp1 != tmp2); } else if(is_same_type<glue_type, glue_rel_noteq >::value == true) { not _zero = (tmp1 != tmp2); }
else not_zero = false; else not_zero = false;
if(not_zero == true) if(not_zero == true) { indices_mem[n_nz] = i; ++n_nz; }
{
indices_mem[n_nz] = i;
++n_nz;
}
} }
return n_nz; return n_nz;
} }
template<typename T1, typename T2, typename glue_type> template<typename T1, typename T2, typename glue_type>
inline inline
uword uword
op_find::helper op_find::helper
( (
skipping to change at line 248 skipping to change at line 317
arma_ignore(junk3); arma_ignore(junk3);
typedef typename Proxy<T1>::ea_type ea_type1; typedef typename Proxy<T1>::ea_type ea_type1;
typedef typename Proxy<T2>::ea_type ea_type2; typedef typename Proxy<T2>::ea_type ea_type2;
const Proxy<T1> A(X.A); const Proxy<T1> A(X.A);
const Proxy<T2> B(X.B); const Proxy<T2> B(X.B);
arma_debug_assert_same_size(A, B, "relational operator"); arma_debug_assert_same_size(A, B, "relational operator");
ea_type1 PA = A.get_ea(); ea_type1 PA = A.get_ea();
ea_type2 PB = B.get_ea(); ea_type2 PB = B.get_ea();
const uword n_elem = B.get_n_elem(); const uword n_elem = B.get_n_elem();
indices.set_size(n_elem, 1); indices.set_size(n_elem, 1);
uword* indices_mem = indices.memptr(); uword* indices_mem = indices.memptr();
uword n_nz = 0; uword n_nz = 0;
for(uword i=0; i<n_elem; ++i) for(uword i=0; i<n_elem; ++i)
{ {
bool not_zero; bool not_zero;
if(is_same_type<glue_type, glue_rel_eq >::value == true) { not _zero = (PA[i] == PB[i]); } if(is_same_type<glue_type, glue_rel_eq >::value == true) { not _zero = (PA[i] == PB[i]); }
else if(is_same_type<glue_type, glue_rel_noteq >::value == true) { not _zero = (PA[i] != PB[i]); } else if(is_same_type<glue_type, glue_rel_noteq >::value == true) { not _zero = (PA[i] != PB[i]); }
else not_zero = false; else not_zero = false;
if(not_zero == true) if(not_zero == true) { indices_mem[n_nz] = i; ++n_nz; }
{
indices_mem[n_nz] = i;
++n_nz;
}
} }
return n_nz; return n_nz;
} }
template<typename T1> template<typename T1>
inline inline
void void
op_find::apply(Mat<uword>& out, const mtOp<uword, T1, op_find>& X) op_find::apply(Mat<uword>& out, const mtOp<uword, T1, op_find>& X)
{ {
 End of changes. 21 change blocks. 
67 lines changed or deleted 163 lines changed or added


 op_flip_bones.hpp   op_flip_bones.hpp 
// Copyright (C) 2010 NICTA (www.nicta.com.au) // Copyright (C) 2010 NICTA (www.nicta.com.au)
// Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_flip //! \addtogroup op_flip
//! @{ //! @{
class op_flipud class op_flipud
{ {
public: public:
template<typename T1> template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op _flipud>& in); inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op _flipud>& in);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_flip_meat.hpp   op_flip_meat.hpp 
// Copyright (C) 2010 NICTA (www.nicta.com.au) // Copyright (C) 2010 NICTA (www.nicta.com.au)
// Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_flip //! \addtogroup op_flip
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
void void
op_flipud::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_flipud>& in) op_flipud::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_flipud>& in)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_hist_bones.hpp   op_hist_bones.hpp 
// Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_hist //! \addtogroup op_hist
//! @{ //! @{
class op_hist class op_hist
{ {
public: public:
template<typename T1> template<typename T1>
inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_hist>& X); inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_hist>& X);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_hist_meat.hpp   op_hist_meat.hpp 
// Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_hist //! \addtogroup op_hist
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
void void
op_hist::apply(Mat<uword>& out, const mtOp<uword, T1, op_hist>& X) op_hist::apply(Mat<uword>& out, const mtOp<uword, T1, op_hist>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_htrans_bones.hpp   op_htrans_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_htrans //! \addtogroup op_htrans
//! @{ //! @{
//! 'hermitian transpose' operation //! 'hermitian transpose' operation
class op_htrans class op_htrans
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_htrans_meat.hpp   op_htrans_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_htrans //! \addtogroup op_htrans
//! @{ //! @{
template<typename eT> template<typename eT>
arma_hot arma_hot
arma_inline arma_inline
void void
op_htrans::apply_noalias(Mat<eT>& out, const Mat<eT>& A, const typename arm a_not_cx<eT>::result* junk) op_htrans::apply_noalias(Mat<eT>& out, const Mat<eT>& A, const typename arm a_not_cx<eT>::result* junk)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_inv_bones.hpp   op_inv_bones.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_inv //! \addtogroup op_inv
//! @{ //! @{
//! 'invert matrix' operation (general matrices) //! 'invert matrix' operation (general matrices)
class op_inv class op_inv
{ {
public: public:
template<typename eT> template<typename eT>
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_inv_meat.hpp   op_inv_meat.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_inv //! \addtogroup op_inv
//! @{ //! @{
//! immediate inverse of a matrix, storing the result in a dense matrix //! immediate inverse of a matrix, storing the result in a dense matrix
template<typename eT> template<typename eT>
inline inline
void void
op_inv::apply(Mat<eT>& out, const Mat<eT>& A, const bool slow) op_inv::apply(Mat<eT>& out, const Mat<eT>& A, const bool slow)
{ {
skipping to change at line 45 skipping to change at line 40
} }
//! immediate inverse of T1, storing the result in a dense matrix //! immediate inverse of T1, storing the result in a dense matrix
template<typename T1> template<typename T1>
inline inline
void void
op_inv::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_inv>& X) op_inv::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_inv>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT;
const strip_diagmat<T1> strip(X.m); const strip_diagmat<T1> strip(X.m);
if(strip.do_diagmat == true) if(strip.do_diagmat == true)
{ {
op_inv::apply_diag(out, strip.M); op_inv::apply_diag(out, strip.M);
} }
else else
{ {
const uword mode = X.aux_uword_a; const uword mode = X.aux_uword_a;
 End of changes. 2 change blocks. 
10 lines changed or deleted 3 lines changed or added


 op_max_bones.hpp   op_max_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_max //! \addtogroup op_max
//! @{ //! @{
//! Class for finding maximum values in a matrix //! Class for finding maximum values in a matrix
class op_max class op_max
{ {
public: public:
template<typename T1> template<typename T1>
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_max_meat.hpp   op_max_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_max //! \addtogroup op_max
//! @{ //! @{
//! \brief //! \brief
//! For each row or for each column, find the maximum value. //! For each row or for each column, find the maximum value.
//! The result is stored in a dense matrix that has either one column or on e row. //! The result is stored in a dense matrix that has either one column or on e row.
//! The dimension, for which the maxima are found, is set via the max() fun ction. //! The dimension, for which the maxima are found, is set via the max() fun ction.
template<typename T1> template<typename T1>
inline inline
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_mean_bones.hpp   op_mean_bones.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_mean //! \addtogroup op_mean
//! @{ //! @{
//! Class for finding mean values of a matrix //! Class for finding mean values of a matrix
class op_mean class op_mean
{ {
public: public:
template<typename T1> template<typename T1>
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_mean_meat.hpp   op_mean_meat.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_mean //! \addtogroup op_mean
//! @{ //! @{
//! \brief //! \brief
//! For each row or for each column, find the mean value. //! For each row or for each column, find the mean value.
//! The result is stored in a dense matrix that has either one column or on e row. //! The result is stored in a dense matrix that has either one column or on e row.
//! The dimension, for which the means are found, is set via the mean() fun ction. //! The dimension, for which the means are found, is set via the mean() fun ction.
template<typename T1> template<typename T1>
inline inline
void void
op_mean::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_mean>& in) op_mean::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_mean>& in)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
typedef typename get_pod_type<eT>::result T;
const unwrap_check<T1> tmp(in.m, out); const unwrap_check<T1> tmp(in.m, out);
const Mat<eT>& X = tmp.M; const Mat<eT>& X = tmp.M;
const uword dim = in.aux_uword_a; const uword dim = in.aux_uword_a;
arma_debug_check( (dim > 1), "mean(): incorrect usage. dim must be 0 or 1 "); arma_debug_check( (dim > 1), "mean(): incorrect usage. dim must be 0 or 1 ");
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;
 End of changes. 2 change blocks. 
10 lines changed or deleted 4 lines changed or added


 op_median_bones.hpp   op_median_bones.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_median //! \addtogroup op_median
//! @{ //! @{
template<typename T> template<typename T>
struct arma_cx_median_packet struct arma_cx_median_packet
{ {
T val; T val;
uword index; uword index;
}; };
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_median_meat.hpp   op_median_meat.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_median //! \addtogroup op_median
//! @{ //! @{
//! \brief //! \brief
//! For each row or for each column, find the median value. //! For each row or for each column, find the median value.
//! The result is stored in a dense matrix that has either one column or on e row. //! The result is stored in a dense matrix that has either one column or on e row.
//! The dimension, for which the medians are found, is set via the median() function. //! The dimension, for which the medians are found, is set via the median() function.
template<typename T1> template<typename T1>
inline inline
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_min_bones.hpp   op_min_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_min //! \addtogroup op_min
//! @{ //! @{
//! Class for finding minimum values in a matrix //! Class for finding minimum values in a matrix
class op_min class op_min
{ {
public: public:
template<typename T1> template<typename T1>
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_min_meat.hpp   op_min_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_min //! \addtogroup op_min
//! @{ //! @{
//! \brief //! \brief
//! For each row or for each column, find the minimum value. //! For each row or for each column, find the minimum value.
//! The result is stored in a dense matrix that has either one column or on e row. //! The result is stored in a dense matrix that has either one column or on e row.
//! The dimension, for which the minima are found, is set via the min() fun ction. //! The dimension, for which the minima are found, is set via the min() fun ction.
template<typename T1> template<typename T1>
inline void op_min::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_ min>& in) inline void op_min::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_ min>& in)
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_misc_bones.hpp   op_misc_bones.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_misc //! \addtogroup op_misc
//! @{ //! @{
class op_real class op_real
{ {
public: public:
template<typename T1> template<typename T1>
inline static void apply( Mat<typename T1::pod_type>& out, const mtOp<typ ename T1::pod_type, T1, op_real>& X); inline static void apply( Mat<typename T1::pod_type>& out, const mtOp<typ ename T1::pod_type, T1, op_real>& X);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_misc_meat.hpp   op_misc_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_misc //! \addtogroup op_misc
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
void void
op_real::apply( Mat<typename T1::pod_type>& out, const mtOp<typename T1::po d_type, T1, op_real>& X ) op_real::apply( Mat<typename T1::pod_type>& out, const mtOp<typename T1::po d_type, T1, op_real>& X )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_pinv_bones.hpp   op_pinv_bones.hpp 
// Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // Copyright (C) 2009-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2011 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_pinv //! \addtogroup op_pinv
//! @{ //! @{
class op_pinv class op_pinv
{ {
public: public:
template<typename eT> inline static void direct_pinv(Mat<eT>& out, const Mat<eT>& A, const eT in_tol); template<typename eT> inline static void direct_pinv(Mat<eT>& out, const Mat<eT>& A, const eT in_tol);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_pinv_meat.hpp   op_pinv_meat.hpp 
// Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // Copyright (C) 2009-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2011 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// Copyright (C) 2011 Stanislav Funiak // Copyright (C) 2011 Stanislav Funiak
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_pinv //! \addtogroup op_pinv
//! @{ //! @{
template<typename eT> template<typename eT>
inline inline
void void
op_pinv::direct_pinv(Mat<eT>& out, const Mat<eT>& A, const eT in_tol) op_pinv::direct_pinv(Mat<eT>& out, const Mat<eT>& A, const eT in_tol)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_princomp_bones.hpp   op_princomp_bones.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// Copyright (C) 2010 Dimitrios Bouzas // Copyright (C) 2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_princomp //! \addtogroup op_princomp
//! @{ //! @{
class op_princomp class op_princomp
{ {
public: public:
// //
// real element versions // real element versions
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_princomp_meat.hpp   op_princomp_meat.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// Copyright (C) 2010 Dimitrios Bouzas // Copyright (C) 2010 Dimitrios Bouzas
// Copyright (C) 2011 Stanislav Funiak // Copyright (C) 2011 Stanislav Funiak
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_princomp //! \addtogroup op_princomp
//! @{ //! @{
//! \brief //! \brief
//! principal component analysis -- 4 arguments version //! principal component analysis -- 4 arguments version
//! computation is done via singular value decomposition //! computation is done via singular value decomposition
//! coeff_out -> principal component coefficients //! coeff_out -> principal component coefficients
//! score_out -> projected samples //! score_out -> projected samples
//! latent_out -> eigenvalues of principal vectors //! latent_out -> eigenvalues of principal vectors
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_prod_bones.hpp   op_prod_bones.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_prod //! \addtogroup op_prod
//! @{ //! @{
//! Class for finding products of values in a matrix (e.g. along rows or c olumns) //! Class for finding products of values in a matrix (e.g. along rows or c olumns)
class op_prod class op_prod
{ {
public: public:
template<typename T1> template<typename T1>
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_prod_meat.hpp   op_prod_meat.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_prod //! \addtogroup op_prod
//! @{ //! @{
//! \brief //! \brief
//! Immediate product of elements of a matrix along a specified dimension ( either rows or columns). //! Immediate product of elements of a matrix along a specified dimension ( either rows or columns).
//! The result is stored in a dense matrix that has either one column or on e row. //! The result is stored in a dense matrix that has either one column or on e row.
//! See the prod() function for more details. //! See the prod() function for more details.
template<typename T1> template<typename T1>
inline inline
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_relational_bones.hpp   op_relational_bones.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_relational //! \addtogroup op_relational
//! @{ //! @{
class op_rel_lt_pre class op_rel_lt_pre
{ {
public: public:
template<typename T1> template<typename T1>
inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_lt _pre>& X); inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_lt _pre>& X);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_relational_meat.hpp   op_relational_meat.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_relational //! \addtogroup op_relational
//! @{ //! @{
#undef operator_rel #undef operator_rel
#undef arma_applier_mat_pre #undef arma_applier_mat_pre
#undef arma_applier_mat_post #undef arma_applier_mat_post
#undef arma_applier_cube_pre #undef arma_applier_cube_pre
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_repmat_bones.hpp   op_repmat_bones.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_repmat //! \addtogroup op_repmat
//! @{ //! @{
class op_repmat class op_repmat
{ {
public: public:
template<typename T1> inline static void apply(Mat<typename T1::elem_type >& out, const Op<T1,op_repmat>& in); template<typename T1> inline static void apply(Mat<typename T1::elem_type >& out, const Op<T1,op_repmat>& in);
}; };
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_repmat_meat.hpp   op_repmat_meat.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_repmat //! \addtogroup op_repmat
//! @{ //! @{
//! \brief //! \brief
//! implementation of the 'repeat matrix' operation, used for constructing matrices //! implementation of the 'repeat matrix' operation, used for constructing matrices
template<typename T1> template<typename T1>
inline inline
void void
op_repmat::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_repmat>& in) op_repmat::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_repmat>& in)
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_reshape_bones.hpp   op_reshape_bones.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_reshape //! \addtogroup op_reshape
//! @{ //! @{
class op_reshape class op_reshape
{ {
public: public:
template<typename T1> inline static void apply( Mat<typename T1::elem_typ e>& out, const Op<T1,op_reshape>& in); template<typename T1> inline static void apply( Mat<typename T1::elem_typ e>& out, const Op<T1,op_reshape>& in);
template<typename T1> inline static void apply(Cube<typename T1::elem_typ e>& out, const OpCube<T1,op_reshape>& in); template<typename T1> inline static void apply(Cube<typename T1::elem_typ e>& out, const OpCube<T1,op_reshape>& in);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_reshape_meat.hpp   op_reshape_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_reshape //! \addtogroup op_reshape
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
void void
op_reshape::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_reshape> & in) op_reshape::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_reshape> & in)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_resize_bones.hpp   op_resize_bones.hpp 
// Copyright (C) 2011 NICTA (www.nicta.com.au) // Copyright (C) 2011 NICTA (www.nicta.com.au)
// Copyright (C) 2011 Conrad Sanderson // Copyright (C) 2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_resize //! \addtogroup op_resize
//! @{ //! @{
class op_resize class op_resize
{ {
public: public:
template<typename T1> inline static void apply( Mat<typename T1::elem_typ e>& out, const Op<T1,op_resize>& in); template<typename T1> inline static void apply( Mat<typename T1::elem_typ e>& out, const Op<T1,op_resize>& in);
template<typename T1> inline static void apply(Cube<typename T1::elem_typ e>& out, const OpCube<T1,op_resize>& in); template<typename T1> inline static void apply(Cube<typename T1::elem_typ e>& out, const OpCube<T1,op_resize>& in);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_resize_meat.hpp   op_resize_meat.hpp 
// Copyright (C) 2011 NICTA (www.nicta.com.au) // Copyright (C) 2011 NICTA (www.nicta.com.au)
// Copyright (C) 2011 Conrad Sanderson // Copyright (C) 2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_resize //! \addtogroup op_resize
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
void void
op_resize::apply(Mat<typename T1::elem_type>& actual_out, const Op<T1,op_re size>& in) op_resize::apply(Mat<typename T1::elem_type>& actual_out, const Op<T1,op_re size>& in)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_shuffle_bones.hpp   op_shuffle_bones.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_shuffle //! \addtogroup op_shuffle
//! @{ //! @{
class op_shuffle class op_shuffle
{ {
public: public:
template<typename T1> inline static void apply(Mat<typename T1::elem_type >& out, const Op<T1,op_shuffle>& in); template<typename T1> inline static void apply(Mat<typename T1::elem_type >& out, const Op<T1,op_shuffle>& in);
}; };
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_shuffle_meat.hpp   op_shuffle_meat.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2009-2010 Dimitrios Bouzas
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_shuffle //! \addtogroup op_shuffle
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
void void
op_shuffle::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_shuffle> & in) op_shuffle::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_shuffle> & in)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_sort_bones.hpp   op_sort_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_sort //! \addtogroup op_sort
//! @{ //! @{
class op_sort class op_sort
{ {
public: public:
template<typename eT> template<typename eT>
inline static void copy_row(eT* X, const Mat<eT>& A, const uword row); inline static void copy_row(eT* X, const Mat<eT>& A, const uword row);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_sort_meat.hpp   op_sort_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_sort //! \addtogroup op_sort
//! @{ //! @{
template<typename eT> template<typename eT>
class arma_ascend_sort_helper class arma_ascend_sort_helper
{ {
public: public:
arma_inline arma_inline
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_stddev_bones.hpp   op_stddev_bones.hpp 
// Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // Copyright (C) 2009-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_stddev //! \addtogroup op_stddev
//! @{ //! @{
//! Class for finding the standard deviation //! Class for finding the standard deviation
class op_stddev class op_stddev
{ {
public: public:
template<typename T1> template<typename T1>
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_stddev_meat.hpp   op_stddev_meat.hpp 
// Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // Copyright (C) 2009-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_stddev //! \addtogroup op_stddev
//! @{ //! @{
//! \brief //! \brief
//! For each row or for each column, find the standard deviation. //! For each row or for each column, find the standard deviation.
//! The result is stored in a dense matrix that has either one column or on e row. //! The result is stored in a dense matrix that has either one column or on e row.
//! The dimension for which the standard deviations are found is set via th e stddev() function. //! The dimension for which the standard deviations are found is set via th e stddev() function.
template<typename T1> template<typename T1>
inline inline
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_strans_bones.hpp   op_strans_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_strans //! \addtogroup op_strans
//! @{ //! @{
//! 'matrix transpose' operation //! 'matrix transpose' operation
class op_strans class op_strans
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_strans_meat.hpp   op_strans_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_strans //! \addtogroup op_strans
//! @{ //! @{
//! for tiny square matrices (size <= 4x4) //! for tiny square matrices (size <= 4x4)
template<typename eT> template<typename eT>
arma_hot arma_hot
inline inline
void void
op_strans::apply_noalias_tinysq(Mat<eT>& out, const Mat<eT>& A) op_strans::apply_noalias_tinysq(Mat<eT>& out, const Mat<eT>& A)
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_sum_bones.hpp   op_sum_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_sum //! \addtogroup op_sum
//! @{ //! @{
//! Class for finding sums of values in a matrix (e.g. along rows or colum ns) //! Class for finding sums of values in a matrix (e.g. along rows or colum ns)
class op_sum class op_sum
{ {
public: public:
template<typename T1> template<typename T1>
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_sum_meat.hpp   op_sum_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_sum //! \addtogroup op_sum
//! @{ //! @{
//! \brief //! \brief
//! Immediate sum of elements of a matrix along a specified dimension (eith er rows or columns). //! Immediate sum of elements of a matrix along a specified dimension (eith er rows or columns).
//! The result is stored in a dense matrix that has either one column or on e row. //! The result is stored in a dense matrix that has either one column or on e row.
//! See the sum() function for more details. //! See the sum() function for more details.
template<typename T1> template<typename T1>
arma_hot arma_hot
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_symmat_bones.hpp   op_symmat_bones.hpp 
// Copyright (C) 2011 NICTA (www.nicta.com.au) // Copyright (C) 2011 NICTA (www.nicta.com.au)
// Copyright (C) 2011 Conrad Sanderson // Copyright (C) 2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_symmat //! \addtogroup op_symmat
//! @{ //! @{
class op_symmat class op_symmat
{ {
public: public:
template<typename T1> template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op _symmat>& in, const typename arma_not_cx<typename T1::elem_type>::result* j unk = 0); inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op _symmat>& in, const typename arma_not_cx<typename T1::elem_type>::result* j unk = 0);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_symmat_meat.hpp   op_symmat_meat.hpp 
// Copyright (C) 2011-2012 NICTA (www.nicta.com.au) // Copyright (C) 2011-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2011-2012 Conrad Sanderson // Copyright (C) 2011-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_symmat //! \addtogroup op_symmat
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
void void
op_symmat::apply op_symmat::apply
( (
Mat<typename T1::elem_type>& out, Mat<typename T1::elem_type>& out,
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_trimat_bones.hpp   op_trimat_bones.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// Copyright (C) 2011 Ryan Curtin // Copyright (C) 2011 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_trimat //! \addtogroup op_trimat
//! @{ //! @{
class op_trimat class op_trimat
{ {
public: public:
template<typename eT> template<typename eT>
inline static void fill_zeros(Mat<eT>& A, const bool upper); inline static void fill_zeros(Mat<eT>& A, const bool upper);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_trimat_meat.hpp   op_trimat_meat.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// Copyright (C) 2011 Ryan Curtin // Copyright (C) 2011 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_trimat //! \addtogroup op_trimat
//! @{ //! @{
template<typename eT> template<typename eT>
inline inline
void void
op_trimat::fill_zeros(Mat<eT>& out, const bool upper) op_trimat::fill_zeros(Mat<eT>& out, const bool upper)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_unique_bones.hpp   op_unique_bones.hpp 
// Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// Copyright (C) 2012 Arnold Wiliem // Copyright (C) 2012 Arnold Wiliem
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_unique //! \addtogroup op_unique
//! @{ //! @{
class op_unique class op_unique
{ {
public: public:
template<typename T1> template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op _unique>& X); inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op _unique>& X);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_unique_meat.hpp   op_unique_meat.hpp 
// Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// Copyright (C) 2012 Arnold Wiliem // Copyright (C) 2012 Arnold Wiliem
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_unique //! \addtogroup op_unique
//! @{ //! @{
// TODO: add an efficient implementation for complex numbers // TODO: add an efficient implementation for complex numbers
template<typename T1> template<typename T1>
inline inline
void void
op_unique::apply(Mat<typename T1::elem_type>& out, const Op<T1, op_unique>& X) op_unique::apply(Mat<typename T1::elem_type>& out, const Op<T1, op_unique>& X)
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_var_bones.hpp   op_var_bones.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_var //! \addtogroup op_var
//! @{ //! @{
//! Class for finding variance values of a matrix //! Class for finding variance values of a matrix
class op_var class op_var
{ {
public: public:
template<typename T1> template<typename T1>
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 op_var_meat.hpp   op_var_meat.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 op_var //! \addtogroup op_var
//! @{ //! @{
//! \brief //! \brief
//! For each row or for each column, find the variance. //! For each row or for each column, find the variance.
//! The result is stored in a dense matrix that has either one column or on e row. //! The result is stored in a dense matrix that has either one column or on e row.
//! The dimension, for which the variances are found, is set via the var() function. //! The dimension, for which the variances are found, is set via the var() function.
template<typename T1> template<typename T1>
inline inline
skipping to change at line 105 skipping to change at line 100
return op_var::direct_var(tmp.memptr(), tmp.n_elem, norm_type); return op_var::direct_var(tmp.memptr(), tmp.n_elem, norm_type);
} }
template<typename eT> template<typename eT>
inline inline
typename get_pod_type<eT>::result typename get_pod_type<eT>::result
op_var::var_vec(const subview_col<eT>& X, const uword norm_type) op_var::var_vec(const subview_col<eT>& X, const uword norm_type)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename get_pod_type<eT>::result T;
arma_debug_check( (norm_type > 1), "var(): incorrect usage. norm_type mus t be 0 or 1"); arma_debug_check( (norm_type > 1), "var(): incorrect usage. norm_type mus t be 0 or 1");
return op_var::direct_var(X.colptr(0), X.n_rows, norm_type); return op_var::direct_var(X.colptr(0), X.n_rows, norm_type);
} }
template<typename eT> template<typename eT>
inline inline
typename get_pod_type<eT>::result typename get_pod_type<eT>::result
op_var::var_vec(const subview_row<eT>& X, const uword norm_type) op_var::var_vec(const subview_row<eT>& X, const uword norm_type)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename get_pod_type<eT>::result T;
arma_debug_check( (norm_type > 1), "var(): incorrect usage. norm_type mus t be 0 or 1"); arma_debug_check( (norm_type > 1), "var(): incorrect usage. norm_type mus t be 0 or 1");
const Mat<eT>& A = X.m; const Mat<eT>& A = X.m;
const uword start_row = X.aux_row1; const uword start_row = X.aux_row1;
const uword start_col = X.aux_col1; const uword start_col = X.aux_col1;
const uword end_col_p1 = start_col + X.n_cols; const uword end_col_p1 = start_col + X.n_cols;
podarray<eT> tmp(X.n_elem); podarray<eT> tmp(X.n_elem);
 End of changes. 3 change blocks. 
12 lines changed or deleted 3 lines changed or added


 operator_cube_div.hpp   operator_cube_div.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 operator_cube_div //! \addtogroup operator_cube_div
//! @{ //! @{
//! BaseCube / scalar //! BaseCube / scalar
template<typename T1> template<typename T1>
arma_inline arma_inline
const eOpCube<T1, eop_scalar_div_post> const eOpCube<T1, eop_scalar_div_post>
operator/ operator/
( (
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 operator_cube_minus.hpp   operator_cube_minus.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 operator_cube_minus //! \addtogroup operator_cube_minus
//! @{ //! @{
//! unary - //! unary -
template<typename T1> template<typename T1>
arma_inline arma_inline
const eOpCube<T1, eop_neg> const eOpCube<T1, eop_neg>
operator- operator-
( (
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 operator_cube_plus.hpp   operator_cube_plus.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 operator_cube_plus //! \addtogroup operator_cube_plus
//! @{ //! @{
//! unary plus operation (does nothing, but is required for completeness) //! unary plus operation (does nothing, but is required for completeness)
template<typename T1> template<typename T1>
arma_inline arma_inline
const BaseCube<typename T1::elem_type,T1>& const BaseCube<typename T1::elem_type,T1>&
operator+ operator+
( (
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 operator_cube_relational.hpp   operator_cube_relational.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 operator_cube_relational //! \addtogroup operator_cube_relational
//! @{ //! @{
// < : lt // < : lt
// > : gt // > : gt
// <= : lteq // <= : lteq
// >= : gteq // >= : gteq
// == : eq // == : eq
// != : noteq // != : noteq
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 operator_cube_schur.hpp   operator_cube_schur.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 operator_cube_schur //! \addtogroup operator_cube_schur
//! @{ //! @{
// operator %, which we define it to do a schur product (element-wise multi plication) // operator %, which we define it to do a schur product (element-wise multi plication)
//! element-wise multiplication of BaseCube objects with same element type //! element-wise multiplication of BaseCube objects with same element type
template<typename T1, typename T2> template<typename T1, typename T2>
arma_inline arma_inline
const eGlueCube<T1, T2, eglue_schur> const eGlueCube<T1, T2, eglue_schur>
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 operator_cube_times.hpp   operator_cube_times.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 operator_cube_times //! \addtogroup operator_cube_times
//! @{ //! @{
//! BaseCube * scalar //! BaseCube * scalar
template<typename T1> template<typename T1>
arma_inline arma_inline
const eOpCube<T1, eop_scalar_times> const eOpCube<T1, eop_scalar_times>
operator* operator*
( (
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 operator_div.hpp   operator_div.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 operator_div //! \addtogroup operator_div
//! @{ //! @{
//! Base / scalar //! Base / scalar
template<typename T1> template<typename T1>
arma_inline arma_inline
typename typename
enable_if2< is_arma_type<T1>::value, const eOp<T1, eop_scalar_div_post> >:: result enable_if2< is_arma_type<T1>::value, const eOp<T1, eop_scalar_div_post> >:: result
operator/ operator/
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 operator_minus.hpp   operator_minus.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 operator_minus //! \addtogroup operator_minus
//! @{ //! @{
//! unary - //! unary -
template<typename T1> template<typename T1>
arma_inline arma_inline
typename typename
enable_if2< is_arma_type<T1>::value, const eOp<T1, eop_neg> >::result enable_if2< is_arma_type<T1>::value, const eOp<T1, eop_neg> >::result
operator- operator-
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 operator_ostream.hpp   operator_ostream.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 operator_ostream //! \addtogroup operator_ostream
//! @{ //! @{
template<typename eT, typename T1> template<typename eT, typename T1>
inline inline
std::ostream& std::ostream&
operator<< (std::ostream& o, const Base<eT,T1>& X) operator<< (std::ostream& o, const Base<eT,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 operator_plus.hpp   operator_plus.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 operator_plus //! \addtogroup operator_plus
//! @{ //! @{
//! unary plus operation (does nothing, but is required for completeness) //! unary plus operation (does nothing, but is required for completeness)
template<typename T1> template<typename T1>
arma_inline arma_inline
typename enable_if2< is_arma_type<T1>::value, const T1& >::result typename enable_if2< is_arma_type<T1>::value, const T1& >::result
operator+ operator+
(const T1& X) (const T1& X)
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 operator_relational.hpp   operator_relational.hpp 
// Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 operator_relational //! \addtogroup operator_relational
//! @{ //! @{
// < : lt // < : lt
// > : gt // > : gt
// <= : lteq // <= : lteq
// >= : gteq // >= : gteq
// == : eq // == : eq
// != : noteq // != : noteq
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 operator_schur.hpp   operator_schur.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 operator_schur //! \addtogroup operator_schur
//! @{ //! @{
// operator %, which we define it to do a schur product (element-wise multi plication) // operator %, which we define it to do a schur product (element-wise multi plication)
//! element-wise multiplication of user-accessible Armadillo objects with s ame element type //! element-wise multiplication of user-accessible Armadillo objects with s ame element type
template<typename T1, typename T2> template<typename T1, typename T2>
arma_inline arma_inline
typename typename
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 operator_times.hpp   operator_times.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 operator_times //! \addtogroup operator_times
//! @{ //! @{
//! Base * scalar //! Base * scalar
template<typename T1> template<typename T1>
arma_inline arma_inline
typename enable_if2< is_arma_type<T1>::value, const eOp<T1, eop_scalar_time s> >::result typename enable_if2< is_arma_type<T1>::value, const eOp<T1, eop_scalar_time s> >::result
operator* operator*
(const T1& X, const typename T1::elem_type k) (const T1& X, const typename T1::elem_type k)
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 podarray_bones.hpp   podarray_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 podarray //! \addtogroup podarray
//! @{ //! @{
struct podarray_prealloc_n_elem struct podarray_prealloc_n_elem
{ {
static const uword val = 16; static const uword val = 16;
}; };
//! A lightweight array for POD types. For internal use only! //! A lightweight array for POD types. For internal use only!
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 podarray_meat.hpp   podarray_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 podarray //! \addtogroup podarray
//! @{ //! @{
template<typename eT> template<typename eT>
arma_hot arma_hot
inline inline
podarray<eT>::~podarray() podarray<eT>::~podarray()
{ {
arma_extra_debug_sigprint_this(this); arma_extra_debug_sigprint_this(this);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 promote_type.hpp   promote_type.hpp 
// Copyright (C) 2009-2013 NICTA (www.nicta.com.au) // Copyright (C) 2009-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2013 Conrad Sanderson // Copyright (C) 2009-2013 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 promote_type //! \addtogroup promote_type
//! @{ //! @{
template<typename T1, typename T2> template<typename T1, typename T2>
struct is_promotable struct is_promotable
{ {
static const bool value = false; static const bool value = false;
typedef T1 result; typedef T1 result;
}; };
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 restrictors.hpp   restrictors.hpp 
// Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // Copyright (C) 2010-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 restrictors //! \addtogroup restrictors
//! @{ //! @{
// structures for template based restrictions of input/output arguments // structures for template based restrictions of input/output arguments
// (part of the SFINAE approach) // (part of the SFINAE approach)
// http://en.wikipedia.org/wiki/SFINAE // http://en.wikipedia.org/wiki/SFINAE
template<typename T> struct arma_scalar_only { }; template<typename T> struct arma_scalar_only { };
skipping to change at line 99 skipping to change at line 94
template<> struct arma_signed_only<s64> { typedef s64 result; }; template<> struct arma_signed_only<s64> { typedef s64 result; };
#endif #endif
template<> struct arma_signed_only<float> { typedef float result; }; template<> struct arma_signed_only<float> { typedef float result; };
template<> struct arma_signed_only<double> { typedef double result; }; template<> struct arma_signed_only<double> { typedef double result; };
#if defined(ARMA_ALLOW_LONG) #if defined(ARMA_ALLOW_LONG)
template<> struct arma_signed_only<slng_t> { typedef slng_t result; }; template<> struct arma_signed_only<slng_t> { typedef slng_t result; };
#endif #endif
template<typename T> struct arma_signed_only< std::complex<T> > { typedef s td::complex<T> result; }; template<typename T> struct arma_signed_only< std::complex<T> > { typedef s td::complex<T> result; };
template<typename T> struct arma_float_only { }; template<typename T> struct arma_real_only { };
template<> struct arma_float_only<float> { typedef float result; }; template<> struct arma_real_only<float> { typedef float result; };
template<> struct arma_float_only<double> { typedef double result; }; template<> struct arma_real_only<double> { typedef double result; };
template<typename T> struct arma_float_or_cx_only { }; template<typename T> struct arma_real_or_cx_only { };
template<> struct arma_float_or_cx_only< float > { typedef f template<> struct arma_real_or_cx_only< float > { typedef fl
loat result; }; oat result; };
template<> struct arma_float_or_cx_only< double > { typedef d template<> struct arma_real_or_cx_only< double > { typedef do
ouble result; }; uble result; };
template<> struct arma_float_or_cx_only< std::complex<float> > { typedef s template<> struct arma_real_or_cx_only< std::complex<float> > { typedef st
td::complex<float> result; }; d::complex<float> result; };
template<> struct arma_float_or_cx_only< std::complex<double> > { typedef s template<> struct arma_real_or_cx_only< std::complex<double> > { typedef st
td::complex<double> result; }; d::complex<double> result; };
template<typename T> struct arma_cx_only { }; template<typename T> struct arma_cx_only { };
template<> struct arma_cx_only< std::complex<float> > { typedef std::compl ex<float> result; }; template<> struct arma_cx_only< std::complex<float> > { typedef std::compl ex<float> result; };
template<> struct arma_cx_only< std::complex<double> > { typedef std::compl ex<double> result; }; template<> struct arma_cx_only< std::complex<double> > { typedef std::compl ex<double> result; };
template<typename T> struct arma_not_cx { typedef T resu lt; }; template<typename T> struct arma_not_cx { typedef T resu lt; };
template<typename T> struct arma_not_cx< std::complex<T> > { }; template<typename T> struct arma_not_cx< std::complex<T> > { };
template<typename T> struct arma_blas_type_only { }; template<typename T> struct arma_blas_type_only { };
 End of changes. 5 change blocks. 
20 lines changed or deleted 15 lines changed or added


 running_stat_bones.hpp   running_stat_bones.hpp 
// Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // Copyright (C) 2009-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 running_stat //! \addtogroup running_stat
//! @{ //! @{
template<typename eT> template<typename eT>
class arma_counter class arma_counter
{ {
public: public:
inline ~arma_counter(); inline ~arma_counter();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 running_stat_meat.hpp   running_stat_meat.hpp 
// Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // Copyright (C) 2009-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 running_stat //! \addtogroup running_stat
//! @{ //! @{
template<typename eT> template<typename eT>
inline inline
arma_counter<eT>::~arma_counter() arma_counter<eT>::~arma_counter()
{ {
arma_extra_debug_sigprint_this(this); arma_extra_debug_sigprint_this(this);
} }
skipping to change at line 335 skipping to change at line 330
} }
//! alter statistics to reflect new sample (version for complex numbers) //! alter statistics to reflect new sample (version for complex numbers)
template<typename T> template<typename T>
inline inline
void void
running_stat_aux::update_stats(running_stat< std::complex<T> >& x, const st d::complex<T>& sample) running_stat_aux::update_stats(running_stat< std::complex<T> >& x, const st d::complex<T>& sample)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<T> eT;
const T sample_norm = std::norm(sample); const T sample_norm = std::norm(sample);
const T N = x.counter.value(); const T N = x.counter.value();
if(N > T(0)) if(N > T(0))
{ {
if(sample_norm < x.min_val_norm) if(sample_norm < x.min_val_norm)
{ {
x.min_val_norm = sample_norm; x.min_val_norm = sample_norm;
x.min_val = sample; x.min_val = sample;
} }
 End of changes. 2 change blocks. 
10 lines changed or deleted 3 lines changed or added


 running_stat_vec_bones.hpp   running_stat_vec_bones.hpp 
// Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // Copyright (C) 2009-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 running_stat_vec //! \addtogroup running_stat_vec
//! @{ //! @{
//! Class for keeping statistics of a continuously sampled process / signal . //! Class for keeping statistics of a continuously sampled process / signal .
//! Useful if the storage of individual samples is not necessary or desired . //! Useful if the storage of individual samples is not necessary or desired .
//! Also useful if the number of samples is not known beforehand or exceeds //! Also useful if the number of samples is not known beforehand or exceeds
//! available memory. //! available memory.
template<typename eT> template<typename eT>
class running_stat_vec class running_stat_vec
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 running_stat_vec_meat.hpp   running_stat_vec_meat.hpp 
// Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // Copyright (C) 2009-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 running_stat_vec //! \addtogroup running_stat_vec
//! @{ //! @{
template<typename eT> template<typename eT>
running_stat_vec<eT>::~running_stat_vec() running_stat_vec<eT>::~running_stat_vec()
{ {
arma_extra_debug_sigprint_this(this); arma_extra_debug_sigprint_this(this);
} }
skipping to change at line 318 skipping to change at line 313
typedef typename running_stat_vec<eT>::T T; typedef typename running_stat_vec<eT>::T T;
const T N = x.counter.value(); const T N = x.counter.value();
if(N > T(0)) if(N > T(0))
{ {
arma_debug_assert_same_size(x.r_mean, sample, "running_stat_vec(): dime nsionality mismatch"); arma_debug_assert_same_size(x.r_mean, sample, "running_stat_vec(): dime nsionality mismatch");
const uword n_elem = sample.n_elem; const uword n_elem = sample.n_elem;
const eT* sample_mem = sample.memptr(); const eT* sample_mem = sample.memptr();
eT* r_mean_mem = x.r_mean.memptr(); eT* r_mean_mem = x.r_mean.memptr();
T* r_var_mem = x.r_var.memptr(); T* r_var_mem = x.r_var.memptr();
eT* min_val_mem = x.min_val.memptr(); eT* min_val_mem = x.min_val.memptr();
eT* max_val_mem = x.max_val.memptr(); eT* max_val_mem = x.max_val.memptr();
const T N_plus_1 = x.counter.value_plus_1(); const T N_plus_1 = x.counter.value_plus_1();
const T N_minus_1 = x.counter.value_minus_1(); const T N_minus_1 = x.counter.value_minus_1();
if(x.calc_cov == true) if(x.calc_cov == true)
{ {
Mat<eT>& tmp1 = x.tmp1; Mat<eT>& tmp1 = x.tmp1;
Mat<eT>& tmp2 = x.tmp2; Mat<eT>& tmp2 = x.tmp2;
tmp1 = sample - x.r_mean; tmp1 = sample - x.r_mean;
skipping to change at line 386 skipping to change at line 381
if(x.calc_cov == true) if(x.calc_cov == true)
{ {
x.r_cov.zeros(sample.n_elem, sample.n_elem); x.r_cov.zeros(sample.n_elem, sample.n_elem);
} }
x.min_val.set_size(sample.n_rows, sample.n_cols); x.min_val.set_size(sample.n_rows, sample.n_cols);
x.max_val.set_size(sample.n_rows, sample.n_cols); x.max_val.set_size(sample.n_rows, sample.n_cols);
const uword n_elem = sample.n_elem; const uword n_elem = sample.n_elem;
const eT* sample_mem = sample.memptr(); const eT* sample_mem = sample.memptr();
eT* r_mean_mem = x.r_mean.memptr(); eT* r_mean_mem = x.r_mean.memptr();
eT* min_val_mem = x.min_val.memptr(); eT* min_val_mem = x.min_val.memptr();
eT* max_val_mem = x.max_val.memptr(); eT* max_val_mem = x.max_val.memptr();
for(uword i=0; i<n_elem; ++i) for(uword i=0; i<n_elem; ++i)
{ {
const eT val = sample_mem[i]; const eT val = sample_mem[i];
r_mean_mem[i] = val; r_mean_mem[i] = val;
min_val_mem[i] = val; min_val_mem[i] = val;
max_val_mem[i] = val; max_val_mem[i] = val;
} }
} }
skipping to change at line 434 skipping to change at line 429
typedef typename std::complex<T> eT; typedef typename std::complex<T> eT;
const T N = x.counter.value(); const T N = x.counter.value();
if(N > T(0)) if(N > T(0))
{ {
arma_debug_assert_same_size(x.r_mean, sample, "running_stat_vec(): dime nsionality mismatch"); arma_debug_assert_same_size(x.r_mean, sample, "running_stat_vec(): dime nsionality mismatch");
const uword n_elem = sample.n_elem; const uword n_elem = sample.n_elem;
const eT* sample_mem = sample.memptr(); const eT* sample_mem = sample.memptr();
eT* r_mean_mem = x.r_mean.memptr(); eT* r_mean_mem = x.r_mean.memptr();
T* r_var_mem = x.r_var.memptr(); T* r_var_mem = x.r_var.memptr();
eT* min_val_mem = x.min_val.memptr(); eT* min_val_mem = x.min_val.memptr();
eT* max_val_mem = x.max_val.memptr(); eT* max_val_mem = x.max_val.memptr();
T* min_val_norm_mem = x.min_val_norm.memptr(); T* min_val_norm_mem = x.min_val_norm.memptr();
T* max_val_norm_mem = x.max_val_norm.memptr(); T* max_val_norm_mem = x.max_val_norm.memptr();
const T N_plus_1 = x.counter.value_plus_1(); const T N_plus_1 = x.counter.value_plus_1();
const T N_minus_1 = x.counter.value_minus_1(); const T N_minus_1 = x.counter.value_minus_1();
if(x.calc_cov == true) if(x.calc_cov == true)
{ {
Mat<eT>& tmp1 = x.tmp1; Mat<eT>& tmp1 = x.tmp1;
Mat<eT>& tmp2 = x.tmp2; Mat<eT>& tmp2 = x.tmp2;
tmp1 = sample - x.r_mean; tmp1 = sample - x.r_mean;
skipping to change at line 510 skipping to change at line 505
x.r_cov.zeros(sample.n_elem, sample.n_elem); x.r_cov.zeros(sample.n_elem, sample.n_elem);
} }
x.min_val.set_size(sample.n_rows, sample.n_cols); x.min_val.set_size(sample.n_rows, sample.n_cols);
x.max_val.set_size(sample.n_rows, sample.n_cols); x.max_val.set_size(sample.n_rows, sample.n_cols);
x.min_val_norm.set_size(sample.n_rows, sample.n_cols); x.min_val_norm.set_size(sample.n_rows, sample.n_cols);
x.max_val_norm.set_size(sample.n_rows, sample.n_cols); x.max_val_norm.set_size(sample.n_rows, sample.n_cols);
const uword n_elem = sample.n_elem; const uword n_elem = sample.n_elem;
const eT* sample_mem = sample.memptr(); const eT* sample_mem = sample.memptr();
eT* r_mean_mem = x.r_mean.memptr(); eT* r_mean_mem = x.r_mean.memptr();
eT* min_val_mem = x.min_val.memptr(); eT* min_val_mem = x.min_val.memptr();
eT* max_val_mem = x.max_val.memptr(); eT* max_val_mem = x.max_val.memptr();
T* min_val_norm_mem = x.min_val_norm.memptr(); T* min_val_norm_mem = x.min_val_norm.memptr();
T* max_val_norm_mem = x.max_val_norm.memptr(); T* max_val_norm_mem = x.max_val_norm.memptr();
for(uword i=0; i<n_elem; ++i) for(uword i=0; i<n_elem; ++i)
{ {
const eT& val = sample_mem[i]; const eT& val = sample_mem[i];
const T val_norm = std::norm(val); const T val_norm = std::norm(val);
r_mean_mem[i] = val; r_mean_mem[i] = val;
min_val_mem[i] = val; min_val_mem[i] = val;
max_val_mem[i] = val; max_val_mem[i] = val;
 End of changes. 5 change blocks. 
30 lines changed or deleted 25 lines changed or added


 span.hpp   span.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// Copyright (C) 2011 Stanislav Funiak // Copyright (C) 2011 Stanislav Funiak
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 //! \addtogroup span
//! @{ //! @{
struct span_alt {}; struct span_alt {};
template<typename Dummy = int> template<typename Dummy = int>
class span_base class span_base
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spglue_minus_bones.hpp   spglue_minus_bones.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spglue_minus //! \addtogroup spglue_minus
//! @{ //! @{
class spglue_minus class spglue_minus
{ {
public: public:
template<typename T1, typename T2> template<typename T1, typename T2>
arma_hot inline static void apply(SpMat<typename T1::elem_type>& out, con st SpGlue<T1,T2,spglue_minus>& X); arma_hot inline static void apply(SpMat<typename T1::elem_type>& out, con st SpGlue<T1,T2,spglue_minus>& X);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spglue_minus_meat.hpp   spglue_minus_meat.hpp 
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spglue_minus //! \addtogroup spglue_minus
//! @{ //! @{
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
void void
spglue_minus::apply(SpMat<typename T1::elem_type>& out, const SpGlue<T1,T2, spglue_minus>& X) spglue_minus::apply(SpMat<typename T1::elem_type>& out, const SpGlue<T1,T2, spglue_minus>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spglue_plus_bones.hpp   spglue_plus_bones.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spglue_plus //! \addtogroup spglue_plus
//! @{ //! @{
class spglue_plus class spglue_plus
{ {
public: public:
template<typename T1, typename T2> template<typename T1, typename T2>
arma_hot inline static void apply(SpMat<typename T1::elem_type>& out, con st SpGlue<T1,T2,spglue_plus>& X); arma_hot inline static void apply(SpMat<typename T1::elem_type>& out, con st SpGlue<T1,T2,spglue_plus>& X);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spglue_plus_meat.hpp   spglue_plus_meat.hpp 
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spglue_plus //! \addtogroup spglue_plus
//! @{ //! @{
template<typename T1, typename T2> template<typename T1, typename T2>
arma_hot arma_hot
inline inline
void void
spglue_plus::apply(SpMat<typename T1::elem_type>& out, const SpGlue<T1,T2,s pglue_plus>& X) spglue_plus::apply(SpMat<typename T1::elem_type>& out, const SpGlue<T1,T2,s pglue_plus>& X)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spglue_times_bones.hpp   spglue_times_bones.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spglue_times //! \addtogroup spglue_times
//! @{ //! @{
class spglue_times class spglue_times
{ {
public: public:
template<typename T1, typename T2> template<typename T1, typename T2>
inline static void apply(SpMat<typename T1::elem_type>& out, const SpGlue <T1,T2,spglue_times>& X); inline static void apply(SpMat<typename T1::elem_type>& out, const SpGlue <T1,T2,spglue_times>& X);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spglue_times_meat.hpp   spglue_times_meat.hpp 
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spglue_times //! \addtogroup spglue_times
//! @{ //! @{
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
void void
spglue_times::apply(SpMat<typename T1::elem_type>& out, const SpGlue<T1,T2, spglue_times>& X) spglue_times::apply(SpMat<typename T1::elem_type>& out, const SpGlue<T1,T2, spglue_times>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spop_htrans_bones.hpp   spop_htrans_bones.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spop_htrans //! \addtogroup spop_htrans
//! @{ //! @{
//! 'hermitian transpose' operation //! 'hermitian transpose' operation
class spop_htrans class spop_htrans
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spop_htrans_meat.hpp   spop_htrans_meat.hpp 
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spop_htrans //! \addtogroup spop_htrans
//! @{ //! @{
template<typename T1> template<typename T1>
arma_hot arma_hot
inline inline
void void
spop_htrans::apply(SpMat<typename T1::elem_type>& out, const SpOp<T1,spop_h trans>& in, const typename arma_not_cx<typename T1::elem_type>::result* jun k) spop_htrans::apply(SpMat<typename T1::elem_type>& out, const SpOp<T1,spop_h trans>& in, const typename arma_not_cx<typename T1::elem_type>::result* jun k)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spop_max_bones.hpp   spop_max_bones.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spop_max //! \addtogroup spop_max
//! @{ //! @{
class spop_max class spop_max
{ {
public: public:
template<typename T1> template<typename T1>
inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T 1, spop_max>& in); inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T 1, spop_max>& in);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spop_max_meat.hpp   spop_max_meat.hpp 
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spop_max //! \addtogroup spop_max
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
void void
spop_max::apply(SpMat<typename T1::elem_type>& out, const SpOp<T1,spop_max> & in) spop_max::apply(SpMat<typename T1::elem_type>& out, const SpOp<T1,spop_max> & in)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spop_mean_bones.hpp   spop_mean_bones.hpp 
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spop_mean //! \addtogroup spop_mean
//! @{ //! @{
//! Class for finding mean values of a sparse matrix //! Class for finding mean values of a sparse matrix
class spop_mean class spop_mean
{ {
public: public:
// Apply mean into an output sparse matrix (or vector). // Apply mean into an output sparse matrix (or vector).
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spop_mean_meat.hpp   spop_mean_meat.hpp 
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spop_mean //! \addtogroup spop_mean
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
void void
spop_mean::apply(SpMat<typename T1::elem_type>& out, const SpOp<T1, spop_me an>& in) spop_mean::apply(SpMat<typename T1::elem_type>& out, const SpOp<T1, spop_me an>& in)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spop_min_bones.hpp   spop_min_bones.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spop_min //! \addtogroup spop_min
//! @{ //! @{
class spop_min class spop_min
{ {
public: public:
template<typename T1> template<typename T1>
inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T 1, spop_min>& in); inline static void apply(SpMat<typename T1::elem_type>& out, const SpOp<T 1, spop_min>& in);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spop_min_meat.hpp   spop_min_meat.hpp 
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spop_min //! \addtogroup spop_min
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
void void
spop_min::apply(SpMat<typename T1::elem_type>& out, const SpOp<T1,spop_min> & in) spop_min::apply(SpMat<typename T1::elem_type>& out, const SpOp<T1,spop_min> & in)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spop_misc_bones.hpp   spop_misc_bones.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spop_misc //! \addtogroup spop_misc
//! @{ //! @{
class spop_scalar_times class spop_scalar_times
{ {
public: public:
template<typename T1> template<typename T1>
arma_hot inline static void apply(SpMat<typename T1::elem_type>& out, con st SpOp<T1, spop_scalar_times>& in); arma_hot inline static void apply(SpMat<typename T1::elem_type>& out, con st SpOp<T1, spop_scalar_times>& in);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spop_misc_meat.hpp   spop_misc_meat.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spop_misc //! \addtogroup spop_misc
//! @{ //! @{
namespace priv namespace priv
{ {
template<typename eT> template<typename eT>
struct functor_scalar_times struct functor_scalar_times
{ {
const eT k; const eT k;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spop_strans_bones.hpp   spop_strans_bones.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spop_strans //! \addtogroup spop_strans
//! @{ //! @{
//! 'matrix transpose' operation //! 'matrix transpose' operation
class spop_strans class spop_strans
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spop_strans_meat.hpp   spop_strans_meat.hpp 
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spop_strans //! \addtogroup spop_strans
//! @{ //! @{
template<typename T1> template<typename T1>
arma_hot arma_hot
inline inline
void void
spop_strans::apply_proxy(SpMat<typename T1::elem_type>& out, const T1& X) spop_strans::apply_proxy(SpMat<typename T1::elem_type>& out, const T1& X)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spop_sum_bones.hpp   spop_sum_bones.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spop_sum //! \addtogroup spop_sum
//! @{ //! @{
class spop_sum class spop_sum
{ {
public: public:
template<typename T1> template<typename T1>
arma_hot inline static void apply(SpMat<typename T1::elem_type>& out, con st SpOp<T1, spop_sum>& in); arma_hot inline static void apply(SpMat<typename T1::elem_type>& out, con st SpOp<T1, spop_sum>& in);
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spop_sum_meat.hpp   spop_sum_meat.hpp 
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spop_sum //! \addtogroup spop_sum
//! @{ //! @{
template<typename T1> template<typename T1>
arma_hot arma_hot
inline inline
void void
spop_sum::apply(SpMat<typename T1::elem_type>& out, const SpOp<T1,spop_sum> & in) spop_sum::apply(SpMat<typename T1::elem_type>& out, const SpOp<T1,spop_sum> & in)
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spop_var_bones.hpp   spop_var_bones.hpp 
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spop_var //! \addtogroup spop_var
//! @{ //! @{
//! Class for finding variance values of a sparse matrix //! Class for finding variance values of a sparse matrix
class spop_var class spop_var
{ {
public: public:
template<typename T1> template<typename T1>
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 spop_var_meat.hpp   spop_var_meat.hpp 
// Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Ryan Curtin
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 spop_var //! \addtogroup spop_var
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
void void
spop_var::apply(SpMat<typename T1::pod_type>& out, const mtSpOp<typename T1 ::pod_type, T1, spop_var>& in) spop_var::apply(SpMat<typename T1::pod_type>& out, const mtSpOp<typename T1 ::pod_type, T1, spop_var>& in)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type in_eT; //typedef typename T1::elem_type in_eT;
typedef typename T1::pod_type out_eT; typedef typename T1::pod_type out_eT;
const uword norm_type = in.aux_uword_a; const uword norm_type = in.aux_uword_a;
const uword dim = in.aux_uword_b; const uword dim = in.aux_uword_b;
arma_debug_check((norm_type > 1), "var(): incorrect usage. norm_type must be 0 or 1"); arma_debug_check((norm_type > 1), "var(): incorrect usage. norm_type must be 0 or 1");
arma_debug_check((dim > 1), "var(): incorrect usage. dim must be 0 or 1"); arma_debug_check((dim > 1), "var(): incorrect usage. dim must be 0 or 1");
SpProxy<T1> p(in.m); SpProxy<T1> p(in.m);
skipping to change at line 62 skipping to change at line 57
( (
SpMat<typename T1::pod_type>& out_ref, SpMat<typename T1::pod_type>& out_ref,
const SpProxy<T1>& p, const SpProxy<T1>& p,
const uword norm_type, const uword norm_type,
const uword dim const uword dim
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type in_eT; typedef typename T1::elem_type in_eT;
typedef typename T1::pod_type out_eT; //typedef typename T1::pod_type out_eT;
const uword p_n_rows = p.get_n_rows(); const uword p_n_rows = p.get_n_rows();
const uword p_n_cols = p.get_n_cols(); const uword p_n_cols = p.get_n_cols();
if(dim == 0) if(dim == 0)
{ {
arma_extra_debug_print("spop_var::apply(), dim = 0"); arma_extra_debug_print("spop_var::apply(), dim = 0");
arma_debug_check((p_n_rows == 0), "var(): given object has zero rows"); arma_debug_check((p_n_rows == 0), "var(): given object has zero rows");
 End of changes. 3 change blocks. 
10 lines changed or deleted 5 lines changed or added


 strip.hpp   strip.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 strip //! \addtogroup strip
//! @{ //! @{
template<typename T1> template<typename T1>
struct strip_diagmat struct strip_diagmat
{ {
typedef T1 stored_type; typedef T1 stored_type;
arma_hot inline arma_hot inline
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 subview_bones.hpp   subview_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// Copyright (C) 2011 James Sanders // Copyright (C) 2011 James Sanders
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 subview //! \addtogroup subview
//! @{ //! @{
//! Class for storing data required to construct or apply operations to a s ubmatrix //! Class for storing data required to construct or apply operations to a s ubmatrix
//! (i.e. where the submatrix starts and ends as well as a reference/pointe r to the original matrix), //! (i.e. where the submatrix starts and ends as well as a reference/pointe r to the original matrix),
template<typename eT> template<typename eT>
class subview : public Base<eT, subview<eT> > class subview : public Base<eT, subview<eT> >
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 subview_cube_bones.hpp   subview_cube_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 subview_cube //! \addtogroup subview_cube
//! @{ //! @{
//! Class for storing data required to construct or apply operations to a s ubcube //! Class for storing data required to construct or apply operations to a s ubcube
//! (i.e. where the subcube starts and ends as well as a reference/pointer to the original cube), //! (i.e. where the subcube starts and ends as well as a reference/pointer to the original cube),
template<typename eT> template<typename eT>
class subview_cube : public BaseCube<eT, subview_cube<eT> > class subview_cube : public BaseCube<eT, subview_cube<eT> >
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 subview_cube_meat.hpp   subview_cube_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 subview_cube //! \addtogroup subview_cube
//! @{ //! @{
template<typename eT> template<typename eT>
inline inline
subview_cube<eT>::~subview_cube() subview_cube<eT>::~subview_cube()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 subview_each_bones.hpp   subview_each_bones.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 subview_each //! \addtogroup subview_each
//! @{ //! @{
template<typename parent, unsigned int mode> template<typename parent, unsigned int mode>
class subview_each_common class subview_each_common
{ {
public: public:
typedef typename parent::elem_type eT; typedef typename parent::elem_type eT;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 subview_each_meat.hpp   subview_each_meat.hpp 
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 subview_each //! \addtogroup subview_each
//! @{ //! @{
// //
// //
// subview_each_common // subview_each_common
template<typename parent, unsigned int mode> template<typename parent, unsigned int mode>
inline inline
skipping to change at line 316 skipping to change at line 311
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
template<typename parent, unsigned int mode, typename TB> template<typename parent, unsigned int mode, typename TB>
inline inline
void void
subview_each2<parent,mode,TB>::check_indices(const Mat<uword>& indices) con st subview_each2<parent,mode,TB>::check_indices(const Mat<uword>& indices) con st
{ {
if(mode == 0) if(mode == 0)
{ {
arma_debug_check( (indices.is_vec() == false), "each_col(): list of ind ices must be a vector" ); arma_debug_check( ((indices.is_vec() == false) && (indices.is_empty() = = false)), "each_col(): list of indices must be a vector" );
} }
else else
{ {
arma_debug_check( (indices.is_vec() == false), "each_row(): list of ind ices must be a vector" ); arma_debug_check( ((indices.is_vec() == false) && (indices.is_empty() = = false)), "each_row(): list of indices must be a vector" );
} }
} }
template<typename parent, unsigned int mode, typename TB> template<typename parent, unsigned int mode, typename TB>
template<typename T1> template<typename T1>
inline inline
void void
subview_each2<parent,mode,TB>::operator= (const Base<eT,T1>& in) subview_each2<parent,mode,TB>::operator= (const Base<eT,T1>& in)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 3 change blocks. 
10 lines changed or deleted 5 lines changed or added


 subview_elem1_bones.hpp   subview_elem1_bones.hpp 
// Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 subview_elem1 //! \addtogroup subview_elem1
//! @{ //! @{
template<typename eT, typename T1> template<typename eT, typename T1>
class subview_elem1 : public Base<eT, subview_elem1<eT,T1> > class subview_elem1 : public Base<eT, subview_elem1<eT,T1> >
{ {
public: public:
typedef eT elem_type; typedef eT elem_type;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 subview_elem1_meat.hpp   subview_elem1_meat.hpp 
// Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // Copyright (C) 2010-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 subview_elem1 //! \addtogroup subview_elem1
//! @{ //! @{
template<typename eT, typename T1> template<typename eT, typename T1>
inline inline
subview_elem1<eT,T1>::~subview_elem1() subview_elem1<eT,T1>::~subview_elem1()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 subview_elem2_bones.hpp   subview_elem2_bones.hpp 
// Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 subview_elem2 //! \addtogroup subview_elem2
//! @{ //! @{
template<typename eT, typename T1, typename T2> template<typename eT, typename T1, typename T2>
class subview_elem2 : public Base<eT, subview_elem2<eT,T1,T2> > class subview_elem2 : public Base<eT, subview_elem2<eT,T1,T2> >
{ {
public: public:
typedef eT elem_type; typedef eT elem_type;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 subview_elem2_meat.hpp   subview_elem2_meat.hpp 
// Copyright (C) 2012-2013 NICTA (www.nicta.com.au) // Copyright (C) 2012-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2012-2013 Conrad Sanderson // Copyright (C) 2012-2013 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 subview_elem2 //! \addtogroup subview_elem2
//! @{ //! @{
template<typename eT, typename T1, typename T2> template<typename eT, typename T1, typename T2>
inline inline
subview_elem2<eT,T1,T2>::~subview_elem2() subview_elem2<eT,T1,T2>::~subview_elem2()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 subview_field_bones.hpp   subview_field_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 subview_field //! \addtogroup subview_field
//! @{ //! @{
//! Class for storing data required to construct or apply operations to a s ubfield //! Class for storing data required to construct or apply operations to a s ubfield
//! (i.e. where the subfield starts and ends as well as a reference/pointer to the original field), //! (i.e. where the subfield starts and ends as well as a reference/pointer to the original field),
template<typename oT> template<typename oT>
class subview_field class subview_field
{ {
public: public:
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 subview_field_meat.hpp   subview_field_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 subview_field //! \addtogroup subview_field
//! @{ //! @{
template<typename oT> template<typename oT>
inline inline
subview_field<oT>::~subview_field() subview_field<oT>::~subview_field()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 subview_meat.hpp   subview_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// Copyright (C) 2011 James Sanders // Copyright (C) 2011 James Sanders
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 subview //! \addtogroup subview
//! @{ //! @{
template<typename eT> template<typename eT>
inline inline
subview<eT>::~subview() subview<eT>::~subview()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 traits.hpp   traits.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 traits //! \addtogroup traits
//! @{ //! @{
template<typename T1> template<typename T1>
struct get_pod_type struct get_pod_type
{ typedef T1 result; }; { typedef T1 result; };
template<typename T2> template<typename T2>
struct get_pod_type< std::complex<T2> > struct get_pod_type< std::complex<T2> >
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 typedef.hpp   typedef.hpp 
// Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // Copyright (C) 2008-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 typedef //! \addtogroup typedef
//! @{ //! @{
#if UCHAR_MAX >= 0xff #if UCHAR_MAX >= 0xff
typedef unsigned char u8; typedef unsigned char u8;
typedef char s8; typedef char s8;
#elif defined(UINT8_MAX) #elif defined(UINT8_MAX)
typedef uint8_t u8; typedef uint8_t u8;
typedef int8_t s8; typedef int8_t s8;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 typedef_blas_int.hpp   typedef_blas_int.hpp 
// Copyright (C) 2011 NICTA (www.nicta.com.au) // Copyright (C) 2011 NICTA (www.nicta.com.au)
// Copyright (C) 2011 Conrad Sanderson // Copyright (C) 2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 typedef //! \addtogroup typedef
//! @{ //! @{
#if defined(ARMA_BLAS_LONG_LONG) #if defined(ARMA_BLAS_LONG_LONG)
typedef long long blas_int; typedef long long blas_int;
#elif defined(ARMA_BLAS_LONG) #elif defined(ARMA_BLAS_LONG)
typedef long blas_int; typedef long blas_int;
#else #else
typedef int blas_int; typedef int blas_int;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 typedef_fixed.hpp   typedef_fixed.hpp 
// Copyright (C) 2010 NICTA (www.nicta.com.au) // Copyright (C) 2010 NICTA (www.nicta.com.au)
// Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 typedef_fixed //! \addtogroup typedef_fixed
//! @{ //! @{
typedef umat::fixed<2,2> umat22; typedef umat::fixed<2,2> umat22;
typedef umat::fixed<3,3> umat33; typedef umat::fixed<3,3> umat33;
typedef umat::fixed<4,4> umat44; typedef umat::fixed<4,4> umat44;
typedef umat::fixed<5,5> umat55; typedef umat::fixed<5,5> umat55;
typedef umat::fixed<6,6> umat66; typedef umat::fixed<6,6> umat66;
typedef umat::fixed<7,7> umat77; typedef umat::fixed<7,7> umat77;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 undefine_conflicts.hpp   undefine_conflicts.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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)
#if defined(log2) #if defined(log2)
#undef log2 #undef log2
#if defined(__GNUG__) #if defined(__GNUG__)
#warning "detected 'log2' macro and undefined it" #warning "detected 'log2' macro and undefined it"
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
#pragma message ("detected 'log2' macro and undefined it") #pragma message ("detected 'log2' macro and undefined it")
#endif #endif
#endif #endif
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 unwrap.hpp   unwrap.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2013 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2013 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 unwrap //! \addtogroup unwrap
//! @{ //! @{
template<typename T1> template<typename T1>
struct unwrap_default struct unwrap_default
{ {
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
inline inline
skipping to change at line 1167 skipping to change at line 1162
inline eT get_val() const { return val; } inline eT get_val() const { return val; }
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = true; static const bool do_times = true;
const eT val; const eT val;
const Mat<eT>& M; const Mat<eT>& M;
}; };
template<typename T1>
struct partial_unwrap_neg_default
{
typedef typename T1::elem_type eT;
inline
partial_unwrap_neg_default(const eOp<T1, eop_neg>& A)
: M(A.P.Q)
{
arma_extra_debug_sigprint();
}
arma_hot arma_inline eT get_val() const { return eT(-1); }
static const bool do_trans = false;
static const bool do_times = true;
const Mat<eT> M;
};
template<typename T1>
struct partial_unwrap_neg_fixed
{
typedef typename T1::elem_type eT;
inline explicit
partial_unwrap_neg_fixed(const eOp<T1, eop_neg>& A)
: M(A.P.Q)
{
arma_extra_debug_sigprint();
}
arma_hot arma_inline eT get_val() const { return eT(-1); }
static const bool do_trans = false;
static const bool do_times = true;
const Mat<eT>& M;
};
template<typename T1, bool condition>
struct partial_unwrap_neg_redirect {};
template<typename T1>
struct partial_unwrap_neg_redirect<T1, false> { typedef partial_unwrap_neg_
default<T1> result; };
template<typename T1>
struct partial_unwrap_neg_redirect<T1, true> { typedef partial_unwrap_neg_
fixed<T1> result; };
template<typename T1>
struct partial_unwrap< eOp<T1, eop_neg> > : public partial_unwrap_neg_redir
ect<T1, is_Mat_fixed<T1>::value >::result
{
typedef typename T1::elem_type eT;
inline
partial_unwrap(const eOp<T1, eop_neg>& A)
: partial_unwrap_neg_redirect< T1, is_Mat_fixed<T1>::value >::result(A)
{
}
};
template<typename eT>
struct partial_unwrap< eOp<Mat<eT>, eop_neg> >
{
inline
partial_unwrap(const eOp<Mat<eT>,eop_neg>& A)
: M(A.P.Q)
{
arma_extra_debug_sigprint();
}
inline eT get_val() const { return eT(-1); }
static const bool do_trans = false;
static const bool do_times = true;
const Mat<eT>& M;
};
template<typename eT>
struct partial_unwrap< eOp<Row<eT>, eop_neg> >
{
inline
partial_unwrap(const eOp<Row<eT>,eop_neg>& A)
: M(A.P.Q)
{
arma_extra_debug_sigprint();
}
inline eT get_val() const { return eT(-1); }
static const bool do_trans = false;
static const bool do_times = true;
const Mat<eT>& M;
};
template<typename eT>
struct partial_unwrap< eOp<Col<eT>, eop_neg> >
{
inline
partial_unwrap(const eOp<Col<eT>,eop_neg>& A)
: M(A.P.Q)
{
arma_extra_debug_sigprint();
}
inline eT get_val() const { return eT(-1); }
static const bool do_trans = false;
static const bool do_times = true;
const Mat<eT>& M;
};
// //
template<typename T1> template<typename T1>
struct partial_unwrap_check_default struct partial_unwrap_check_default
{ {
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
inline inline
partial_unwrap_check_default(const T1& A, const Mat<eT>&) partial_unwrap_check_default(const T1& A, const Mat<eT>&)
: M(A) : M(A)
skipping to change at line 1914 skipping to change at line 2024
static const bool do_trans = false; static const bool do_trans = false;
static const bool do_times = true; static const bool do_times = true;
const eT val; const eT val;
const Mat<eT> M; const Mat<eT> M;
//// prevents the compiler from potentially deleting the subview object b efore we're done with it //// prevents the compiler from potentially deleting the subview object b efore we're done with it
//const eOp<subview_col<eT>,eop_scalar_times>& ref; //const eOp<subview_col<eT>,eop_scalar_times>& ref;
}; };
template<typename T1>
struct partial_unwrap_check_neg_default
{
typedef typename T1::elem_type eT;
inline
partial_unwrap_check_neg_default(const eOp<T1, eop_neg>& A, const Mat<eT>
&)
: M(A.P.Q)
{
arma_extra_debug_sigprint();
}
arma_hot arma_inline eT get_val() const { return eT(-1); }
static const bool do_trans = false;
static const bool do_times = true;
const Mat<eT> M;
};
template<typename T1>
struct partial_unwrap_check_neg_fixed
{
typedef typename T1::elem_type eT;
inline explicit
partial_unwrap_check_neg_fixed(const eOp<T1, eop_neg>& A, const Mat<eT>&
B)
: M_local( (&(A.P.Q) == &B) ? new Mat<eT>(A.P.Q) : 0 )
, M ( (&(A.P.Q) == &B) ? (*M_local) : A.P.Q )
{
arma_extra_debug_sigprint();
}
inline
~partial_unwrap_check_neg_fixed()
{
arma_extra_debug_sigprint();
if(M_local) { delete M_local; }
}
arma_hot arma_inline eT get_val() const { return eT(-1); }
static const bool do_trans = false;
static const bool do_times = true;
const Mat<eT>* M_local;
const Mat<eT>& M;
};
template<typename T1, bool condition>
struct partial_unwrap_check_neg_redirect {};
template<typename T1>
struct partial_unwrap_check_neg_redirect<T1, false> { typedef partial_unwra
p_check_neg_default<T1> result; };
template<typename T1>
struct partial_unwrap_check_neg_redirect<T1, true> { typedef partial_unwra
p_check_neg_fixed<T1> result; };
template<typename T1>
struct partial_unwrap_check< eOp<T1, eop_neg> > : public partial_unwrap_che
ck_neg_redirect<T1, is_Mat_fixed<T1>::value >::result
{
typedef typename T1::elem_type eT;
inline partial_unwrap_check(const eOp<T1, eop_neg>& A, const Mat<eT>& B)
: partial_unwrap_check_neg_redirect< T1, is_Mat_fixed<T1>::value >::res
ult(A, B)
{
}
};
template<typename eT>
struct partial_unwrap_check< eOp<Mat<eT>, eop_neg> >
{
arma_hot inline
partial_unwrap_check(const eOp<Mat<eT>,eop_neg>& A, const Mat<eT>& B)
: M_local( (&(A.P.Q) == &B) ? new Mat<eT>(A.P.Q) : 0 )
, M ( (&(A.P.Q) == &B) ? *M_local : A.P.Q )
{
arma_extra_debug_sigprint();
}
inline
~partial_unwrap_check()
{
arma_extra_debug_sigprint();
if(M_local) { delete M_local; }
}
arma_hot arma_inline eT get_val() const { return eT(-1); }
static const bool do_trans = false;
static const bool do_times = true;
const Mat<eT>* M_local;
const Mat<eT>& M;
};
template<typename eT>
struct partial_unwrap_check< eOp<Row<eT>, eop_neg> >
{
arma_hot inline
partial_unwrap_check(const eOp<Row<eT>,eop_neg>& A, const Mat<eT>& B)
: M_local( (&(A.P.Q) == &B) ? new Mat<eT>(A.P.Q) : 0 )
, M ( (&(A.P.Q) == &B) ? *M_local : A.P.Q )
{
arma_extra_debug_sigprint();
}
inline
~partial_unwrap_check()
{
arma_extra_debug_sigprint();
if(M_local) { delete M_local; }
}
arma_hot arma_inline eT get_val() const { return eT(-1); }
static const bool do_trans = false;
static const bool do_times = true;
const Mat<eT>* M_local;
const Mat<eT>& M;
};
template<typename eT>
struct partial_unwrap_check< eOp<Col<eT>, eop_neg> >
{
arma_hot inline
partial_unwrap_check(const eOp<Col<eT>,eop_neg>& A, const Mat<eT>& B)
: M_local( (&(A.P.Q) == &B) ? new Mat<eT>(A.P.Q) : 0 )
, M ( (&(A.P.Q) == &B) ? *M_local : A.P.Q )
{
arma_extra_debug_sigprint();
}
inline
~partial_unwrap_check()
{
arma_extra_debug_sigprint();
if(M_local) { delete M_local; }
}
arma_hot arma_inline eT get_val() const { return eT(-1); }
static const bool do_trans = false;
static const bool do_times = true;
const Mat<eT>* M_local;
const Mat<eT>& M;
};
// NOTE: we can get away with this shortcut as the partial_unwrap_check cla
ss is only used by the glue_times class,
// NOTE: which relies on partial_unwrap_check to check for aliasing
template<typename eT>
struct partial_unwrap_check< eOp<subview_col<eT>, eop_neg> >
{
arma_hot inline
partial_unwrap_check(const eOp<subview_col<eT>,eop_neg>& A, const Mat<eT>
& B)
: M ( const_cast<eT*>( A.P.Q.colptr(0) ), A.P.Q.n_rows, 1, (&(A.P.Q.m)
== &B), false )
{
arma_extra_debug_sigprint();
}
arma_hot arma_inline eT get_val() const { return eT(-1); }
static const bool do_trans = false;
static const bool do_times = true;
const Mat<eT> M;
};
//! @} //! @}
 End of changes. 4 change blocks. 
10 lines changed or deleted 306 lines changed or added


 unwrap_cube.hpp   unwrap_cube.hpp 
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 unwrap_cube //! \addtogroup unwrap_cube
//! @{ //! @{
template<typename T1> template<typename T1>
class unwrap_cube class unwrap_cube
{ {
public: public:
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 unwrap_spmat.hpp   unwrap_spmat.hpp 
// Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 NICTA (www.nicta.com.au)
// Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 unwrap_spmat //! \addtogroup unwrap_spmat
//! @{ //! @{
template<typename T1> template<typename T1>
struct unwrap_spmat struct unwrap_spmat
{ {
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
inline inline
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 upgrade_val.hpp   upgrade_val.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 upgrade_val //! \addtogroup upgrade_val
//! @{ //! @{
//! upgrade_val is used to ensure an operation such as multiplication is po ssible between two types. //! upgrade_val is used to ensure an operation such as multiplication is po ssible between two types.
//! values are upgraded only where necessary. //! values are upgraded only where necessary.
template<typename T1, typename T2> template<typename T1, typename T2>
struct upgrade_val struct upgrade_val
{ {
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 wall_clock_bones.hpp   wall_clock_bones.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 wall_clock //! \addtogroup wall_clock
//! @{ //! @{
//! Class for measuring time intervals //! Class for measuring time intervals
class wall_clock class wall_clock
{ {
public: public:
inline wall_clock(); inline wall_clock();
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 lines changed or added


 wall_clock_meat.hpp   wall_clock_meat.hpp 
// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This Source Code Form is subject to the terms of the Mozilla Public
// It is provided without any warranty of fitness // License, v. 2.0. If a copy of the MPL was not distributed with this
// for any purpose. You can redistribute this file // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// 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 wall_clock //! \addtogroup wall_clock
//! @{ //! @{
inline inline
wall_clock::wall_clock() wall_clock::wall_clock()
: valid(false) : valid(false)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
 End of changes. 1 change blocks. 
8 lines changed or deleted 3 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/