<p>Hi there,</p>
<p>This is because the mlpack code style uses capitalized function names. So we built an adapter to use boost::serialization but at this time there is not one for cereal. You could use it like this...</p>
<pre><code>boost::archive::xml_oarchive oa(...);
mlpack::gmm::GMM<> gmm(...);
oa << mlpack::data::CreateNVP(gmm, "gmm");
</code></pre>
<p>So, basically, use <code>mlpack::data::CreateNVP()</code> to pass to <code>boost::serialization</code> (and maybe cereal? I don't know if that will work) instead of passing the object directly.</p>
<p>If you are interested in the way this works, take a look at <code>src/mlpack/core/data/serialization_shim.hpp</code>, but be warned, that is probably the most complex C++ in the whole library.</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 or <a href="https://github.com/mlpack/mlpack/issues/644#issuecomment-221276059">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFKH-jTI4r3hZyaECjaTskth1tndJks5qEwJagaJpZM4IlWxP.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/issues/644#issuecomment-221276059"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>