class_docstr: Hypervolume calculator for any dimension.
  
  This class exactly calculates the hypervolume for any dimension by using the WFG algorithm.
  For detail, see `While, Lyndon, Lucas Bradstreet, and Luigi Barone. "A fast way of
  calculating exact hypervolumes." Evolutionary Computation, IEEE Transactions on 16.1 (2012)
  : 86-95.`.
code: def _compute_rec(self, solution_set: np.ndarray) -> float:
      assert self._reference_point is not None
      n_points = solution_set.shape[0]
  
      if self._reference_point.shape[0] == 2:
          return _compute_2d(solution_set, self._reference_point)
  
      if n_points == 1:
          return _compute_2points_volume(
              solution_set[0], self._reference_point
          )
      elif n_points == 2:
          volume = 0.0
          volume += _compute_2points_volume(
              solution_set[0], self._reference_point
          )
          volume += _compute_2points_volume(
              solution_set[1], self._reference_point
          )
          intersection = self._reference_point - np.maximum(
              solution_set[0], solution_set[1]
          )
          volume -= np.prod(intersection)
  
          return volume
  
      solution_set = solution_set[solution_set[:, 0].argsort()]
  
      # n_points >= 3
      volume = 0.0
      for i in range(n_points):
          volume += self._compute_exclusive_hv(
              solution_set[i], solution_set[i + 1 :]
          )
      return volume
  
file_path: optuna/optuna/_hypervolume/wfg.py
imports: from typing import Optional
  import numpy
  from optuna._hypervolume import _compute_2d
  from optuna._hypervolume import _compute_2points_volume
  from optuna._hypervolume import BaseHypervolume
label_desc: Use image node_id 3 for calling the WFG obj's underlying member method code with example usage: obj._compute_rec(solution_set) and returns: volume, _compute_2d, _compute_2points_volume, volume