// SPDX-License-Identifier: Apache-2.0 // // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au) // Copyright 2008-2016 National ICT Australia (NICTA) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // ------------------------------------------------------------------------ //! \addtogroup subview_cube_each //! @{ template class subview_cube_each_common { public: const Cube& P; template inline void check_size(const Mat& A) const; protected: arma_inline subview_cube_each_common(const Cube& in_p); inline subview_cube_each_common() = delete; template arma_cold inline const std::string incompat_size_string(const Mat& A) const; }; template class subview_cube_each1 : public subview_cube_each_common { protected: arma_inline subview_cube_each1(const Cube& in_p); inline subview_cube_each1() = delete; public: inline ~subview_cube_each1(); // deliberately returning void template inline void operator= (const Base& x); template inline void operator+= (const Base& x); template inline void operator-= (const Base& x); template inline void operator%= (const Base& x); template inline void operator/= (const Base& x); template inline void operator*= (const Base& x); friend class Cube; }; template class subview_cube_each2 : public subview_cube_each_common { protected: inline subview_cube_each2(const Cube& in_p, const Base& in_indices); inline subview_cube_each2() = delete; public: const Base& base_indices; inline void check_indices(const Mat& indices) const; inline ~subview_cube_each2(); // deliberately returning void template inline void operator= (const Base& x); template inline void operator+= (const Base& x); template inline void operator-= (const Base& x); template inline void operator%= (const Base& x); template inline void operator/= (const Base& x); friend class Cube; }; class subview_cube_each1_aux { public: template static inline Cube operator_plus(const subview_cube_each1& X, const Base& Y); template static inline Cube operator_minus(const subview_cube_each1& X, const Base& Y); template static inline Cube operator_minus(const Base& X, const subview_cube_each1& Y); template static inline Cube operator_schur(const subview_cube_each1& X, const Base& Y); template static inline Cube operator_div(const subview_cube_each1& X,const Base& Y); template static inline Cube operator_div(const Base& X, const subview_cube_each1& Y); template static inline Cube operator_times(const subview_cube_each1& X,const Base& Y); template static inline Cube operator_times(const Base& X, const subview_cube_each1& Y); }; class subview_cube_each2_aux { public: template static inline Cube operator_plus(const subview_cube_each2& X, const Base& Y); template static inline Cube operator_minus(const subview_cube_each2& X, const Base& Y); template static inline Cube operator_minus(const Base& X, const subview_cube_each2& Y); template static inline Cube operator_schur(const subview_cube_each2& X, const Base& Y); template static inline Cube operator_div(const subview_cube_each2& X, const Base& Y); template static inline Cube operator_div(const Base& X, const subview_cube_each2& Y); // TODO: operator_times }; //! @}