Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2007-01-02 15:12:46


Hello,

attached are patches that add support of the boost serialization tools
to (un)bounded array, dense vector and dense matrix types. Please have
a look at the provided example program. Writing into and restoring from
an archive is now easy:

    CONTAINER const & const_x(x);
    std::ofstream ofs(fname, std::ios::trunc);
    boost::archive::text_oarchive oa(ofs);
    
    oa & const_x; // this works only with const types

and

    CONTAINER y;
    std::ifstream ifs(fname, std::ios::in);
    boost::archive::text_iarchive ia(ifs);
    
    ia & y;

The patch adds serialization to the types:
bounded_array, unbounded_array, c_array (storage.hpp)
vector, c_vector (vector.hpp)
matrix, vector_of_vector, c_matrix (matrix.hpp)

HTH
Gunter