(point: np.ndarray, solution_set: 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`.
Limit the points in the solution set for the given point.
Limit the points in the solution set for the given point .
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)
def _limit ( point : np . ndarray , solution_set : np . ndarray ) -> np . ndarray : 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 )