<blockquote>
<p>I wanted to reuse the codes of the overloads, but</p>
</blockquote>

<p>I think we could ask the users to copy the input before they passed the output into the api, like I mentioned before</p>

<pre><code>CustomImputation&lt;double&gt; customStrategy(99); // convert missing vals to 99.
  Imputer&lt;double,
          DatasetMapper&lt;MissingPolicy&gt;,
          CustomImputation&lt;double&gt;&gt; imputer(info, customStrategy);
  output = input;
  imputer.Impute(input, output, "a", 0); // convert a -&gt; 99 for dimension 0
</code></pre>

<p>But this solution makes the api with output looks quite dumb, why not just use</p>

<pre><code>output = input;
imputer.Impute(output , "a", 0); // convert a -&gt; 99 for dimension 0
</code></pre>

<p>If we want to make the api with output become efficient, we need to ask the user to copy the input into the output, but this make the api become less intuitive.</p>

<p>In this case, why not just remove the api with the output?This make the api of imputer families become less confuse, user would always choose the efficient api, if they need a copy ,the will know they need to create one before they pass into the api.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<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/694#issuecomment-234619169">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJ4bFLJLrmSdPII9ESWxgNTdQy1XJOEdks5qYQrngaJpZM4I07W-">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFAsKdF9Xtn9f3nPPk-rwb0aabfIfks5qYQrngaJpZM4I07W-.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/694#issuecomment-234619169"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>