title: pass parameters of double but get Jet<double,6>when using ceres solver
body: <p>I'm a new learner to Ceres Solver, when adding the residualblock using </p>
  
  <pre><code>problem.AddResidualBlock( new ceres::AutoDiffCostFunction&lt;Opt, 1, 6&gt; (new Opt(Pts[i][j].x, Pts[i][j].y, Pts[i][j].z, Ns[i].at&lt;double&gt;(0, 0), Ns[i].at&lt;double&gt;(1, 0), Ns[i].at&lt;double&gt;(2, 0), Ds[i], weights[i]) ),
                        NULL,
                                param );
  </code></pre>
  
  <p>where param is double[6];</p>
  
  <pre><code>struct Opt
  {
  const double ptX, ptY, ptZ, nsX, nsY, nsZ, ds, w;
  
  Opt( double ptx, double pty, double ptz, double nsx, double nsy, double nsz, double ds1, double w1):
           ptX(ptx), ptY(pty), ptZ(ptz), nsX(nsx), nsY(nsy), nsZ(nsz), ds(ds1), w(w1) {}
  
  template&lt;typename T&gt;
  bool operator()(const T* const x, T* residual) const
  {
      Mat R(3, 3, CV_64F), r(1, 3, CV_64F);
      Mat inverse(3,3, CV_64F);
      T newP[3];
      T xyz[3];
          for (int i = 0; i &lt; 3; i++){
              r.at&lt;T&gt;(i) = T(x[i]);
              cout&lt;&lt;x[i]&lt;&lt;endl;
              }
      Rodrigues(r, R);
      inverse = R.inv();
      newP[0]=T(ptX)-x[3];
      newP[1]=T(ptY)-x[4];
      newP[2]=T(ptZ)-x[5];
      xyz[0]= inverse.at&lt;T&gt;(0, 0)*newP[0] + inverse.at&lt;T&gt;(0, 1)*newP[1] + inverse.at&lt;T&gt;(0, 2)*newP[2];
      xyz[1] = inverse.at&lt;T&gt;(1, 0)*newP[0] + inverse.at&lt;T&gt;(1, 1)*newP[1] + inverse.at&lt;T&gt;(1, 2)*newP[2];
      xyz[2] = inverse.at&lt;T&gt;(2, 0)*newP[0] + inverse.at&lt;T&gt;(2, 1)*newP[1] + inverse.at&lt;T&gt;(2, 2)*newP[2];
      T ds1 = T(nsX) * xyz[0] + T(nsY) * xyz[1] + T(nsZ) * xyz[2];
      residual[0] = (ds1 - T(ds)) * T(w);
  }
  };
  </code></pre>
  
  <p>but when I output the x[0], I got this:</p>
  
  <pre><code>[-1.40926 ; 1, 0, 0, 0, 0, 0]
  </code></pre>
  
  <p>after I change the type of the x to double</p>
  
  <p>I got this error :</p>
  
  <pre><code>note:   no known conversion for argument 1 from ‘const ceres::Jet&lt;double, 6&gt;* const’ to ‘const double*’
  </code></pre>
  
  <p>in </p>
  
  <pre><code>bool operator()(const double* const x, double* residual) const
  </code></pre>
  
  <p>what's wrong with my codes?
  Thanks a lot!</p>