class_docstr: Decorator for evaluation functions, it scales the objective function by
  *factor* 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 factor 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:`scale` method to the decorated function.
class_docstr_tok: ["Decorator","for","evaluation","functions",",","it","scales","the","objective","function","by","*","factor","*","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","factor","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",":","`","scale","`","method","to","the","decorated","function","."]
docstr: Set the current scale to *factor*. After decorating the
  evaluation function, this function will be available directly from
  the function object. ::
  
      @scale([0.25, 2.0, ..., 0.1])
      def evaluate(individual):
          return sum(individual),
  
      # This will cancel the scaling
      evaluate.scale([1.0, 1.0, ..., 1.0])
docstr_tok: ["Set","the","current","scale","to","*","factor","*",".","After","decorating","the","evaluation","function",",","this","function","will","be","available","directly","from","the","function","object",".",":",":","@","scale","(","[","0.25",",","2.0",",","...",",","0.1","]",")","def","evaluate","(","individual",")",":","return","sum","(","individual",")",",","#","This","will","cancel","the","scaling","evaluate.scale","(","[","1.0",",","1.0",",","...",",","1.0","]",")"]
code: def scale(self, factor):
      """Set the current scale to *factor*. After decorating the
      evaluation function, this function will be available directly from
      the function object. ::
  
          @scale([0.25, 2.0, ..., 0.1])
          def evaluate(individual):
              return sum(individual),
  
          # This will cancel the scaling
          evaluate.scale([1.0, 1.0, ..., 1.0])
      """
      # Factor is inverted since it is applied to the individual and not the
      # objective function
      self.factor = tuple(1.0 / f for f in factor)
  
imports: from math import hypot, sqrt
  from functools import wraps
  from itertools import repeat
label_desc: Use image node_id 3 for calling the scale obj's underlying member method code with example usage: obj.scale(factor) without return types