2 #ifndef vnl_io_sym_matrix_hxx_ 3 #define vnl_io_sym_matrix_hxx_ 9 #include <vsl/vsl_b_read_block_old.h> 10 #include <vsl/vsl_block_binary.h> 11 #include <vsl/vsl_indent.h> 18 constexpr
short version_no = 2;
56 std::cerr <<
"I/O ERROR: vsl_b_read(vsl_b_istream&, vnl_sym_matrix<T>&)\n" 57 <<
" Unknown version number "<<
v <<
'\n';
58 is.is().clear(std::ios::badbit);
68 os<<
"Size: "<<p.
rows()<<
" x "<<p.
cols()<<std::endl;
76 for (
unsigned int i=0;i<n;i++)
78 os<<vsl_indent()<<
" (";
80 for (
unsigned int j=0; j<=i; j++)
84 if (p.
rows()>n) os <<vsl_indent()<<
" (...\n";
89 #define VNL_IO_SYM_MATRIX_INSTANTIATE(T) \ 90 template VNL_EXPORT void vsl_print_summary(std::ostream &, const vnl_sym_matrix<T > &); \ 91 template VNL_EXPORT void vsl_b_read(vsl_b_istream &, vnl_sym_matrix<T > &); \ 92 template VNL_EXPORT void vsl_b_write(vsl_b_ostream &, const vnl_sym_matrix<T > &) 94 #endif // vnl_io_sym_matrix_hxx_ void vsl_print_summary(std::ostream &os, vnl_bignum const &b)
Print human readable summary of object to a stream.
unsigned int cols() const
Return the number of columns.
Contains class for symmetric matrices.
unsigned int rows() const
Return the number of rows.
unsigned int size() const
Return the total number of elements stored by the matrix.
void vsl_b_read(vsl_b_istream &is, vnl_bignum &v)
Binary load vnl_bignum from stream.
void vsl_b_write(vsl_b_ostream &os, vnl_bignum const &v)
Binary save vnl_bignum to stream.
void set_size(int n)
Resize matrix to n by n.
T * data_block()
Return pointer to the lower triangular elements as a contiguous 1D C array;.
stores a symmetric matrix as just the diagonal and lower triangular part.