Go to the documentation of this file.00001
00002 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00003 #pragma implementation
00004 #endif
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "vnl_int_matrix.h"
00015 #include <vcl_fstream.h>
00016
00017
00018
00019 vnl_int_matrix::vnl_int_matrix(const vnl_matrix<double>& d):
00020 Base(d.rows(), d.columns())
00021 {
00022 unsigned m = d.rows();
00023 unsigned n = d.columns();
00024
00025 for (unsigned i = 0; i < m; ++i)
00026 for (unsigned j = 0; j < n; ++j)
00027 (*this)(i,j) = (int)d(i,j);
00028 }
00029
00030
00031 vnl_int_matrix::vnl_int_matrix(char const* filename)
00032 {
00033 vcl_ifstream s(filename);
00034 read_ascii(s);
00035 }