Base_bones.hpp   Base_bones.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This file is part of the Armadillo C++ library.
// It is provided without any warranty of fitness // It is provided without any warranty of fitness
// for any purpose. You can redistribute this file // for any purpose. You can redistribute this file
// and/or modify it under the terms of the GNU // and/or modify it under the terms of the GNU
// Lesser General Public License (LGPL) as published // Lesser General Public License (LGPL) as published
// by the Free Software Foundation, either version 3 // by the Free Software Foundation, either version 3
// of the License or (at your option) any later version. // of the License or (at your option) any later version.
// (see http://www.opensource.org/licenses for more info) // (see http://www.opensource.org/licenses for more info)
skipping to change at line 27 skipping to change at line 27
//! Used for type-safe downcasting in functions that restrict their input(s ) to be classes that are //! Used for type-safe downcasting in functions that restrict their input(s ) to be classes that are
//! derived from Base (e.g. Mat, Op, Glue, diagview, subview). //! derived from Base (e.g. Mat, Op, Glue, diagview, subview).
//! A Base object can be converted to a Mat object by the unwrap class. //! A Base object can be converted to a Mat object by the unwrap class.
template<typename elem_type, typename derived> template<typename elem_type, typename derived>
struct Base struct Base
{ {
arma_inline const derived& get_ref() const; arma_inline const derived& get_ref() const;
arma_inline const Op<derived,op_htrans> t() const; arma_inline const Op<derived,op_htrans> t() const;
arma_inline const Op<derived,op_htrans> ht() const;
arma_inline const Op<derived,op_strans> st() const; arma_inline const Op<derived,op_strans> st() const;
inline void print(const std::string extra_text = "") const; inline void print(const std::string extra_text = "") const;
inline void print(std::ostream& user_stream, const std::string extra_text = "") const; inline void print(std::ostream& user_stream, const std::string extra_text = "") const;
inline void raw_print(const std::string extra_text = "") const; inline void raw_print(const std::string extra_text = "") const;
inline void raw_print(std::ostream& user_stream, const std::string extra_ text = "") const; inline void raw_print(std::ostream& user_stream, const std::string extra_ text = "") const;
arma_deprecated inline void print_trans(const std::string extra_text = "" ) const; arma_deprecated inline void print_trans(const std::string extra_text = "" ) const;
arma_deprecated inline void print_trans(std::ostream& user_stream, const std::string extra_text = "") const; arma_deprecated inline void print_trans(std::ostream& user_stream, const std::string extra_text = "") const;
 End of changes. 2 change blocks. 
2 lines changed or deleted 3 lines changed or added


 Base_meat.hpp   Base_meat.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This file is part of the Armadillo C++ library.
// It is provided without any warranty of fitness // It is provided without any warranty of fitness
// for any purpose. You can redistribute this file // for any purpose. You can redistribute this file
// and/or modify it under the terms of the GNU // and/or modify it under the terms of the GNU
// Lesser General Public License (LGPL) as published // Lesser General Public License (LGPL) as published
// by the Free Software Foundation, either version 3 // by the Free Software Foundation, either version 3
// of the License or (at your option) any later version. // of the License or (at your option) any later version.
// (see http://www.opensource.org/licenses for more info) // (see http://www.opensource.org/licenses for more info)
skipping to change at line 34 skipping to change at line 34
template<typename elem_type, typename derived> template<typename elem_type, typename derived>
arma_inline arma_inline
const Op<derived,op_htrans> const Op<derived,op_htrans>
Base<elem_type,derived>::t() const Base<elem_type,derived>::t() const
{ {
return Op<derived,op_htrans>( (*this).get_ref() ); return Op<derived,op_htrans>( (*this).get_ref() );
} }
template<typename elem_type, typename derived> template<typename elem_type, typename derived>
arma_inline arma_inline
const Op<derived,op_htrans>
Base<elem_type,derived>::ht() const
{
return Op<derived,op_htrans>( (*this).get_ref() );
}
template<typename elem_type, typename derived>
arma_inline
const Op<derived,op_strans> const Op<derived,op_strans>
Base<elem_type,derived>::st() const Base<elem_type,derived>::st() const
{ {
return Op<derived,op_strans>( (*this).get_ref() ); return Op<derived,op_strans>( (*this).get_ref() );
} }
template<typename elem_type, typename derived> template<typename elem_type, typename derived>
inline inline
void void
Base<elem_type,derived>::print(const std::string extra_text) const Base<elem_type,derived>::print(const std::string extra_text) const
 End of changes. 2 change blocks. 
2 lines changed or deleted 10 lines changed or added


 Cube_bones.hpp   Cube_bones.hpp 
skipping to change at line 34 skipping to change at line 34
template<typename eT> template<typename eT>
class Cube : public BaseCube< eT, Cube<eT> > class Cube : public BaseCube< eT, Cube<eT> >
{ {
public: public:
typedef eT elem_type; //!< the type of ele ments stored in the cube typedef eT elem_type; //!< the type of ele ments stored in the cube
typedef typename get_pod_type<eT>::result pod_type; //!< if eT is non-co mplex, pod_type is same as eT. otherwise, pod_type is the underlying type u sed by std::complex typedef typename get_pod_type<eT>::result pod_type; //!< if eT is non-co mplex, pod_type is same as eT. otherwise, pod_type is the underlying type u sed by std::complex
const uword n_rows; //!< number of rows in each slice (read-only) const uword n_rows; //!< number of rows in each slice (read-only)
const uword n_cols; //!< number of columns in each slice (read-onl y) const uword n_cols; //!< number of columns in each slice (read-onl y)
const uword n_elem_slice; //!< DEPRECATED: do not use this member variab le -- it will be _removed_ in version 3.0 const uword n_elem_slice; //!< number of elements in each slice (read-on ly)
const uword n_slices; //!< number of slices in the cube (read-only) const uword n_slices; //!< number of slices in the cube (read-only)
const uword n_elem; //!< number of elements in the cube (read-only ) const uword n_elem; //!< number of elements in the cube (read-only )
const uword mem_state; const uword mem_state;
// mem_state = 0: normal cube that can be resized; // mem_state = 0: normal cube that can be resized;
// mem_state = 1: use auxiliary memory until change in the number of elem ents is requested; // mem_state = 1: use auxiliary memory until change in the number of elem ents is requested;
// mem_state = 2: use auxiliary memory and don't allow the number of elem ents to be changed; // mem_state = 2: use auxiliary memory and don't allow the number of elem ents to be changed;
// mem_state = 3: fixed size (e.g. via template based size specification) . // mem_state = 3: fixed size (e.g. via template based size specification) .
arma_aligned const Mat<eT>** const mat_ptrs; //!< pointer to an array con taining pointers to Mat instances (one for each slice) arma_aligned const Mat<eT>** const mat_ptrs; //!< pointer to an array con taining pointers to Mat instances (one for each slice)
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 Cube_meat.hpp   Cube_meat.hpp 
skipping to change at line 2114 skipping to change at line 2114
//! on return, the stream's state are restored to their original values. //! on return, the stream's state are restored to their original values.
template<typename eT> template<typename eT>
inline inline
void void
Cube<eT>::impl_print(const std::string& extra_text) const Cube<eT>::impl_print(const std::string& extra_text) const
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(extra_text.length() != 0) if(extra_text.length() != 0)
{ {
cout << extra_text << '\n'; ARMA_DEFAULT_OSTREAM << extra_text << '\n';
} }
arma_ostream::print(cout, *this, true); arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this, true);
} }
//! print contents of the cube to a user specified stream, //! print contents of the cube to a user specified stream,
//! optionally preceding with a user specified line of text. //! optionally preceding with a user specified line of text.
//! the precision and cell width are modified. //! the precision and cell width are modified.
//! on return, the stream's state are restored to their original values. //! on return, the stream's state are restored to their original values.
template<typename eT> template<typename eT>
inline inline
void void
Cube<eT>::impl_print(std::ostream& user_stream, const std::string& extra_te xt) const Cube<eT>::impl_print(std::ostream& user_stream, const std::string& extra_te xt) const
skipping to change at line 2152 skipping to change at line 2152
//! (i.e. the precision and cell width are not modified). //! (i.e. the precision and cell width are not modified).
template<typename eT> template<typename eT>
inline inline
void void
Cube<eT>::impl_raw_print(const std::string& extra_text) const Cube<eT>::impl_raw_print(const std::string& extra_text) const
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(extra_text.length() != 0) if(extra_text.length() != 0)
{ {
cout << extra_text << '\n'; ARMA_DEFAULT_OSTREAM << extra_text << '\n';
} }
arma_ostream::print(cout, *this, false); arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this, false);
} }
//! print contents of the cube to a user specified stream, //! print contents of the cube to a user specified stream,
//! optionally preceding with a user specified line of text. //! optionally preceding with a user specified line of text.
//! the stream's state are used as is and are not modified. //! the stream's state are used as is and are not modified.
//! (i.e. the precision and cell width are not modified). //! (i.e. the precision and cell width are not modified).
template<typename eT> template<typename eT>
inline inline
void void
Cube<eT>::impl_raw_print(std::ostream& user_stream, const std::string& extr a_text) const Cube<eT>::impl_raw_print(std::ostream& user_stream, const std::string& extr a_text) const
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 Mat_meat.hpp   Mat_meat.hpp 
skipping to change at line 3686 skipping to change at line 3686
//! on return, the stream's state are restored to their original values. //! on return, the stream's state are restored to their original values.
template<typename eT> template<typename eT>
inline inline
void void
Mat<eT>::impl_print(const std::string& extra_text) const Mat<eT>::impl_print(const std::string& extra_text) const
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(extra_text.length() != 0) if(extra_text.length() != 0)
{ {
const std::streamsize orig_width = cout.width(); const std::streamsize orig_width = ARMA_DEFAULT_OSTREAM.width();
cout << extra_text << '\n'; ARMA_DEFAULT_OSTREAM << extra_text << '\n';
cout.width(orig_width); ARMA_DEFAULT_OSTREAM.width(orig_width);
} }
arma_ostream::print(cout, *this, true); arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this, true);
} }
//! print contents of the matrix to a user specified stream, //! print contents of the matrix to a user specified stream,
//! optionally preceding with a user specified line of text. //! optionally preceding with a user specified line of text.
//! the precision and cell width are modified. //! the precision and cell width are modified.
//! on return, the stream's state are restored to their original values. //! on return, the stream's state are restored to their original values.
template<typename eT> template<typename eT>
inline inline
void void
Mat<eT>::impl_print(std::ostream& user_stream, const std::string& extra_tex t) const Mat<eT>::impl_print(std::ostream& user_stream, const std::string& extra_tex t) const
skipping to change at line 3760 skipping to change at line 3760
//! (i.e. the precision and cell width are not modified). //! (i.e. the precision and cell width are not modified).
template<typename eT> template<typename eT>
inline inline
void void
Mat<eT>::impl_raw_print(const std::string& extra_text) const Mat<eT>::impl_raw_print(const std::string& extra_text) const
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(extra_text.length() != 0) if(extra_text.length() != 0)
{ {
const std::streamsize orig_width = cout.width(); const std::streamsize orig_width = ARMA_DEFAULT_OSTREAM.width();
cout << extra_text << '\n'; ARMA_DEFAULT_OSTREAM << extra_text << '\n';
cout.width(orig_width); ARMA_DEFAULT_OSTREAM.width(orig_width);
} }
arma_ostream::print(cout, *this, false); arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this, false);
} }
//! print contents of the matrix to a user specified stream, //! print contents of the matrix to a user specified stream,
//! optionally preceding with a user specified line of text. //! optionally preceding with a user specified line of text.
//! the stream's state are used as is and are not modified. //! the stream's state are used as is and are not modified.
//! (i.e. the precision and cell width are not modified). //! (i.e. the precision and cell width are not modified).
template<typename eT> template<typename eT>
inline inline
void void
Mat<eT>::impl_raw_print(std::ostream& user_stream, const std::string& extra _text) const Mat<eT>::impl_raw_print(std::ostream& user_stream, const std::string& extra _text) const
 End of changes. 8 change blocks. 
8 lines changed or deleted 8 lines changed or added


 Proxy.hpp   Proxy.hpp 
// Copyright (C) 2010-2011 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2011 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This file is part of the Armadillo C++ library.
// It is provided without any warranty of fitness // It is provided without any warranty of fitness
// for any purpose. You can redistribute this file // for any purpose. You can redistribute this file
// and/or modify it under the terms of the GNU // and/or modify it under the terms of the GNU
// Lesser General Public License (LGPL) as published // Lesser General Public License (LGPL) as published
// by the Free Software Foundation, either version 3 // by the Free Software Foundation, either version 3
// of the License or (at your option) any later version. // of the License or (at your option) any later version.
// (see http://www.opensource.org/licenses for more info) // (see http://www.opensource.org/licenses for more info)
skipping to change at line 57 skipping to change at line 57
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_rows() const { return Q.n_rows; }
arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_cols() const { return Q.n_cols; }
arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_elem() const { return Q.n_elem; }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); }
arma_inline ea_type get_ea() const { return Q.memptr(); arma_inline ea_type get_ea() const { return Q.memptr(); }
}
arma_inline bool is_alias(const Mat<eT>& X) const { return (&Q == &X); template<typename eT2>
} arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&Q)
== void_ptr(&X)); }
}; };
template<typename eT> template<typename eT>
class Proxy< Col<eT> > class Proxy< Col<eT> >
{ {
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Col<eT> stored_type; typedef Col<eT> stored_type;
skipping to change at line 89 skipping to change at line 91
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_rows() const { return Q.n_rows; }
arma_inline uword get_n_cols() const { return 1; } arma_inline uword get_n_cols() const { return 1; }
arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_elem() const { return Q.n_elem; }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); }
arma_inline ea_type get_ea() const { return Q.memptr(); arma_inline ea_type get_ea() const { return Q.memptr(); }
}
arma_inline bool is_alias(const Mat<eT>& X) const { return (&Q == &X); template<typename eT2>
} arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&Q)
== void_ptr(&X)); }
}; };
template<typename eT> template<typename eT>
class Proxy< Row<eT> > class Proxy< Row<eT> >
{ {
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Row<eT> stored_type; typedef Row<eT> stored_type;
skipping to change at line 121 skipping to change at line 125
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline uword get_n_rows() const { return 1; } arma_inline uword get_n_rows() const { return 1; }
arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_cols() const { return Q.n_cols; }
arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_elem() const { return Q.n_elem; }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); }
arma_inline ea_type get_ea() const { return Q.memptr(); arma_inline ea_type get_ea() const { return Q.memptr(); }
}
arma_inline bool is_alias(const Mat<eT>& X) const { return (&Q == &X); template<typename eT2>
} arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&Q)
== void_ptr(&X)); }
}; };
template<typename eT, typename gen_type> template<typename eT, typename gen_type>
class Proxy< Gen<eT, gen_type > > class Proxy< Gen<eT, gen_type > >
{ {
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Gen<eT, gen_type> stored_type; typedef Gen<eT, gen_type> stored_type;
skipping to change at line 153 skipping to change at line 159
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_rows() const { return Q.n_rows; }
arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_cols() const { return Q.n_cols; }
arma_inline uword get_n_elem() const { return Q.n_rows*Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_rows*Q.n_cols; }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); }
arma_inline ea_type get_ea() const { return Q; arma_inline ea_type get_ea() const { return Q; }
}
arma_inline bool is_alias(const Mat<elem_type>&) const { return false; template<typename eT2>
} arma_inline bool is_alias(const Mat<eT2>&) const { return false; }
}; };
template<typename T1, typename op_type> template<typename T1, typename op_type>
class Proxy< Op<T1, op_type> > class Proxy< Op<T1, op_type> >
{ {
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Mat<elem_type> stored_type; typedef Mat<elem_type> stored_type;
skipping to change at line 185 skipping to change at line 193
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_rows() const { return Q.n_rows; }
arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_cols() const { return Q.n_cols; }
arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_elem() const { return Q.n_elem; }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); }
arma_inline ea_type get_ea() const { return Q.memp arma_inline ea_type get_ea() const { return Q.memptr(); }
tr(); }
arma_inline bool is_alias(const Mat<elem_type>&) const { return false; template<typename eT2>
} arma_inline bool is_alias(const Mat<eT2>&) const { return false; }
}; };
template<typename T1, typename T2, typename glue_type> template<typename T1, typename T2, typename glue_type>
class Proxy< Glue<T1, T2, glue_type> > class Proxy< Glue<T1, T2, glue_type> >
{ {
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Mat<elem_type> stored_type; typedef Mat<elem_type> stored_type;
skipping to change at line 217 skipping to change at line 227
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_rows() const { return Q.n_rows; }
arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_cols() const { return Q.n_cols; }
arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_elem() const { return Q.n_elem; }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); }
arma_inline ea_type get_ea() const { return Q.memp arma_inline ea_type get_ea() const { return Q.memptr(); }
tr(); }
arma_inline bool is_alias(const Mat<elem_type>&) const { return false; template<typename eT2>
} arma_inline bool is_alias(const Mat<eT2>&) const { return false; }
}; };
template<typename eT> template<typename eT>
class Proxy< subview<eT> > class Proxy< subview<eT> >
{ {
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef subview<eT> stored_type; typedef subview<eT> stored_type;
skipping to change at line 249 skipping to change at line 261
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_rows() const { return Q.n_rows; }
arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_cols() const { return Q.n_cols; }
arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_elem() const { return Q.n_elem; }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); }
arma_inline ea_type get_ea() const { return Q; arma_inline ea_type get_ea() const { return Q; }
}
arma_inline bool is_alias(const Mat<eT>& X) const { return (&(Q.m) == template<typename eT2>
&X); } arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&(Q
.m)) == void_ptr(&X)); }
}; };
template<typename eT, typename T1> template<typename eT, typename T1>
class Proxy< subview_elem1<eT,T1> > class Proxy< subview_elem1<eT,T1> >
{ {
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Mat<eT> stored_type; typedef Mat<eT> stored_type;
skipping to change at line 281 skipping to change at line 295
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_rows() const { return Q.n_rows; }
arma_inline uword get_n_cols() const { return 1; } arma_inline uword get_n_cols() const { return 1; }
arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_elem() const { return Q.n_elem; }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); }
arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline ea_type get_ea() const { return Q.memptr(); }
arma_inline bool is_alias(const Mat<eT>&) const { return false; }
template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>&) const { return false; }
}; };
template<typename eT> template<typename eT>
class Proxy< diagview<eT> > class Proxy< diagview<eT> >
{ {
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef diagview<eT> stored_type; typedef diagview<eT> stored_type;
skipping to change at line 313 skipping to change at line 329
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_rows() const { return Q.n_rows; }
arma_inline uword get_n_cols() const { return 1; } arma_inline uword get_n_cols() const { return 1; }
arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_elem() const { return Q.n_elem; }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); }
arma_inline ea_type get_ea() const { return Q; arma_inline ea_type get_ea() const { return Q; }
}
arma_inline bool is_alias(const Mat<eT>& X) const { return (&(Q.m) == template<typename eT2>
&X); } arma_inline bool is_alias(const Mat<eT2>& X) const { return (void_ptr(&(Q
.m)) == void_ptr(&X)); }
}; };
template<typename T1, typename eop_type> template<typename T1, typename eop_type>
class Proxy< eOp<T1, eop_type > > class Proxy< eOp<T1, eop_type > >
{ {
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef eOp<T1, eop_type> stored_type; typedef eOp<T1, eop_type> stored_type;
skipping to change at line 345 skipping to change at line 363
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline uword get_n_rows() const { return Q.get_n_rows(); } arma_inline uword get_n_rows() const { return Q.get_n_rows(); }
arma_inline uword get_n_cols() const { return Q.get_n_cols(); } arma_inline uword get_n_cols() const { return Q.get_n_cols(); }
arma_inline uword get_n_elem() const { return Q.get_n_elem(); } arma_inline uword get_n_elem() const { return Q.get_n_elem(); }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); }
arma_inline ea_type get_ea() const { return Q; arma_inline ea_type get_ea() const { return Q; }
}
arma_inline bool is_alias(const Mat<elem_type>& X) const { return Q.P. template<typename eT2>
is_alias(X); } arma_inline bool is_alias(const Mat<eT2>& X) const { return Q.P.is_alias(
X); }
}; };
template<typename T1, typename T2, typename eglue_type> template<typename T1, typename T2, typename eglue_type>
class Proxy< eGlue<T1, T2, eglue_type > > class Proxy< eGlue<T1, T2, eglue_type > >
{ {
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef eGlue<T1, T2, eglue_type> stored_type; typedef eGlue<T1, T2, eglue_type> stored_type;
skipping to change at line 377 skipping to change at line 397
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline uword get_n_rows() const { return Q.get_n_rows(); } arma_inline uword get_n_rows() const { return Q.get_n_rows(); }
arma_inline uword get_n_cols() const { return Q.get_n_cols(); } arma_inline uword get_n_cols() const { return Q.get_n_cols(); }
arma_inline uword get_n_elem() const { return Q.get_n_elem(); } arma_inline uword get_n_elem() const { return Q.get_n_elem(); }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); }
arma_inline ea_type get_ea() const { return Q; arma_inline ea_type get_ea() const { return Q; }
}
arma_inline bool is_alias(const Mat<elem_type>& X) const { return (Q.P template<typename eT2>
1.is_alias(X) || Q.P2.is_alias(X)); } arma_inline bool is_alias(const Mat<eT2>& X) const { return (Q.P1.is_alia
s(X) || Q.P2.is_alias(X)); }
}; };
template<typename out_eT, typename T1, typename op_type> template<typename out_eT, typename T1, typename op_type>
class Proxy< mtOp<out_eT, T1, op_type> > class Proxy< mtOp<out_eT, T1, op_type> >
{ {
public: public:
typedef out_eT elem_type; typedef out_eT elem_type;
typedef typename get_pod_type<out_eT>::result pod_type; typedef typename get_pod_type<out_eT>::result pod_type;
typedef Mat<out_eT> stored_type; typedef Mat<out_eT> stored_type;
skipping to change at line 409 skipping to change at line 431
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_rows() const { return Q.n_rows; }
arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_cols() const { return Q.n_cols; }
arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_elem() const { return Q.n_elem; }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row,col); } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row,col); }
arma_inline ea_type get_ea() const { return Q.memptr( arma_inline ea_type get_ea() const { return Q.memptr(); }
); }
arma_inline bool is_alias(const Mat<out_eT>&) const { return false; template<typename eT2>
} arma_inline bool is_alias(const Mat<eT2>&) const { return false; }
}; };
template<typename out_eT, typename T1, typename T2, typename glue_type> template<typename out_eT, typename T1, typename T2, typename glue_type>
class Proxy< mtGlue<out_eT, T1, T2, glue_type > > class Proxy< mtGlue<out_eT, T1, T2, glue_type > >
{ {
public: public:
typedef out_eT elem_type; typedef out_eT elem_type;
typedef typename get_pod_type<out_eT>::result pod_type; typedef typename get_pod_type<out_eT>::result pod_type;
typedef Mat<out_eT> stored_type; typedef Mat<out_eT> stored_type;
skipping to change at line 441 skipping to change at line 465
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_rows() const { return Q.n_rows; }
arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_cols() const { return Q.n_cols; }
arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_elem() const { return Q.n_elem; }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row,col); } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row,col); }
arma_inline ea_type get_ea() const { return Q.memptr( arma_inline ea_type get_ea() const { return Q.memptr(); }
); }
arma_inline bool is_alias(const Mat<out_eT>&) const { return false; template<typename eT2>
} arma_inline bool is_alias(const Mat<eT2>&) const { return false; }
}; };
//! @} //! @}
 End of changes. 14 change blocks. 
52 lines changed or deleted 61 lines changed or added


 ProxyCube.hpp   ProxyCube.hpp 
// Copyright (C) 2010-2011 NICTA (www.nicta.com.au) // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2010-2011 Conrad Sanderson // Copyright (C) 2010-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This file is part of the Armadillo C++ library.
// It is provided without any warranty of fitness // It is provided without any warranty of fitness
// for any purpose. You can redistribute this file // for any purpose. You can redistribute this file
// and/or modify it under the terms of the GNU // and/or modify it under the terms of the GNU
// Lesser General Public License (LGPL) as published // Lesser General Public License (LGPL) as published
// by the Free Software Foundation, either version 3 // by the Free Software Foundation, either version 3
// of the License or (at your option) any later version. // of the License or (at your option) any later version.
// (see http://www.opensource.org/licenses for more info) // (see http://www.opensource.org/licenses for more info)
skipping to change at line 59 skipping to change at line 59
arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_rows() const { return Q.n_rows; }
arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_cols() const { return Q.n_cols; }
arma_inline uword get_n_elem_slice() const { return Q.n_elem_slice; } arma_inline uword get_n_elem_slice() const { return Q.n_elem_slice; }
arma_inline uword get_n_slices() const { return Q.n_slices; } arma_inline uword get_n_slices() const { return Q.n_slices; }
arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_elem() const { return Q.n_elem; }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); } arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); }
arma_inline ea_type get_ea() const { return Q.m arma_inline ea_type get_ea() const { return Q.memptr(); }
emptr(); }
arma_inline bool is_alias(const Cube<elem_type>& X) const { return (&Q template<typename eT2>
== &X); } arma_inline bool is_alias(const Cube<eT2>& X) const { return (void_ptr(&Q
) == void_ptr(&X)); }
}; };
template<typename eT, typename gen_type> template<typename eT, typename gen_type>
class ProxyCube< GenCube<eT, gen_type > > class ProxyCube< GenCube<eT, gen_type > >
{ {
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef GenCube<eT, gen_type> stored_type; typedef GenCube<eT, gen_type> stored_type;
skipping to change at line 93 skipping to change at line 95
arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_rows() const { return Q.n_rows; }
arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_cols() const { return Q.n_cols; }
arma_inline uword get_n_elem_slice() const { return Q.n_rows*Q.n_cols; } arma_inline uword get_n_elem_slice() const { return Q.n_rows*Q.n_cols; }
arma_inline uword get_n_slices() const { return Q.n_slices; } arma_inline uword get_n_slices() const { return Q.n_slices; }
arma_inline uword get_n_elem() const { return Q.n_rows*Q.n_cols*Q.n _slices; } arma_inline uword get_n_elem() const { return Q.n_rows*Q.n_cols*Q.n _slices; }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); } arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); }
arma_inline ea_type get_ea() const { return Q; arma_inline ea_type get_ea() const { return Q; }
}
arma_inline bool is_alias(const Cube<elem_type>&) const { return false template<typename eT2>
; } arma_inline bool is_alias(const Cube<eT2>&) const { return false; }
}; };
template<typename T1, typename op_type> template<typename T1, typename op_type>
class ProxyCube< OpCube<T1, op_type> > class ProxyCube< OpCube<T1, op_type> >
{ {
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Cube<elem_type> stored_type; typedef Cube<elem_type> stored_type;
skipping to change at line 127 skipping to change at line 131
arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_rows() const { return Q.n_rows; }
arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_cols() const { return Q.n_cols; }
arma_inline uword get_n_elem_slice() const { return Q.n_elem_slice; } arma_inline uword get_n_elem_slice() const { return Q.n_elem_slice; }
arma_inline uword get_n_slices() const { return Q.n_slices; } arma_inline uword get_n_slices() const { return Q.n_slices; }
arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_elem() const { return Q.n_elem; }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); } arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); }
arma_inline ea_type get_ea() const { return Q.mem arma_inline ea_type get_ea() const { return Q.memptr(); }
ptr(); }
arma_inline bool is_alias(const Cube<elem_type>&) const { return false template<typename eT2>
; } arma_inline bool is_alias(const Cube<eT2>&) const { return false; }
}; };
template<typename T1, typename T2, typename glue_type> template<typename T1, typename T2, typename glue_type>
class ProxyCube< GlueCube<T1, T2, glue_type> > class ProxyCube< GlueCube<T1, T2, glue_type> >
{ {
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef Cube<elem_type> stored_type; typedef Cube<elem_type> stored_type;
skipping to change at line 161 skipping to change at line 167
arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_rows() const { return Q.n_rows; }
arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_cols() const { return Q.n_cols; }
arma_inline uword get_n_elem_slice() const { return Q.n_elem_slice; } arma_inline uword get_n_elem_slice() const { return Q.n_elem_slice; }
arma_inline uword get_n_slices() const { return Q.n_slices; } arma_inline uword get_n_slices() const { return Q.n_slices; }
arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_elem() const { return Q.n_elem; }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); } arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); }
arma_inline ea_type get_ea() const { return Q.mem arma_inline ea_type get_ea() const { return Q.memptr(); }
ptr(); }
arma_inline bool is_alias(const Cube<elem_type>&) const { return false template<typename eT2>
; } arma_inline bool is_alias(const Cube<eT2>&) const { return false; }
}; };
template<typename eT> template<typename eT>
class ProxyCube< subview_cube<eT> > class ProxyCube< subview_cube<eT> >
{ {
public: public:
typedef eT elem_type; typedef eT elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef subview_cube<eT> stored_type; typedef subview_cube<eT> stored_type;
skipping to change at line 195 skipping to change at line 203
arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_rows() const { return Q.n_rows; }
arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_cols() const { return Q.n_cols; }
arma_inline uword get_n_elem_slice() const { return Q.n_elem_slice; } arma_inline uword get_n_elem_slice() const { return Q.n_elem_slice; }
arma_inline uword get_n_slices() const { return Q.n_slices; } arma_inline uword get_n_slices() const { return Q.n_slices; }
arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_elem() const { return Q.n_elem; }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); } arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); }
arma_inline ea_type get_ea() const { return Q; arma_inline ea_type get_ea() const { return Q; }
}
arma_inline bool is_alias(const Cube<elem_type>& X) const { return (&( template<typename eT2>
Q.m) == &X); } arma_inline bool is_alias(const Cube<eT2>& X) const { return (void_ptr(&(
Q.m)) == void_ptr(&X)); }
}; };
template<typename T1, typename eop_type> template<typename T1, typename eop_type>
class ProxyCube< eOpCube<T1, eop_type > > class ProxyCube< eOpCube<T1, eop_type > >
{ {
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef eOpCube<T1, eop_type> stored_type; typedef eOpCube<T1, eop_type> stored_type;
skipping to change at line 229 skipping to change at line 239
arma_inline uword get_n_rows() const { return Q.get_n_rows(); } arma_inline uword get_n_rows() const { return Q.get_n_rows(); }
arma_inline uword get_n_cols() const { return Q.get_n_cols(); } arma_inline uword get_n_cols() const { return Q.get_n_cols(); }
arma_inline uword get_n_elem_slice() const { return Q.get_n_elem_slice(); } arma_inline uword get_n_elem_slice() const { return Q.get_n_elem_slice(); }
arma_inline uword get_n_slices() const { return Q.get_n_slices(); } arma_inline uword get_n_slices() const { return Q.get_n_slices(); }
arma_inline uword get_n_elem() const { return Q.get_n_elem(); } arma_inline uword get_n_elem() const { return Q.get_n_elem(); }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); } arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); }
arma_inline ea_type get_ea() const { return Q; arma_inline ea_type get_ea() const { return Q; }
}
arma_inline bool is_alias(const Cube<elem_type>& X) const { return Q.P template<typename eT2>
.is_alias(X); } arma_inline bool is_alias(const Cube<eT2>& X) const { return Q.P.is_alias
(X); }
}; };
template<typename T1, typename T2, typename eglue_type> template<typename T1, typename T2, typename eglue_type>
class ProxyCube< eGlueCube<T1, T2, eglue_type > > class ProxyCube< eGlueCube<T1, T2, eglue_type > >
{ {
public: public:
typedef typename T1::elem_type elem_type; typedef typename T1::elem_type elem_type;
typedef typename get_pod_type<elem_type>::result pod_type; typedef typename get_pod_type<elem_type>::result pod_type;
typedef eGlueCube<T1, T2, eglue_type> stored_type; typedef eGlueCube<T1, T2, eglue_type> stored_type;
skipping to change at line 263 skipping to change at line 275
arma_inline uword get_n_rows() const { return Q.get_n_rows(); } arma_inline uword get_n_rows() const { return Q.get_n_rows(); }
arma_inline uword get_n_cols() const { return Q.get_n_cols(); } arma_inline uword get_n_cols() const { return Q.get_n_cols(); }
arma_inline uword get_n_elem_slice() const { return Q.get_n_elem_slice(); } arma_inline uword get_n_elem_slice() const { return Q.get_n_elem_slice(); }
arma_inline uword get_n_slices() const { return Q.get_n_slices(); } arma_inline uword get_n_slices() const { return Q.get_n_slices(); }
arma_inline uword get_n_elem() const { return Q.get_n_elem(); } arma_inline uword get_n_elem() const { return Q.get_n_elem(); }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); } arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); }
arma_inline ea_type get_ea() const { return Q; arma_inline ea_type get_ea() const { return Q; }
}
arma_inline bool is_alias(const Cube<elem_type>& X) const { return (Q. template<typename eT2>
P1.is_alias(X) || Q.P2.is_alias(X)); } arma_inline bool is_alias(const Cube<eT2>& X) const { return (Q.P1.is_ali
as(X) || Q.P2.is_alias(X)); }
}; };
template<typename out_eT, typename T1, typename op_type> template<typename out_eT, typename T1, typename op_type>
class ProxyCube< mtOpCube<out_eT, T1, op_type> > class ProxyCube< mtOpCube<out_eT, T1, op_type> >
{ {
public: public:
typedef out_eT elem_type; typedef out_eT elem_type;
typedef typename get_pod_type<out_eT>::result pod_type; typedef typename get_pod_type<out_eT>::result pod_type;
typedef Cube<out_eT> stored_type; typedef Cube<out_eT> stored_type;
skipping to change at line 297 skipping to change at line 311
arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_rows() const { return Q.n_rows; }
arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_cols() const { return Q.n_cols; }
arma_inline uword get_n_elem_slice() const { return Q.n_elem_slice; } arma_inline uword get_n_elem_slice() const { return Q.n_elem_slice; }
arma_inline uword get_n_slices() const { return Q.n_slices; } arma_inline uword get_n_slices() const { return Q.n_slices; }
arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_elem() const { return Q.n_elem; }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); } arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); }
arma_inline ea_type get_ea() const { return Q.memptr arma_inline ea_type get_ea() const { return Q.memptr(); }
(); }
arma_inline bool is_alias(const Cube<out_eT>&) const { return false; template<typename eT2>
} arma_inline bool is_alias(const Cube<eT2>&) const { return false; }
}; };
template<typename out_eT, typename T1, typename T2, typename glue_type> template<typename out_eT, typename T1, typename T2, typename glue_type>
class ProxyCube< mtGlueCube<out_eT, T1, T2, glue_type > > class ProxyCube< mtGlueCube<out_eT, T1, T2, glue_type > >
{ {
public: public:
typedef out_eT elem_type; typedef out_eT elem_type;
typedef typename get_pod_type<out_eT>::result pod_type; typedef typename get_pod_type<out_eT>::result pod_type;
typedef Cube<out_eT> stored_type; typedef Cube<out_eT> stored_type;
skipping to change at line 331 skipping to change at line 347
arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_rows() const { return Q.n_rows; }
arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_cols() const { return Q.n_cols; }
arma_inline uword get_n_elem_slice() const { return Q.n_elem_slice; } arma_inline uword get_n_elem_slice() const { return Q.n_elem_slice; }
arma_inline uword get_n_slices() const { return Q.n_slices; } arma_inline uword get_n_slices() const { return Q.n_slices; }
arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_elem() const { return Q.n_elem; }
arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; }
arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); } arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); }
arma_inline ea_type get_ea() const { return Q.memptr arma_inline ea_type get_ea() const { return Q.memptr(); }
(); }
arma_inline bool is_alias(const Cube<out_eT>&) const { return false; template<typename eT2>
} arma_inline bool is_alias(const Cube<eT2>&) const { return false; }
}; };
//! @} //! @}
 End of changes. 10 change blocks. 
38 lines changed or deleted 42 lines changed or added


 arma_version.hpp   arma_version.hpp 
skipping to change at line 18 skipping to change at line 18
// Lesser General Public License (LGPL) as published // Lesser General Public License (LGPL) as published
// by the Free Software Foundation, either version 3 // by the Free Software Foundation, either version 3
// of the License or (at your option) any later version. // of the License or (at your option) any later version.
// (see http://www.opensource.org/licenses for more info) // (see http://www.opensource.org/licenses for more info)
//! \addtogroup arma_version //! \addtogroup arma_version
//! @{ //! @{
#define ARMA_VERSION_MAJOR 2 #define ARMA_VERSION_MAJOR 2
#define ARMA_VERSION_MINOR 4 #define ARMA_VERSION_MINOR 4
#define ARMA_VERSION_PATCH 2 #define ARMA_VERSION_PATCH 3
#define ARMA_VERSION_NAME "Loco Lounge Lizard" #define ARMA_VERSION_NAME "Loco Lounge Lizard"
struct arma_version struct arma_version
{ {
static const unsigned int major = ARMA_VERSION_MAJOR; static const unsigned int major = ARMA_VERSION_MAJOR;
static const unsigned int minor = ARMA_VERSION_MINOR; static const unsigned int minor = ARMA_VERSION_MINOR;
static const unsigned int patch = ARMA_VERSION_PATCH; static const unsigned int patch = ARMA_VERSION_PATCH;
static static
inline inline
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 config.hpp   config.hpp 
// Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This file is part of the Armadillo C++ library.
// It is provided without any warranty of fitness // It is provided without any warranty of fitness
// for any purpose. You can redistribute this file // for any purpose. You can redistribute this file
// and/or modify it under the terms of the GNU // and/or modify it under the terms of the GNU
// Lesser General Public License (LGPL) as published // Lesser General Public License (LGPL) as published
// by the Free Software Foundation, either version 3 // by the Free Software Foundation, either version 3
// of the License or (at your option) any later version. // of the License or (at your option) any later version.
// (see http://www.opensource.org/licenses for more info) // (see http://www.opensource.org/licenses for more info)
skipping to change at line 70 skipping to change at line 70
#define ARMA_USE_ATLAS #define ARMA_USE_ATLAS
#define ARMA_ATLAS_INCLUDE_DIR /usr/include/ #define ARMA_ATLAS_INCLUDE_DIR /usr/include/
//// If you're using ATLAS and the compiler can't find cblas.h and/or clapa ck.h //// If you're using ATLAS and the compiler can't find cblas.h and/or clapa ck.h
//// uncomment the above define and specify the appropriate include directo ry. //// uncomment the above define and specify the appropriate include directo ry.
//// Make sure the directory has a trailing / //// Make sure the directory has a trailing /
#define ARMA_USE_BOOST #define ARMA_USE_BOOST
#define ARMA_USE_BOOST_DATE #define ARMA_USE_BOOST_DATE
#define ARMA_USE_WRAPPER #define ARMA_USE_WRAPPER
#define ARMA_DEFAULT_OSTREAM std::cout
#define ARMA_PRINT_LOGIC_ERRORS #define ARMA_PRINT_LOGIC_ERRORS
#define ARMA_PRINT_RUNTIME_ERRORS #define ARMA_PRINT_RUNTIME_ERRORS
#define ARMA_HAVE_STD_ISFINITE #define ARMA_HAVE_STD_ISFINITE
#define ARMA_HAVE_STD_ISINF #define ARMA_HAVE_STD_ISINF
#define ARMA_HAVE_STD_ISNAN #define ARMA_HAVE_STD_ISNAN
#define ARMA_HAVE_STD_SNPRINTF #define ARMA_HAVE_STD_SNPRINTF
#define ARMA_HAVE_LOG1P #define ARMA_HAVE_LOG1P
#define ARMA_HAVE_GETTIMEOFDAY #define ARMA_HAVE_GETTIMEOFDAY
 End of changes. 2 change blocks. 
2 lines changed or deleted 4 lines changed or added


 constants.hpp   constants.hpp 
skipping to change at line 167 skipping to change at line 167
//! Boltzmann constant (in joules per kelvin) //! Boltzmann constant (in joules per kelvin)
static eT k() { return eT(1.3806504e-23); } static eT k() { return eT(1.3806504e-23); }
//! Boltzmann constant (in eV/K) //! Boltzmann constant (in eV/K)
static eT k_evk() { return eT(8.617343e-5); } static eT k_evk() { return eT(8.617343e-5); }
//! Bohr radius (in meters) //! Bohr radius (in meters)
static eT a_0() { return eT(0.52917720859e-10); } static eT a_0() { return eT(0.52917720859e-10); }
//! Bohr magneton //! Bohr magneton
static eT mu_B() { return(927.400915e-26); } static eT mu_B() { return eT(927.400915e-26); }
//! characteristic impedance of vacuum (in ohms) //! characteristic impedance of vacuum (in ohms)
static eT Z_0() { return eT(3.76730313461771e-2); } static eT Z_0() { return eT(3.76730313461771e-2); }
//! conductance quantum (in siemens) //! conductance quantum (in siemens)
static eT G_0() { return eT(7.7480917004e-5); } static eT G_0() { return eT(7.7480917004e-5); }
//! Coulomb's constant (in meters per farad) //! Coulomb's constant (in meters per farad)
static eT k_e() { return eT(8.9875517873681764e9); } static eT k_e() { return eT(8.9875517873681764e9); }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 debug.hpp   debug.hpp 
skipping to change at line 22 skipping to change at line 22
// (see http://www.opensource.org/licenses for more info) // (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 = &(std::cout); static std::ostream* stream_err1 = &(ARMA_DEFAULT_OSTREAM);
if(user_stream != NULL) if(user_stream != NULL)
{ {
stream_err1 = user_stream; stream_err1 = user_stream;
} }
return *stream_err1; return *stream_err1;
} }
template<typename T> template<typename T>
inline inline
std::ostream& std::ostream&
arma_stream_err2(std::ostream* user_stream) arma_stream_err2(std::ostream* user_stream)
{ {
static std::ostream* stream_err2 = &(std::cout); static std::ostream* stream_err2 = &(ARMA_DEFAULT_OSTREAM);
if(user_stream != NULL) if(user_stream != NULL)
{ {
stream_err2 = user_stream; stream_err2 = user_stream;
} }
return *stream_err2; return *stream_err2;
} }
inline inline
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 field_meat.hpp   field_meat.hpp 
skipping to change at line 551 skipping to change at line 551
template<typename oT> template<typename oT>
inline inline
void void
field<oT>::print(const std::string extra_text) const field<oT>::print(const std::string extra_text) const
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(extra_text.length() != 0) if(extra_text.length() != 0)
{ {
const std::streamsize orig_width = cout.width(); const std::streamsize orig_width = ARMA_DEFAULT_OSTREAM.width();
cout << extra_text << '\n'; ARMA_DEFAULT_OSTREAM << extra_text << '\n';
cout.width(orig_width); ARMA_DEFAULT_OSTREAM.width(orig_width);
} }
arma_ostream::print(cout, *this); arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this);
} }
//! print contents of the field to a user specified stream, //! print contents of the field to a user specified stream,
//! optionally preceding with a user specified line of text. //! optionally preceding with a user specified line of text.
//! the field class preserves the stream's flags //! the field class preserves the stream's flags
//! but the associated operator<< function for type oT //! but the associated operator<< function for type oT
//! may still modify the stream's parameters. //! may still modify the stream's parameters.
//! NOTE: this function assumes that type oT can be printed, //! NOTE: this function assumes that type oT can be printed,
//! i.e. the function "std::ostream& operator<< (std::ostream&, const oT&)" //! i.e. the function "std::ostream& operator<< (std::ostream&, const oT&)"
//! has been defined. //! has been defined.
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 fn_trans.hpp   fn_trans.hpp 
skipping to change at line 40 skipping to change at line 40
trans(const Op<T1, op_htrans>& X) trans(const Op<T1, op_htrans>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_extra_debug_print("trans(): removing op_htrans"); arma_extra_debug_print("trans(): removing op_htrans");
return X.m; return X.m;
} }
template<typename T1> template<typename T1>
arma_inline arma_inline
arma_deprecated
const Op<T1, op_htrans> const Op<T1, op_htrans>
htrans(const Base<typename T1::elem_type,T1>& X) htrans(const Base<typename T1::elem_type,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return Op<T1, op_htrans>(X.get_ref()); return Op<T1, op_htrans>(X.get_ref());
} }
//! two consecutive hermitian transpose operations cancel each other //! two consecutive hermitian transpose operations cancel each other
template<typename T1> template<typename T1>
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 glue_relational_meat.hpp   glue_relational_meat.hpp 
// Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This file is part of the Armadillo C++ library.
// It is provided without any warranty of fitness // It is provided without any warranty of fitness
// for any purpose. You can redistribute this file // for any purpose. You can redistribute this file
// and/or modify it under the terms of the GNU // and/or modify it under the terms of the GNU
// Lesser General Public License (LGPL) as published // Lesser General Public License (LGPL) as published
// by the Free Software Foundation, either version 3 // by the Free Software Foundation, either version 3
// of the License or (at your option) any later version. // of the License or (at your option) any later version.
// (see http://www.opensource.org/licenses for more info) // (see http://www.opensource.org/licenses for more info)
skipping to change at line 29 skipping to change at line 29
#undef arma_applier_mat #undef arma_applier_mat
#undef arma_applier_cube #undef arma_applier_cube
#define arma_applier_mat(operator_rel, operator_str) \ #define arma_applier_mat(operator_rel, operator_str) \
{\ {\
const Proxy<T1> P1(X.A);\ const Proxy<T1> P1(X.A);\
const Proxy<T2> P2(X.B);\ const Proxy<T2> P2(X.B);\
\ \
arma_debug_assert_same_size(P1, P2, operator_str);\ arma_debug_assert_same_size(P1, P2, operator_str);\
\ \
const uword n_rows = P1.get_n_rows();\ const bool bad_alias = (Proxy<T1>::has_subview && P1.is_alias(out)) || (P
const uword n_cols = P1.get_n_cols();\ roxy<T2>::has_subview && P2.is_alias(out));\
\ \
out.set_size(n_rows, n_cols);\ if(bad_alias == false)\
\
uword* out_mem = out.memptr();\
\
const bool prefer_at_accessor = (Proxy<T1>::prefer_at_accessor || Proxy<T
2>::prefer_at_accessor);\
\
if(prefer_at_accessor == false)\
{\ {\
typename Proxy<T1>::ea_type A = P1.get_ea();\
typename Proxy<T2>::ea_type B = P2.get_ea();\
\ \
const uword n_elem = out.n_elem;\ const uword n_rows = P1.get_n_rows();\
const uword n_cols = P1.get_n_cols();\
\
out.set_size(n_rows, n_cols);\
\ \
for(uword i=0; i<n_elem; ++i)\ uword* out_mem = out.memptr();\
\
const bool prefer_at_accessor = (Proxy<T1>::prefer_at_accessor || Proxy
<T2>::prefer_at_accessor);\
\
if(prefer_at_accessor == false)\
{\ {\
out_mem[i] = (A[i] operator_rel B[i]) ? uword(1) : uword(0);\ typename Proxy<T1>::ea_type A = P1.get_ea();\
typename Proxy<T2>::ea_type B = P2.get_ea();\
\
const uword n_elem = out.n_elem;\
\
for(uword i=0; i<n_elem; ++i)\
{\
out_mem[i] = (A[i] operator_rel B[i]) ? uword(1) : uword(0);\
}\
}\ }\
}\ else\
else\
{\
uword count = 0;\
\
for(uword col=0; col<n_cols; ++col)\
{\ {\
uword count = 0;\
\
for(uword col=0; col<n_cols; ++col)\
for(uword row=0; row<n_rows; ++row, ++count)\ for(uword row=0; row<n_rows; ++row, ++count)\
{\ {\
out_mem[count] = (P1.at(row,col) operator_rel P2.at(row,col)) ? uwo rd(1) : uword(0);\ out_mem[count] = (P1.at(row,col) operator_rel P2.at(row,col)) ? uwo rd(1) : uword(0);\
}\ }\
}\ }\
}\ }\
else\
{\
const unwrap<typename Proxy<T1>::stored_type> tmp1(P1.Q);\
const unwrap<typename Proxy<T2>::stored_type> tmp2(P2.Q);\
\
out = (tmp1.M) operator_rel (tmp2.M);\
}\
} }
#define arma_applier_cube(operator_rel, operator_str) \ #define arma_applier_cube(operator_rel, operator_str) \
{\ {\
const ProxyCube<T1> P1(X.A);\ const ProxyCube<T1> P1(X.A);\
const ProxyCube<T2> P2(X.B);\ const ProxyCube<T2> P2(X.B);\
\ \
arma_debug_assert_same_size(P1, P2, operator_str);\ arma_debug_assert_same_size(P1, P2, operator_str);\
\ \
const uword n_rows = P1.get_n_rows();\ const bool bad_alias = (ProxyCube<T1>::has_subview && P1.is_alias(out)) |
const uword n_cols = P1.get_n_cols();\ | (ProxyCube<T2>::has_subview && P2.is_alias(out));\
const uword n_slices = P1.get_n_slices();\
\
out.set_size(n_rows, n_cols, n_slices);\
\
uword* out_mem = out.memptr();\
\
const bool prefer_at_accessor = (ProxyCube<T1>::prefer_at_accessor || Pro
xyCube<T2>::prefer_at_accessor);\
\ \
if(prefer_at_accessor == false)\ if(bad_alias == false)\
{\ {\
typename ProxyCube<T1>::ea_type A = P1.get_ea();\
typename ProxyCube<T2>::ea_type B = P2.get_ea();\
\ \
const uword n_elem = out.n_elem;\ const uword n_rows = P1.get_n_rows();\
const uword n_cols = P1.get_n_cols();\
const uword n_slices = P1.get_n_slices();\
\ \
for(uword i=0; i<n_elem; ++i)\ out.set_size(n_rows, n_cols, n_slices);\
\
uword* out_mem = out.memptr();\
\
const bool prefer_at_accessor = (ProxyCube<T1>::prefer_at_accessor || P
roxyCube<T2>::prefer_at_accessor);\
\
if(prefer_at_accessor == false)\
{\ {\
out_mem[i] = (A[i] operator_rel B[i]) ? uword(1) : uword(0);\ typename ProxyCube<T1>::ea_type A = P1.get_ea();\
typename ProxyCube<T2>::ea_type B = P2.get_ea();\
\
const uword n_elem = out.n_elem;\
\
for(uword i=0; i<n_elem; ++i)\
{\
out_mem[i] = (A[i] operator_rel B[i]) ? uword(1) : uword(0);\
}\
}\
else\
{\
uword count = 0;\
\
for(uword slice = 0; slice < n_slices; ++slice)\
for(uword col = 0; col < n_cols; ++col)\
for(uword row = 0; row < n_rows; ++row, ++count)\
{\
out_mem[count] = (P1.at(row,col,slice) operator_rel P2.at(row,col,s
lice)) ? uword(1) : uword(0);\
}\
}\ }\
}\ }\
else\ else\
{\ {\
uword count = 0;\ const unwrap_cube<typename ProxyCube<T1>::stored_type> tmp1(P1.Q);\
const unwrap_cube<typename ProxyCube<T2>::stored_type> tmp2(P2.Q);\
\ \
for(uword slice = 0; slice < n_slices; ++slice)\ out = (tmp1.M) operator_rel (tmp2.M);\
for(uword col = 0; col < n_cols; ++col)\
for(uword row = 0; row < n_rows; ++row, ++count)\
{\
out_mem[count] = (P1.at(row,col,slice) operator_rel P2.at(row,col,sli
ce)) ? uword(1) : uword(0);\
}\
}\ }\
} }
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
void void
glue_rel_lt::apply glue_rel_lt::apply
( (
Mat <uword>& out, Mat <uword>& out,
const mtGlue<uword, T1, T2, glue_rel_lt>& X const mtGlue<uword, T1, T2, glue_rel_lt>& X
 End of changes. 18 change blocks. 
47 lines changed or deleted 73 lines changed or added


 op_relational_meat.hpp   op_relational_meat.hpp 
// Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2012 NICTA (www.nicta.com.au)
// Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2012 Conrad Sanderson
// //
// This file is part of the Armadillo C++ library. // This file is part of the Armadillo C++ library.
// It is provided without any warranty of fitness // It is provided without any warranty of fitness
// for any purpose. You can redistribute this file // for any purpose. You can redistribute this file
// and/or modify it under the terms of the GNU // and/or modify it under the terms of the GNU
// Lesser General Public License (LGPL) as published // Lesser General Public License (LGPL) as published
// by the Free Software Foundation, either version 3 // by the Free Software Foundation, either version 3
// of the License or (at your option) any later version. // of the License or (at your option) any later version.
// (see http://www.opensource.org/licenses for more info) // (see http://www.opensource.org/licenses for more info)
//! \addtogroup op_relational //! \addtogroup op_relational
//! @{ //! @{
#undef operator_rel
#undef arma_applier_mat_pre
#undef arma_applier_mat_post
#undef arma_applier_cube_pre
#undef arma_applier_cube_post
#define arma_applier_mat_pre(operator_rel) \
{\
typedef typename T1::elem_type eT;\
typedef typename Proxy<T1>::ea_type ea_type;\
\
const eT val = X.aux;\
\
const Proxy<T1> P(X.m);\
\
const uword n_rows = P.get_n_rows();\
const uword n_cols = P.get_n_cols();\
\
const bool bad_alias = ( Proxy<T1>::has_subview && P.is_alias(out) );\
\
if(bad_alias == false)\
{\
out.set_size(n_rows, n_cols);\
\
uword* out_mem = out.memptr();\
\
if(Proxy<T1>::prefer_at_accessor == false)\
{\
ea_type PA = P.get_ea();\
const uword n_elem = out.n_elem;\
\
for(uword i=0; i<n_elem; ++i)\
{\
out_mem[i] = (val operator_rel PA[i]) ? uword(1) : uword(0);\
}\
}\
else\
{\
uword count = 0;\
\
for(uword col=0; col < n_cols; ++col)\
for(uword row=0; row < n_rows; ++row, ++count)\
{\
out_mem[count] = (val operator_rel P.at(row,col)) ? uword(1) : uwor
d(0);\
}\
}\
}\
else\
{\
const unwrap<typename Proxy<T1>::stored_type> tmp(P.Q);\
\
out = (val) operator_rel (tmp.M);\
}\
}
#define arma_applier_mat_post(operator_rel) \
{\
typedef typename T1::elem_type eT;\
typedef typename Proxy<T1>::ea_type ea_type;\
\
const eT val = X.aux;\
\
const Proxy<T1> P(X.m);\
\
const uword n_rows = P.get_n_rows();\
const uword n_cols = P.get_n_cols();\
\
const bool bad_alias = ( Proxy<T1>::has_subview && P.is_alias(out) );\
\
if(bad_alias == false)\
{\
out.set_size(n_rows, n_cols);\
\
uword* out_mem = out.memptr();\
\
if(Proxy<T1>::prefer_at_accessor == false)\
{\
ea_type PA = P.get_ea();\
const uword n_elem = out.n_elem;\
\
for(uword i=0; i<n_elem; ++i)\
{\
out_mem[i] = (PA[i] operator_rel val) ? uword(1) : uword(0);\
}\
}\
else\
{\
uword count = 0;\
\
for(uword col=0; col < n_cols; ++col)\
for(uword row=0; row < n_rows; ++row, ++count)\
{\
out_mem[count] = (P.at(row,col) operator_rel val) ? uword(1) : uwor
d(0);\
}\
}\
}\
else\
{\
const unwrap<typename Proxy<T1>::stored_type> tmp(P.Q);\
\
out = (tmp.M) operator_rel (val);\
}\
}
#define arma_applier_cube_pre(operator_rel) \
{\
typedef typename T1::elem_type eT;\
typedef typename ProxyCube<T1>::ea_type ea_type;\
\
const eT val = X.aux;\
\
const ProxyCube<T1> P(X.m);\
\
const uword n_rows = P.get_n_rows();\
const uword n_cols = P.get_n_cols();\
const uword n_slices = P.get_n_slices();\
\
const bool bad_alias = ( ProxyCube<T1>::has_subview && P.is_alias(out) );
\
\
if(bad_alias == false)\
{\
out.set_size(n_rows, n_cols, n_slices);\
\
uword* out_mem = out.memptr();\
\
if(ProxyCube<T1>::prefer_at_accessor == false)\
{\
ea_type PA = P.get_ea();\
const uword n_elem = out.n_elem;\
\
for(uword i=0; i<n_elem; ++i)\
{\
out_mem[i] = (val operator_rel PA[i]) ? uword(1) : uword(0);\
}\
}\
else\
{\
uword count = 0;\
\
for(uword slice=0; slice < n_slices; ++slice)\
for(uword col=0; col < n_cols; ++col)\
for(uword row=0; row < n_rows; ++row, ++count)\
{\
out_mem[count] = (val operator_rel P.at(row,col,slice)) ? uword(1)
: uword(0);\
}\
}\
}\
else\
{\
const unwrap_cube<typename ProxyCube<T1>::stored_type> tmp(P.Q);\
\
out = (val) operator_rel (tmp.M);\
}\
}
#define arma_applier_cube_post(operator_rel) \
{\
typedef typename T1::elem_type eT;\
typedef typename ProxyCube<T1>::ea_type ea_type;\
\
const eT val = X.aux;\
\
const ProxyCube<T1> P(X.m);\
\
const uword n_rows = P.get_n_rows();\
const uword n_cols = P.get_n_cols();\
const uword n_slices = P.get_n_slices();\
\
const bool bad_alias = ( ProxyCube<T1>::has_subview && P.is_alias(out) );
\
\
if(bad_alias == false)\
{\
out.set_size(n_rows, n_cols, n_slices);\
\
uword* out_mem = out.memptr();\
\
if(ProxyCube<T1>::prefer_at_accessor == false)\
{\
ea_type PA = P.get_ea();\
const uword n_elem = out.n_elem;\
\
for(uword i=0; i<n_elem; ++i)\
{\
out_mem[i] = (PA[i] operator_rel val) ? uword(1) : uword(0);\
}\
}\
else\
{\
uword count = 0;\
\
for(uword slice=0; slice < n_slices; ++slice)\
for(uword col=0; col < n_cols; ++col)\
for(uword row=0; row < n_rows; ++row, ++count)\
{\
out_mem[count] = (P.at(row,col,slice) operator_rel val) ? uword(1)
: uword(0);\
}\
}\
}\
else\
{\
const unwrap_cube<typename ProxyCube<T1>::stored_type> tmp(P.Q);\
\
out = (tmp.M) operator_rel (val);\
}\
}
template<typename T1> template<typename T1>
inline inline
void void
op_rel_lt_pre::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_lt_pre>& X) op_rel_lt_pre::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_lt_pre>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_mat_pre( < );
typedef typename Proxy<T1>::ea_type ea_type;
const Proxy<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols());
const eT val = X.aux;
ea_type A = Y.get_ea();
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (val < A[i]) ? uword(1) : uword(0);
out_mem[j] = (val < A[j]) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (val < A[i]) ? uword(1) : uword(0);
}
} }
template<typename T1> template<typename T1>
inline inline
void void
op_rel_lt_post::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_lt_post >& X) op_rel_gt_pre::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_gt_pre>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_mat_pre( > );
typedef typename Proxy<T1>::ea_type ea_type;
const Proxy<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols());
const eT val = X.aux;
ea_type A = Y.get_ea();
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (A[i] < val) ? uword(1) : uword(0);
out_mem[j] = (A[j] < val) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (A[i] < val) ? uword(1) : uword(0);
}
} }
template<typename T1> template<typename T1>
inline inline
void void
op_rel_gt_pre::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_gt_pre>& X) op_rel_lteq_pre::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_lteq_p re>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_mat_pre( <= );
typedef typename Proxy<T1>::ea_type ea_type;
const Proxy<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols());
const eT val = X.aux;
ea_type A = Y.get_ea();
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (val > A[i]) ? uword(1) : uword(0);
out_mem[j] = (val > A[j]) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (val > A[i]) ? uword(1) : uword(0);
}
} }
template<typename T1> template<typename T1>
inline inline
void void
op_rel_gt_post::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_gt_post >& X) op_rel_gteq_pre::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_gteq_p re>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_mat_pre( >= );
typedef typename Proxy<T1>::ea_type ea_type;
const Proxy<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols());
const eT val = X.aux;
ea_type A = Y.get_ea();
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (A[i] > val) ? uword(1) : uword(0);
out_mem[j] = (A[j] > val) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (A[i] > val) ? uword(1) : uword(0);
}
} }
template<typename T1> template<typename T1>
inline inline
void void
op_rel_lteq_pre::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_lteq_p re>& X) op_rel_lt_post::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_lt_post >& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_mat_post( < );
typedef typename Proxy<T1>::ea_type ea_type;
const Proxy<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols());
const eT val = X.aux;
ea_type A = Y.get_ea();
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (val <= A[i]) ? uword(1) : uword(0);
out_mem[j] = (val <= A[j]) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (val <= A[i]) ? uword(1) : uword(0);
}
} }
template<typename T1> template<typename T1>
inline inline
void void
op_rel_lteq_post::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_lteq_ post>& X) op_rel_gt_post::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_gt_post >& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_mat_post( > );
typedef typename Proxy<T1>::ea_type ea_type;
const Proxy<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols());
const eT val = X.aux;
ea_type A = Y.get_ea();
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (A[i] <= val) ? uword(1) : uword(0);
out_mem[j] = (A[j] <= val) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (A[i] <= val) ? uword(1) : uword(0);
}
} }
template<typename T1> template<typename T1>
inline inline
void void
op_rel_gteq_pre::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_gteq_p re>& X) op_rel_lteq_post::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_lteq_ post>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_mat_post( <= );
typedef typename Proxy<T1>::ea_type ea_type;
const Proxy<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols());
const eT val = X.aux;
ea_type A = Y.get_ea();
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (val >= A[i]) ? uword(1) : uword(0);
out_mem[j] = (val >= A[j]) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (val >= A[i]) ? uword(1) : uword(0);
}
} }
template<typename T1> template<typename T1>
inline inline
void void
op_rel_gteq_post::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_gteq_ post>& X) op_rel_gteq_post::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_gteq_ post>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_mat_post( >= );
typedef typename Proxy<T1>::ea_type ea_type;
const Proxy<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols());
const eT val = X.aux;
ea_type A = Y.get_ea();
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (A[i] >= val) ? uword(1) : uword(0);
out_mem[j] = (A[j] >= val) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (A[i] >= val) ? uword(1) : uword(0);
}
} }
template<typename T1> template<typename T1>
inline inline
void void
op_rel_eq::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_eq>& X) op_rel_eq::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_eq>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_mat_post( == );
typedef typename Proxy<T1>::ea_type ea_type;
const Proxy<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols());
const eT val = X.aux;
ea_type A = Y.get_ea();
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (A[i] == val) ? uword(1) : uword(0);
out_mem[j] = (A[j] == val) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (A[i] == val) ? uword(1) : uword(0);
}
} }
template<typename T1> template<typename T1>
inline inline
void void
op_rel_noteq::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_noteq>& X ) op_rel_noteq::apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_noteq>& X )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_mat_post( != );
typedef typename Proxy<T1>::ea_type ea_type;
const Proxy<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols());
const eT val = X.aux;
ea_type A = Y.get_ea();
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (A[i] != val) ? uword(1) : uword(0);
out_mem[j] = (A[j] != val) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (A[i] != val) ? uword(1) : uword(0);
}
} }
// //
// //
// //
template<typename T1> template<typename T1>
inline inline
void void
op_rel_lt_pre::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_lt_ pre>& X) op_rel_lt_pre::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_lt_ pre>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_cube_pre( < );
typedef typename ProxyCube<T1>::ea_type ea_type;
const ProxyCube<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices());
const eT val = X.aux;
ea_type A = Y.get_ea();
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (val < A[i]) ? uword(1) : uword(0);
out_mem[j] = (val < A[j]) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (val < A[i]) ? uword(1) : uword(0);
}
} }
template<typename T1> template<typename T1>
inline inline
void void
op_rel_lt_post::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_lt _post>& X) op_rel_gt_pre::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_gt_ pre>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_cube_pre( > );
typedef typename ProxyCube<T1>::ea_type ea_type;
const ProxyCube<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices());
const eT val = X.aux;
ea_type A = Y.get_ea();
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (A[i] < val) ? uword(1) : uword(0);
out_mem[j] = (A[j] < val) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (A[i] < val) ? uword(1) : uword(0);
}
} }
template<typename T1> template<typename T1>
inline inline
void void
op_rel_gt_pre::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_gt_ pre>& X) op_rel_lteq_pre::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_l teq_pre>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_cube_pre( <= );
typedef typename ProxyCube<T1>::ea_type ea_type;
const ProxyCube<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices());
const eT val = X.aux;
ea_type A = Y.get_ea();
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (val > A[i]) ? uword(1) : uword(0);
out_mem[j] = (val > A[j]) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (val > A[i]) ? uword(1) : uword(0);
}
} }
template<typename T1> template<typename T1>
inline inline
void void
op_rel_gt_post::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_gt _post>& X) op_rel_gteq_pre::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_g teq_pre>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_cube_pre( >= );
typedef typename ProxyCube<T1>::ea_type ea_type;
const ProxyCube<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices());
const eT val = X.aux;
ea_type A = Y.get_ea();
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (A[i] > val) ? uword(1) : uword(0);
out_mem[j] = (A[j] > val) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (A[i] > val) ? uword(1) : uword(0);
}
} }
template<typename T1> template<typename T1>
inline inline
void void
op_rel_lteq_pre::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_l teq_pre>& X) op_rel_lt_post::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_lt _post>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_cube_post( < );
typedef typename ProxyCube<T1>::ea_type ea_type;
const ProxyCube<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices());
const eT val = X.aux;
ea_type A = Y.get_ea();
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (val <= A[i]) ? uword(1) : uword(0);
out_mem[j] = (val <= A[j]) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (val <= A[i]) ? uword(1) : uword(0);
}
} }
template<typename T1> template<typename T1>
inline inline
void void
op_rel_lteq_post::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_ lteq_post>& X) op_rel_gt_post::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_gt _post>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_cube_post( > );
typedef typename ProxyCube<T1>::ea_type ea_type;
const ProxyCube<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices());
const eT val = X.aux;
ea_type A = Y.get_ea();
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (A[i] <= val) ? uword(1) : uword(0);
out_mem[j] = (A[j] <= val) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (A[i] <= val) ? uword(1) : uword(0);
}
} }
template<typename T1> template<typename T1>
inline inline
void void
op_rel_gteq_pre::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_g teq_pre>& X) op_rel_lteq_post::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_ lteq_post>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_cube_post( <= );
typedef typename ProxyCube<T1>::ea_type ea_type;
const ProxyCube<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices());
const eT val = X.aux;
ea_type A = Y.get_ea();
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (val >= A[i]) ? uword(1) : uword(0);
out_mem[j] = (val >= A[j]) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (val >= A[i]) ? uword(1) : uword(0);
}
} }
template<typename T1> template<typename T1>
inline inline
void void
op_rel_gteq_post::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_ gteq_post>& X) op_rel_gteq_post::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_ gteq_post>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_cube_post( >= );
typedef typename ProxyCube<T1>::ea_type ea_type;
const ProxyCube<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices());
const eT val = X.aux;
ea_type A = Y.get_ea();
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (A[i] >= val) ? uword(1) : uword(0);
out_mem[j] = (A[j] >= val) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (A[i] >= val) ? uword(1) : uword(0);
}
} }
template<typename T1> template<typename T1>
inline inline
void void
op_rel_eq::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_eq>& X) op_rel_eq::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_eq>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_cube_post( == );
typedef typename ProxyCube<T1>::ea_type ea_type;
const ProxyCube<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices());
const eT val = X.aux;
ea_type A = Y.get_ea();
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (A[i] == val) ? uword(1) : uword(0);
out_mem[j] = (A[j] == val) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (A[i] == val) ? uword(1) : uword(0);
}
} }
template<typename T1> template<typename T1>
inline inline
void void
op_rel_noteq::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_note q>& X) op_rel_noteq::apply(Cube<uword>& out, const mtOpCube<uword, T1, op_rel_note q>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; arma_applier_cube_post( != );
typedef typename ProxyCube<T1>::ea_type ea_type; }
const ProxyCube<T1> Y(X.m);
out.set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices()); #undef arma_applier_mat_pre
#undef arma_applier_mat_post
const eT val = X.aux; #undef arma_applier_cube_pre
ea_type A = Y.get_ea(); #undef arma_applier_cube_post
uword* out_mem = out.memptr();
const uword n_elem = out.n_elem;
uword i,j;
for(i=0, j=1; j<n_elem; i+=2, j+=2)
{
out_mem[i] = (A[i] != val) ? uword(1) : uword(0);
out_mem[j] = (A[j] != val) ? uword(1) : uword(0);
}
if(i < n_elem)
{
out_mem[i] = (A[i] != val) ? uword(1) : uword(0);
}
}
//! @} //! @}
 End of changes. 36 change blocks. 
493 lines changed or deleted 253 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/