bool- true if and only if the point p (or front P, or archive A) is dominated, is strongly dominated, partially dominates, completely dominates, or non-dominantes *this
Complexity
is_completely_dominated_by: \(O(1)\) for points and \(O(n)\) for fronts
All others: \(O(m \log n)\) for points and \(O(m n \log n)\) for fronts
Notes
The dominance between archives is defined in terms of the first front in the archive.
Note
See the section fronts / dominance relationships for more details
// Point-point dominanceusingpoint_type=archive<double,3,unsigned>::key_type;point_typep1({0,0,0});point_typep2({1,1,1});std::vector<bool>is_minimization={true,false,true};std::cout<<(p1.dominates(p2,is_minimization)?"p1 dominates p2":"p1 does not dominate p2")<<std::endl;std::cout<<(p1.strongly_dominates(p2,is_minimization)?"p1 strongly dominates p2":"p1 does not strongly dominate p2")<<std::endl;std::cout<<(p1.non_dominates(p2,is_minimization)?"p1 non-dominates p2":"p1 does not non-dominate p2")<<std::endl;// Archive-point dominancestd::cout<<(ar.dominates(p2)?"ar dominates p2":"ar does not dominate p2")<<std::endl;std::cout<<(ar.strongly_dominates(p2)?"ar strongly dominates p2":"ar does not strongly dominate p2")<<std::endl;std::cout<<(ar.non_dominates(p2)?"ar non-dominates p2":"ar does not non-dominate p2")<<std::endl;std::cout<<(ar.is_partially_dominated_by(p2)?"ar is partially dominated by p2":"ar is not is partially dominated by p2")<<std::endl;std::cout<<(ar.is_completely_dominated_by(p2)?"ar is completely dominated by p2":"ar is not is completely dominated by p2")<<std::endl;// Archive-archive dominancearchive<double,3,unsigned>ar2({min,max,min});for(constauto&[p,v]:ar){ar2[point_type({p[0]-1,p[1]+1,p[2]-1})]=v;}std::cout<<(ar.dominates(ar2)?"ar dominates ar2":"ar does not dominate ar2")<<std::endl;std::cout<<(ar.strongly_dominates(ar2)?"ar strongly dominates ar2":"ar does not strongly dominate ar2")<<std::endl;std::cout<<(ar.non_dominates(ar2)?"ar non-dominates ar2":"ar does not non-dominate ar2")<<std::endl;std::cout<<(ar.is_partially_dominated_by(ar2)?"ar is partially dominated by ar2":"ar is not is partially dominated by ar2")<<std::endl;std::cout<<(ar.is_completely_dominated_by(ar2)?"ar is completely dominated by ar2":"ar is not is completely dominated by ar2")<<std::endl;
1 2 3 4 5 6 7 8 910111213141516171819202122232425
# Point-point dominancep1=pareto.point([0,0,0])p2=pareto.point([1,1,1])is_minimization=[True,False,True]print('p1 dominates p2'ifp1.dominates(p2,is_minimization)else'p1 does not dominate p2')print('p1 strongly dominates p2'ifp1.strongly_dominates(p2,is_minimization)else'p1 does not strongly dominate p2')print('p1 non-dominates p2'ifp1.non_dominates(p2,is_minimization)else'p1 does not non-dominate p2')# Archive-point dominanceprint('ar dominates p2'ifar.dominates(p2)else'ar does not dominate p2')print('ar strongly dominates p2'ifar.strongly_dominates(p2)else'ar does not strongly dominate p2')print('ar non-dominates p2'ifar.non_dominates(p2)else'ar does not non-dominate p2')print('ar is partially dominated by p2'ifar.is_partially_dominated_by(p2)else'ar is not is partially dominated by p2')print('ar is completely dominated by p2'ifar.is_completely_dominated_by(p2)else'ar is not is completely dominated by p2')# Archive-archive dominancear2=pareto.archive(['min','max','min'])for[p,v]inar:ar2[pareto.point([p[0]-1,p[1]+1,p[2]-1])]=vprint('ar dominates ar2'ifar.dominates(ar2)else'ar does not dominate ar2')print('ar strongly dominates ar2'ifar.strongly_dominates(ar2)else'ar does not strongly dominate ar2')print('ar non-dominates ar2'ifar.non_dominates(ar2)else'ar does not non-dominate ar2')print('ar is partially dominated by ar2'ifar.is_partially_dominated_by(ar2)else'ar is not is partially dominated by ar2')print('ar is completely dominated by ar2'ifar.is_completely_dominated_by(ar2)else'ar is not is completely dominated by ar2')
1 2 3 4 5 6 7 8 910111213
p1 does not dominate p2p1 does not strongly dominate p2p1 non-dominates p2ar dominates p2ar strongly dominates p2ar does not non-dominate p2ar is not is partially dominated by p2ar is not is completely dominated by p2ar does not dominate ar2ar does not strongly dominate ar2ar does not non-dominate ar2ar is partially dominated by ar2ar is completely dominated by ar2