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.`.
docstr: Limit the points in the solution set for the given point.
  
  Let `S := solution set`, `p := point` and `d := dim(p)`.
  The returned solution set `S'` is
  `S' = Pareto({s' | for all i in [d], exists s in S, s'_i = max(s_i, p_i)})`,
  where `Pareto(T) = the points in T which are Pareto optimal`.
code: def _limit(point: np.ndarray, solution_set: np.ndarray) -> np.ndarray:
      """Limit the points in the solution set for the given point.
  
      Let `S := solution set`, `p := point` and `d := dim(p)`.
      The returned solution set `S'` is
      `S' = Pareto({s' | for all i in [d], exists s in S, s'_i = max(s_i, p_i)})`,
      where `Pareto(T) = the points in T which are Pareto optimal`.
      """
      n_points_of_s = solution_set.shape[0]
  
      limited_solution_set = np.maximum(solution_set, point)
  
      # Return almost Pareto optimal points for computational efficiency.
      # If the points in the solution set are completely sorted along all coordinates,
      # the following procedures return the complete Pareto optimal points.
      # For the computational efficiency, we do not completely sort the points,
      # but just sort the points according to its 0-th dimension.
      if n_points_of_s <= 1:
          return limited_solution_set
      else:
          # Assume limited_solution_set is sorted by its 0th dimension.
          # Therefore, we can simply scan the limited solution set from left to right.
          returned_limited_solution_set = [limited_solution_set[0]]
          left = 0
          right = 1
          while right < n_points_of_s:
              if (
                  limited_solution_set[left]
                  > limited_solution_set[right]
              ).any():
                  left = right
                  returned_limited_solution_set.append(
                      limited_solution_set[left]
                  )
              right += 1
          return np.asarray(returned_limited_solution_set)
  
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 5 for calling the WFG obj's underlying member method code with example usage: obj._limit(point, solution_set) and returns: limited_solution_set, np