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 b48ffe59 authored by EXT José Ignacio Requeno Jarabo's avatar EXT José Ignacio Requeno Jarabo
Browse files

Optimization in search method: remove boxes from the boundary with volume...

Optimization in search method: remove boxes from the boundary with volume equal to 0.0 (or almost 0.0 but undetectable because of float precision)
parent 541de06a
......@@ -367,6 +367,12 @@ def multidim_search_deep_first_opt_3(xspace,
lattice_border_ylow.add_list(list(new_incomp_rects))
lattice_border_yup.add_list(list(new_incomp_rects))
# Remove boxes in the boundary with volume 0
boxes_null_vol = border[:border.bisect_key_left(0.0)]
border -= boxes_null_vol
lattice_border_ylow.remove_list(boxes_null_vol)
lattice_border_yup.remove_list(boxes_null_vol)
################################
# Every rectangle in 'new_incomp_rects' is incomparable for current B0 and for all B0 included in Ylow
# Every rectangle in 'new_incomp_rects' is incomparable for current B1 and for all B1 included in Yup
......@@ -593,6 +599,9 @@ def multidim_search_deep_first_opt_2(xspace,
# Add new incomparable rectangles to the border
border |= new_incomp_rects
# Remove boxes in the boundary with volume 0
border -= border[:border.bisect_key_left(0.0)]
################################
# Every rectangle in 'new_incomp_rects' is incomparable for current B0 and for all B0 included in Ylow
# Every rectangle in 'new_incomp_rects' is incomparable for current B1 and for all B1 included in Yup
......@@ -809,6 +818,9 @@ def multidim_search_deep_first_opt_1(xspace,
# Add new incomparable rectangles to the border
border |= new_incomp_rects
# Remove boxes in the boundary with volume 0
border -= border[:border.bisect_key_left(0.0)]
################################
# Every rectangle in 'new_incomp_rects' is incomparable for current B0 and for all B0 included in Ylow
# Every rectangle in 'new_incomp_rects' is incomparable for current B1 and for all B1 included in Yup
......@@ -1005,6 +1017,9 @@ def multidim_search_deep_first_opt_inf(xspace,
# Add new incomparable rectangles to the border
border |= new_incomp_rects
# Remove boxes in the boundary with volume 0
border -= border[:border.bisect_key_left(0.0)]
vol_border = vol_total - vol_yup - vol_ylow
RootSearch.logger.info('{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}'
......@@ -1155,6 +1170,9 @@ def multidim_search_deep_first_opt_0(xspace,
# Add new incomparable rectangles to the border
border |= new_incomp_rects
# Remove boxes in the boundary with volume 0
border -= border[:border.bisect_key_left(0.0)]
vol_border = vol_total - vol_yup - vol_ylow
RootSearch.logger.info('{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}'
......
......@@ -272,6 +272,12 @@ def multidim_search_opt_3(xspace,
lattice_border_ylow.add_list(i)
lattice_border_yup.add_list(i)
# Remove boxes in the boundary with volume 0
boxes_null_vol = border[:border.bisect_key_left(0.0)]
border -= boxes_null_vol
lattice_border_ylow.remove_list(boxes_null_vol)
lattice_border_yup.remove_list(boxes_null_vol)
vol_border = vol_total - vol_yup - vol_ylow
RootSearch.logger.info('{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}'
......@@ -462,6 +468,9 @@ def multidim_search_opt_2(xspace,
border |= i
RootSearch.logger.debug('irect: {0}'.format(i))
# Remove boxes in the boundary with volume 0
border -= border[:border.bisect_key_left(0.0)]
vol_border = vol_total - vol_yup - vol_ylow
RootSearch.logger.info('{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}'
......@@ -670,6 +679,9 @@ def multidim_search_opt_1(xspace,
border |= i
RootSearch.logger.debug('irect: {0}'.format(i))
# Remove boxes in the boundary with volume 0
border -= border[:border.bisect_key_left(0.0)]
vol_border = vol_total - vol_yup - vol_ylow
RootSearch.logger.info('{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}'
......@@ -828,6 +840,10 @@ def multidim_search_opt_inf(xspace,
border += i
RootSearch.logger.debug('irect: {0}'.format(i))
# Remove boxes in the boundary with volume 0
# border = border[border.bisect_key_right(0.0):]
del border[:border.bisect_key_left(0.0)]
vol_border = vol_total - vol_yup - vol_ylow
RootSearch.logger.info('{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}'
......@@ -946,6 +962,10 @@ def multidim_search_opt_0(xspace,
border += i
RootSearch.logger.debug('irect: {0}'.format(i))
# Remove boxes in the boundary with volume 0
# border = border[border.bisect_key_right(0.0):]
del border[:border.bisect_key_left(0.0)]
vol_border = vol_total - vol_yup - vol_ylow
RootSearch.logger.info(
......
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