code: def proximal(self):
          
  
          domain = self.domain
          diameter = self.diameter
  
          class ProximalSimplex(Operator):
              """Proximal operator implemented by the algorithm of [D+2008].
  
              [D+2008] Duchi, J., Shalev-Shwartz, S., Singer, Y., and Chandra, T.
              *Efficient Projections onto the L1-ball for Learning in High
              dimensions*. ICML 2008, pp. 272-279.
              http://doi.org/10.1145/1390156.1390191
              """
  
              def __init__(self, sigma):
                  self.sigma = sigma
                  super(ProximalSimplex, self).__init__(
                      domain=domain, range=domain, linear=False)
  
              def _call(self, x, out):
  
                  # projection onto simplex
                  proj_simplex(x, diameter, out)
  
          return ProximalSimplex
docs: Return the `proximal factory` of the functional.