message: use norm instead of dot product in CG
diff: @@ -79,18 +79,19 @@ where
  }
  }
  +// + ArgminDot<P, f64>,
  impl<P, O> Solver<O> for ConjugateGradient<P>
  where
  O: ArgminOp<Param = P, Output = P>,
  P: Clone
  + Serialize
  + DeserializeOwned
  - + ArgminSub<P, P>
  + ArgminDot<P, f64>
  + + ArgminSub<P, P>
  + ArgminScaledAdd<P, f64, P>
  + ArgminAdd<P, P>
  - + ArgminMul<f64, P>
  - + ArgminDot<P, f64>,
  + + ArgminNorm<f64>
  + + ArgminMul<f64, P>,
  {
  const NAME: &'static str = "Conjugate Gradient";
  @@ -104,7 +105,8 @@ where
  let r0 = self.b.sub(&ap).mul(&(-1.0));
  self.r = r0.clone();
  self.p = r0.mul(&(-1.0));
  - self.rtr = self.r.dot(&self.r);
  + self.rtr = self.r.norm().powi(2);
  + // self.rtr = self.r.dot(&self.r);
  Ok(None)
  }
  @@ -119,11 +121,13 @@ where
  self.alpha = self.rtr / self.p.dot(&apk);
  let new_param = state.get_param().scaled_add(&self.alpha, &self.p);
  self.r = self.r.scaled_add(&self.alpha, &apk);
  - let rtr_n = self.r.dot(&self.r);
  + let rtr_n = self.r.norm().powi(2);
  + // let rtr_n = self.r.dot(&self.r);
  self.beta = rtr_n / self.rtr;
  self.rtr = rtr_n;
  self.p = self.r.mul(&(-1.0)).scaled_add(&self.beta, &self.p);
  - let norm = self.r.dot(&self.r);
  + // let norm = self.r.dot(&self.r);
  + let norm = self.r.norm().powi(2);
  Ok(ArgminIterData::new()
  .param(new_param)
  