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   for ( size_type i=0; i< array.rows(); i++)
00014   {
00015     for ( size_type j=0; j< array.columns(); j++)
00016       os << array(i,j) << ' ';
00017 
00018     os << vcl_endl;
00019   }
00020 
00021   return os;
00022 }
00023 
00024 #undef VBL_ARRAY_2D_INSTANTIATE
00025 #define VBL_ARRAY_2D_INSTANTIATE(type) \
00026 template class vbl_array_2d<type >;\
00027 template vcl_ostream& operator<< (vcl_ostream& , vbl_array_2d<type > const& )
00028 
00029 #endif // vbl_array_2d_txx_