2 #ifndef vnl_io_vector_hxx_ 3 #define vnl_io_vector_hxx_ 8 #include <vsl/vsl_binary_io.h> 9 #include <vsl/vsl_b_read_block_old.h> 10 #include <vsl/vsl_block_binary.h> 17 constexpr
short io_version_no = 2;
21 vsl_block_binary_write(os, p.
begin(), p.
size());
51 std::cerr <<
"I/O ERROR: vsl_b_read(vsl_b_istream&, vnl_vector<T>&)\n" 52 <<
" Unknown version number "<< ver <<
'\n';
53 is.is().clear(std::ios::badbit);
63 os<<
"Len: "<<p.
size()<<
" (";
64 for (
unsigned int i =0; i < p.
size() && i < 5; ++i )
65 os << p.operator()(i) <<
' ';
66 if (p.
size() > 5) os <<
" ...";
70 #define VNL_IO_VECTOR_INSTANTIATE(T) \ 71 template VNL_EXPORT void vsl_print_summary(std::ostream &, const vnl_vector<T > &); \ 72 template VNL_EXPORT void vsl_b_read(vsl_b_istream &, vnl_vector<T > &); \ 73 template VNL_EXPORT void vsl_b_write(vsl_b_ostream &, const vnl_vector<T > &) 75 #endif // vnl_io_vector_hxx_ void vsl_print_summary(std::ostream &os, vnl_bignum const &b)
Print human readable summary of object to a stream.
bool set_size(size_t n)
Resize to n elements.
size_t size() const
Return the length, number of elements, dimension of this vector.
T const * data_block() const
Access the contiguous block storing the elements in the vector. O(1).
iterator begin()
Iterator pointing to start of data.
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.
Mathematical vector class, templated by type of element.