ostream_field.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 template<typename T1>
00024 inline
00025 std::ostream&
00026 operator<< (std::ostream& o, const field<T1>& X)
00027 {
00028 arma_extra_debug_sigprint();
00029
00030 for(u32 col=0; col<X.n_cols; ++col)
00031 {
00032 o << "[field column " << col << ']' << '\n';
00033 for(u32 row=0; row<X.n_rows; ++row)
00034 {
00035 o << X.at(row,col) << '\n';
00036 }
00037
00038 o << '\n';
00039 }
00040
00041 o.flush();
00042
00043 return o;
00044 }
00045
00046
00047
00048
00049
00050
00051 template<typename T1>
00052 inline
00053 std::ostream&
00054 operator<< (std::ostream& o, const subview_field<T1>& X)
00055 {
00056 arma_extra_debug_sigprint();
00057
00058 for(u32 col=0; col<X.n_cols; ++col)
00059 {
00060 for(u32 row=0; row<X.n_rows; ++row)
00061 {
00062 o << X.at(row,col) << '\n';
00063 }
00064
00065 o << '\n';
00066 }
00067
00068 o.flush();
00069
00070 return o;
00071 }
00072
00073
00074
00075