61 template<
class E,
class T,
class VE>
63 std::basic_ostream<E, T> &operator << (std::basic_ostream<E, T> &os,
64 const vector_expression<VE, cpu_tag> &vec) {
65 auto&& v = eval_block(vec);
66 typedef typename VE::size_type size_type;
67 size_type size = v.size ();
68 std::basic_ostringstream<E, T, std::allocator<E> > s;
69 s.flags (os.flags ());
70 s.imbue (os.getloc ());
71 s.precision (os.precision ());
72 s <<
'[' << size <<
"](";
75 for (size_type i = 1; i < size; ++ i)
78 return os << s.str ().c_str ();
104 template<
class E,
class T,
class ME>
106 std::basic_ostream<E, T> &operator << (std::basic_ostream<E, T> &os,
107 const matrix_expression<ME, cpu_tag> &mat) {
108 auto&& m=eval_block(mat);
109 typedef typename ME::size_type size_type;
110 size_type size1 = m.size1 ();
111 size_type size2 = m.size2 ();
112 std::basic_ostringstream<E, T, std::allocator<E> > s;
113 s.flags (os.flags ());
114 s.imbue (os.getloc ());
115 s.precision (os.precision ());
116 s <<
'[' << size1 <<
',' << size2 <<
"](";
121 for (size_type j = 1; j < size2; ++ j)
125 for (size_type i = 1; i < size1; ++ i) {
129 for (size_type j = 1; j < size2; ++ j)
134 return os << s.str().c_str ();