$search
00001 // Copyright (C) 2008-2011 NICTA (www.nicta.com.au) 00002 // Copyright (C) 2008-2011 Conrad Sanderson 00003 // 00004 // This file is part of the Armadillo C++ library. 00005 // It is provided without any warranty of fitness 00006 // for any purpose. You can redistribute this file 00007 // and/or modify it under the terms of the GNU 00008 // Lesser General Public License (LGPL) as published 00009 // by the Free Software Foundation, either version 3 00010 // of the License or (at your option) any later version. 00011 // (see http://www.opensource.org/licenses for more info) 00012 00013 00016 00017 00018 00019 template<typename elem_type, typename derived> 00020 arma_inline 00021 const derived& 00022 BaseCube<elem_type,derived>::get_ref() const 00023 { 00024 return static_cast<const derived&>(*this); 00025 } 00026 00027 00028 00029 template<typename elem_type, typename derived> 00030 inline 00031 void 00032 BaseCube<elem_type,derived>::print(const std::string extra_text) const 00033 { 00034 const unwrap_cube<derived> tmp( (*this).get_ref() ); 00035 00036 tmp.M.impl_print(extra_text); 00037 } 00038 00039 00040 00041 template<typename elem_type, typename derived> 00042 inline 00043 void 00044 BaseCube<elem_type,derived>::print(std::ostream& user_stream, const std::string extra_text) const 00045 { 00046 const unwrap_cube<derived> tmp( (*this).get_ref() ); 00047 00048 tmp.M.impl_print(user_stream, extra_text); 00049 } 00050 00051 00052 00053 template<typename elem_type, typename derived> 00054 inline 00055 void 00056 BaseCube<elem_type,derived>::raw_print(const std::string extra_text) const 00057 { 00058 const unwrap_cube<derived> tmp( (*this).get_ref() ); 00059 00060 tmp.M.impl_raw_print(extra_text); 00061 } 00062 00063 00064 00065 template<typename elem_type, typename derived> 00066 inline 00067 void 00068 BaseCube<elem_type,derived>::raw_print(std::ostream& user_stream, const std::string extra_text) const 00069 { 00070 const unwrap_cube<derived> tmp( (*this).get_ref() ); 00071 00072 tmp.M.impl_raw_print(user_stream, extra_text); 00073 } 00074 00075 00076