<p>The boost serialization bit is fairly straightforward... we can use the version information with BOOST_CLASS_VERSION(). The implementation will probably look like this:</p>
<pre><code>template<typename Archive>
void Serialize(Archive& ar, const unsigned int version)
{
...
if (version == 0)
{
// In older versions, the projection tables were stored in a std::vector.
std::vector<arma::mat> tmpProj;
ar & data::CreateNVP(tmpProj, "projections");
projections.set_size(tmpProj[0].n_rows, tmpProj[0].n_cols, tmpProj.size());
for (size_t i = 0; i < tmpProj.size(); ++i)
projections.slice(i) = tmpProj[i];
}
else
{
ar & data::CreateNVP(projections, "projections");
}
...
}
</code></pre>
<p>And then you will have to set the class version number which you would normally do with <code>BOOST_CLASS_VERSION(LSHSearch, 1);</code> but this is a template class and the macro does not work with the template class so we have to use the expansion of the macro.</p>
<p>I wonder why Travis is not building this PR anymore? If it compiles and the LSH tests pass on your system I am fine with that, no need for Travis.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/663#issuecomment-222992904">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFOV6lZcinRPVPjRjGG1cjiAST5yxks5qHYnmgaJpZM4Iq6tl">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFN69DYdtymxL9phScIDrfJuDv-U4ks5qHYnmgaJpZM4Iq6tl.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/mlpack/mlpack/pull/663#issuecomment-222992904"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>