Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit c7af4729 authored by EXT José Ignacio Requeno Jarabo's avatar EXT José Ignacio Requeno Jarabo
Browse files

Addition of "intersection" operation in ResultSet: possibility of composing...

Addition of "intersection" operation in ResultSet: possibility of composing the intersection of two Pareto fronts
parent 47d87498
Pipeline #32595 failed with stages
in 2 minutes and 19 seconds
......@@ -480,6 +480,17 @@ class ResultSet(object):
# type: (ResultSet, int) -> float
return ResultSet._get_max_val_dimension_rect_list(i, self.border)
# Composition of two Pareto Fronts
def intersection(self, other):
# type: (ResultSet, ResultSet) -> ResultSet
xspace = self.xspace.intersection(other.xspace)
border = list(set(self.border) | set(other.border))
ylow = list(set(self.ylow) | set(other.ylow))
yup = list(set(self.yup) | set(other.yup))
res = ResultSet(border=border, ylow=ylow, yup=yup, xspace=xspace)
return res
# MatPlot Graphics
def _plot_space_2D(self, xaxe=0, yaxe=1, opacity=1.0):
# type: (ResultSet, int, int, float) -> list
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment