core/vbl/vbl_array_2d.txx
Go to the documentation of this file.
00001 // This is core/vbl/vbl_array_2d.txx
00002 #ifndef vbl_array_2d_txx_
00003 #define vbl_array_2d_txx_
00004 
00005 #include "vbl_array_2d.h"
00006 
00007 #include <vcl_iostream.h>
00008 
00009 template<class T>
00010 vcl_ostream& operator<<(vcl_ostream &os, vbl_array_2d<T> const &array)
00011 {
00012   typedef typename vbl_array_2d<T>::size_type size_type;
00013   os << "vbl_array_2d [";
00014   for ( size_type i=0; i< array.rows(); i++)
00015   {
00016     os << vcl_endl << "   ";
00017     for ( size_type j=0; j< array.columns(); j++)
00018       os << ' ' << array(i,j);
00019   }
00020   os << "\n             ]" << vcl_endl;
00021 
00022   return os;
00023 }
00024 
00025 #undef VBL_ARRAY_2D_INSTANTIATE
00026 #define VBL_ARRAY_2D_INSTANTIATE(type) \
00027 template class vbl_array_2d<type >;\
00028 template vcl_ostream& operator<< (vcl_ostream& , vbl_array_2d<type > const& )
00029 
00030 #endif // vbl_array_2d_txx_