code: def _call(self, x):
          
          # The algorithm takes finite differences in one dimension at a time
          # reusing the dx vector to improve efficiency.
          dfdx = self.domain.zero()
          dx = self.domain.zero()
  
          if self.method == 'backward':
              fx = self.functional(x)
              for i in range(self.domain.size):
                  dx[i - 1] = 0  # reset step from last iteration
                  dx[i] = self.step
                  dfdx[i] = fx - self.functional(x - dx)
          elif self.method == 'forward':
              fx = self.functional(x)
              for i in range(self.domain.size):
                  dx[i - 1] = 0  # reset step from last iteration
                  dx[i] = self.step
                  dfdx[i] = self.functional(x + dx) - fx
          elif self.method == 'central':
              for i in range(self.domain.size):
                  dx[i - 1] = 0  # reset step from last iteration
                  dx[i] = self.step / 2
                  dfdx[i] = self.functional(x + dx) - self.functional(x - dx)
          else:
              raise RuntimeError('unknown method')
  
          dfdx /= self.step
          return dfdx
docs: Return ``self(x)``.