#include #include #include #include #include #include #include namespace boost { namespace serialization { template struct implementation_level > { typedef mpl::integral_c_tag tag; // typedef mpl::int_ type; typedef mpl::int_ type; BOOST_STATIC_CONSTANT( int, value = implementation_level::type::value ); }; template struct tracking_level > { typedef mpl::integral_c_tag tag; typedef mpl::int_ type; BOOST_STATIC_CONSTANT( int, value = tracking_level::type::value ); }; } } namespace boost { namespace serialization { template inline void serialize (Archive &ar, std::complex& z, const unsigned int file_version) { ar & boost::serialization::make_nvp ("real", real(z)); ar & boost::serialization::make_nvp ("imag", imag(z)); // ar & real(z); // ar & imag(z); } } } namespace boost { namespace serialization { template struct implementation_level > { typedef mpl::integral_c_tag tag; // typedef mpl::int_ type; typedef mpl::int_ type; BOOST_STATIC_CONSTANT( int, value = implementation_level::type::value ); }; } } template inline void save (Archive &ar, const boost::numeric::ublas::vector &v, const unsigned int) { unsigned int count = v.size(); ar << BOOST_SERIALIZATION_NVP (count); typename boost::numeric::ublas::vector::const_iterator it = v.begin(); while (count-- > 0) { ar << boost::serialization::make_nvp ("item", *it++); } } template inline void load (Archive &ar, boost::numeric::ublas::vector &v, const unsigned int) { unsigned int count; ar >> BOOST_SERIALIZATION_NVP (count); v.resize (count); typename boost::numeric::ublas::vector::iterator it = v.begin(); while (count-- > 0) { ar >> boost::serialization::make_nvp ("item", *it++); } } namespace boost { namespace serialization { template inline void serialize (Archive &ar, boost::numeric::ublas::vector& v, const unsigned int file_version) { boost::serialization::split_free (ar, v, file_version); } } }