I made the following changes:<br>
(a) removed circular reference in optimizer as in<br>
`LinearLayer::LinearLayer: optimizer(*this)`<br>
to<br>
`LinearLayer::LinearLayer: optimizer()&#39;<br>
<br>
(b) removed  Law of Demeter violations as in<br>
`t.Optimizer().Reset()` to<br>
`t.ResetOptimizer()`<br>
<br>
`t.Optimizer().Update()` to<br>
`t.UpdateOptimizer()`<br>
<br>
`t.Optimizer().Optimize();` to<br>
`t.OPtimize()`<br>
<br>
<br>
(c) change optimizer from pointer to shared pointer (TODO: make Optimizer a<br>
member variable)<br>
<br>
(d) Implemented copy ctor on top of all this.<br>
<br>
(e) Added a few unit tests for copy ctor<br>
<br>
(d) All the unit tests except for a couple unrelated to ANN ran to success<br>
<br>
The result is in https://github.com/theSundayProgrammer/mlpack<br>
<br>
<br>
<br>
<br>
<br>
My changes are in<br>
<br>
On Sat, Jan 30, 2016 at 6:40 AM, stereomatchingkiss &lt;<br>
notifications@github.com&gt; wrote:<br>
<br>
&gt; I added move constructor and move assignment on most of the layers in the<br>
&gt; pull request of #451 &lt;https://github.com/mlpack/mlpack/pull/451&gt;.<br>
&gt; I also change the reference of the output layer of FFN to non-reference<br>
&gt; type, it would be very easy to implement move constructor and move<br>
&gt; assignment for the FFN after #451<br>
&gt; &lt;https://github.com/mlpack/mlpack/pull/451&gt; is merged.<br>
&gt;<br>
&gt; —<br>
&gt; Reply to this email directly or view it on GitHub<br>
&gt; &lt;https://github.com/mlpack/mlpack/issues/510#issuecomment-176933500&gt;.<br>
&gt;<br>
<br>
<br>
<br>
-- <br>
Joseph Chakravarti Mariadassou<br>
http://thesundayprogrammer.com<br>


<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/510#issuecomment-177280888">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFNhtvvsLYXXjY52bJRX8qeOrM7Paks5pfQYIgaJpZM4HOq_n.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/510#issuecomment-177280888"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>