def _call(self, x, out):
     xim = x[:functional.N]
     xi = xim[i]
     ret = functional.alpha[i] * (
         functional.forward.adjoint *
         (functional.forward -
          ConstantOperator(functional.data[i])))(xi)
     out.assign(ret)
Exemple #2
0
    def translation_prox_factory(step_size):
        """Create proximal for the translation with a given step_size.

        Parameters
        ----------
        step_size : positive `float`
            Step size parameter

        Returns
        -------
        proximal : `Operator`
            The proximal operator of ``s * F( . - y)`` where ``s`` is the
            step size
        """

        return (ConstantOperator(y) + prox_factory(step_size) *
                (IdentityOperator(y.space) - ConstantOperator(y)))
Exemple #3
0
 def gradient(self):
     """Gradient operator of the functional."""
     return self.functional.gradient + ConstantOperator(self.linear_term)
Exemple #4
0
 def gradient(self):
     """Gradient operator of the functional."""
     return (self.functional.gradient +
             (2 * self.quadratic_coeff) * IdentityOperator(self.domain) +
             ConstantOperator(self.linear_term))