@@ -37,8 +37,9 @@ def _compute_exclusive_hv(
3737 return inclusive_hv
3838
3939 # NOTE(nabenabe): As the following line is a hack for speedup, I will describe several
40- # important points to note. Even if we do not run _is_pareto_front below, the result of this
41- # function does not change, but this function simply becomes slower.
40+ # important points to note. Even if we do not run _is_pareto_front below or use
41+ # assume_unique_lexsorted=False instead, the result of this function does not change, but this
42+ # function simply becomes slower.
4243 #
4344 # For simplicity, I call an array ``quasi-lexsorted`` if it is sorted by the first objective.
4445 #
@@ -48,20 +49,21 @@ def _compute_exclusive_hv(
4849 # if the solution set contains many non Pareto solutions. By removing some obvious non Pareto
4950 # solutions, the calculation becomes faster.
5051 #
51- # Reason why we run _is_pareto_front with assume_unique_lexsorted= True
52+ # Reason why assume_unique_lexsorted must be True for _is_pareto_front
5253 # assume_unique_lexsorted=True actually checks weak dominance and solutions will be weakly
5354 # dominated if there are duplications, so we can remove duplicated solutions by this option.
5455 # In other words, assume_unique_lexsorted=False may significantly slow down when limited_sols
55- # has many duplicated Pareto solutions.
56+ # has many duplicated Pareto solutions because this function becomes an exponential algorithm
57+ # without duplication removal.
5658 #
5759 # NOTE(nabenabe): limited_sols can be non-unique and/or non-lexsorted, so I will describe why
5860 # it is fine.
5961 #
60- # Reason why it is fine to run _is_pareto_front with assume_unique_lexsorted=True.
61- # All ``False`` in on_front will be correct even if limited_sols is not unique or not
62- # lexsorted as long as limited_sols is quasi-lexsorted, which is guaranteed. As mentioned
63- # earlier, if all ``False`` in on_front is correct, the result of this function does not
64- # change.
62+ # Reason why we can specify assume_unique_lexsorted=True even when limited_sols is not
63+ # All ``False`` in on_front will be correct (, but it may not be the case for ``True``) even
64+ # if limited_sols is not unique or not lexsorted as long as limited_sols is quasi-lexsorted,
65+ # which is guaranteed. As mentioned earlier, if all ``False`` in on_front is correct, the
66+ # result of this function does not change.
6567 on_front = _is_pareto_front (limited_sols , assume_unique_lexsorted = True )
6668 return inclusive_hv - _compute_hv (limited_sols [on_front ], reference_point )
6769
0 commit comments