#include #include #include #include #include #include #include int main(int argc, char** argv[]) { boost::numeric::ublas::matrix mat; boost::numeric::ublas::identity_matrix identity(3); std::string buffer; std::ostringstream oss(buffer); oss << identity; std::cout << "Serialized identity matrix: '" << oss.str() << "'" << std::endl; std::istringstream iss(oss.str()); std::cout << "Matrix mat before stream extraction: " << mat << std::endl; iss >> mat; std::cout << "Matrix mat after stream extraction: " << mat << std::endl; return 0; }