class_docstr: Decorator for evaluation functions, it translates the objective
  function by *vector* which should be the same length as the individual
  size. When called the decorated function should take as first argument the
  individual to be evaluated. The inverse translation vector is actually
  applied to the individual and the resulting list is given to the
  evaluation function. Thus, the evaluation function shall not be expecting
  an individual as it will receive a plain list.
  
  This decorator adds a :func:`translate` method to the decorated function.
class_docstr_tok: ["Decorator","for","evaluation","functions",",","it","translates","the","objective","function","by","*","vector","*","which","should","be","the","same","length","as","the","individual","size",".","When","called","the","decorated","function","should","take","as","first","argument","the","individual","to","be","evaluated",".","The","inverse","translation","vector","is","actually","applied","to","the","individual","and","the","resulting","list","is","given","to","the","evaluation","function",".","Thus",",","the","evaluation","function","shall","not","be","expecting","an","individual","as","it","will","receive","a","plain","list",".","This","decorator","adds","a",":","func",":","`","translate","`","method","to","the","decorated","function","."]
docstr: Set the current translation to *vector*. After decorating the
  evaluation function, this function will be available directly from
  the function object. ::
  
      @translate([0.25, 0.5, ..., 0.1])
      def evaluate(individual):
          return sum(individual),
  
      # This will cancel the translation
      evaluate.translate([0.0, 0.0, ..., 0.0])
docstr_tok: ["Set","the","current","translation","to","*","vector","*",".","After","decorating","the","evaluation","function",",","this","function","will","be","available","directly","from","the","function","object",".",":",":","@","translate","(","[","0.25",",","0.5",",","...",",","0.1","]",")","def","evaluate","(","individual",")",":","return","sum","(","individual",")",",","#","This","will","cancel","the","translation","evaluate.translate","(","[","0.0",",","0.0",",","...",",","0.0","]",")"]
code: def translate(self, vector):
      """Set the current translation to *vector*. After decorating the
      evaluation function, this function will be available directly from
      the function object. ::
  
          @translate([0.25, 0.5, ..., 0.1])
          def evaluate(individual):
              return sum(individual),
  
          # This will cancel the translation
          evaluate.translate([0.0, 0.0, ..., 0.0])
      """
      self.vector = vector
  
imports: from math import hypot, sqrt
  from functools import wraps
  from itertools import repeat
label_desc: Use image node_id 3 for calling the translate obj's underlying member method code with example usage: obj.translate(vector) without return types