class_docstr: Hypervolume computation based on variant 3 of the algorithm in the paper:
  C. M. Fonseca, L. Paquete, and M. Lopez-Ibanez. An improved dimension-sweep
  algorithm for the hypervolume indicator. In IEEE Congress on Evolutionary
  Computation, pages 1157-1163, Vancouver, Canada, July 2006.
  
  Minimization is implicitly assumed here!
class_docstr_tok: ["Hypervolume","computation","based","on","variant","3","of","the","algorithm","in","the","paper",":","C.","M.","Fonseca",",","L.","Paquete",",","and","M.","Lopez-Ibanez",".","An","improved","dimension-sweep","algorithm","for","the","hypervolume","indicator",".","In","IEEE","Congress","on","Evolutionary","Computation",",","pages","1157-1163",",","Vancouver",",","Canada",",","July","2006",".","Minimization","is","implicitly","assumed","here","!"]
docstr: Returns the hypervolume that is dominated by a non-dominated front.
  
  Before the HV computation, front and reference point are translated, so
  that the reference point is [0, ..., 0].
docstr_tok: ["Returns","the","hypervolume","that","is","dominated","by","a","non-dominated","front",".","Before","the","HV","computation",",","front","and","reference","point","are","translated",",","so","that","the","reference","point","is","[","0",",","...",",","0","]","."]
code: def compute(self, front):
      """Returns the hypervolume that is dominated by a non-dominated front.
  
      Before the HV computation, front and reference point are translated, so
      that the reference point is [0, ..., 0].
  
      """
  
      def weaklyDominates(point, other):
          for i in range(len(point)):
              if point[i] > other[i]:
                  return False
          return True
  
      relevantPoints = []
      referencePoint = self.referencePoint
      dimensions = len(referencePoint)
      #######
      # fmder: Here it is assumed that every point dominates the reference point
      # for point in front:
      #     # only consider points that dominate the reference point
      #     if weaklyDominates(point, referencePoint):
      #         relevantPoints.append(point)
      relevantPoints = front
      # fmder
      #######
      if any(referencePoint):
          # shift points so that referencePoint == [0, ..., 0]
          # this way the reference point doesn't have to be explicitly used
          # in the HV computation
  
          #######
          # fmder: Assume relevantPoints are numpy array
          # for j in xrange(len(relevantPoints)):
          #     relevantPoints[j] = [relevantPoints[j][i] - referencePoint[i] for i in xrange(dimensions)]
          relevantPoints -= referencePoint
          # fmder
          #######
  
      self.preProcess(relevantPoints)
      bounds = [-1.0e308] * dimensions
      hyperVolume = self.hvRecursive(
          dimensions - 1, len(relevantPoints), bounds
      )
      return hyperVolume
  
file_path: deap/deap/tools/_hypervolume/pyhv.py
imports: import warnings
  import numpy
label_desc: Use image node_id 2 for calling the _HyperVolume obj's underlying member method code with example usage: obj.compute(front) and returns: hyperVolume, True, False