message: Remove ArgminOp impl and new_from_wrapper method from OpWrapper
diff: @@ -12,7 +12,7 @@ use std::default::Default;
  /// This wraps an operator and keeps track of how often the cost, gradient and Hessian have been
  /// computed and how often the modify function has been called. Usually, this is an implementation
  /// detail unless a solver is needed within another solver (such as a line search within a gradient
  -/// descent method), then it may be necessary to wrap the operator in an OpWrapper.
  +/// descent method).
  #[derive(Serialize, Deserialize, Clone, Debug, Default)]
  pub struct OpWrapper<O: ArgminOp> {
  /// Operator
  @@ -30,7 +30,7 @@ pub struct OpWrapper<O: ArgminOp> {
  }
  impl<O: ArgminOp> OpWrapper<O> {
  - /// Constructor
  + /// Construct an `OpWrapper` from an operator
  pub fn new(op: O) -> Self {
  OpWrapper {
  op: Some(op),
  @@ -42,19 +42,6 @@ impl<O: ArgminOp> OpWrapper<O> {
  }
  }
  - /// Construct struct from other `OpWrapper`. Takes the operator from `op` (replaces it with
  - /// `None`) and crates a new `OpWrapper`
  - pub fn new_from_wrapper(op: &mut OpWrapper<O>) -> Self {
  - OpWrapper {
  - op: op.take_op(),
  - cost_func_count: 0,
  - grad_func_count: 0,
  - hessian_func_count: 0,
  - jacobian_func_count: 0,
  - modify_func_count: 0,
  - }
  - }
  -
  /// Calls the `apply` method of `op` and increments `cost_func_count`.
  pub fn apply(&mut self, param: &O::Param) -> Result<O::Output, Error> {
  self.cost_func_count += 1;
  @@ -125,32 +112,3 @@ impl<O: ArgminOp> OpWrapper<O> {
  self.op.unwrap()
  }
  }
  -
  -/// The OpWrapper<O> should behave just like any other `ArgminOp`
  -impl<O: ArgminOp> ArgminOp for OpWrapper<O> {
  - type Param = O::Param;
  - type Output = O::Output;
  - type Hessian = O::Hessian;
  - type Jacobian = O::Jacobian;
  - type Float = O::Float;
  -
  - fn apply(&self, param: &Self::Param) -> Result<Self::Output, Error> {
  - self.op.as_ref().unwrap().apply(param)
  - }
  -
  - fn gradient(&self, param: &Self::Param) -> Result<Self::Param, Error> {
  - self.op.as_ref().unwrap().gradient(param)
  - }
  -
  - fn hessian(&self, param: &Self::Param) -> Result<Self::Hessian, Error> {
  - self.op.as_ref().unwrap().hessian(param)
  - }
  -
  - fn jacobian(&self, param: &Self::Param) -> Result<Self::Jacobian, Error> {
  - self.op.as_ref().unwrap().jacobian(param)
  - }
  -
  - fn modify(&self, param: &Self::Param, extent: Self::Float) -> Result<Self::Param, Error> {
  - self.op.as_ref().unwrap().modify(param, extent)
  - }
  -}
  