@@ -135,8 +135,8 @@ def generate_maximal_additive_faces(fn):
135135 return fn ._maximal_additive_faces
136136 if fn .is_discrete ():
137137 result = generate_maximal_additive_faces_discrete (fn )
138- elif fn .is_continuous ():
139- result = generate_maximal_additive_faces_continuous (fn )
138+ # elif fn.is_continuous():
139+ # result = generate_maximal_additive_faces_continuous(fn)
140140 else :
141141 result = generate_maximal_additive_faces_general (fn )
142142 fn ._maximal_additive_faces = result
@@ -2718,26 +2718,33 @@ class FunctionalDirectedMove (FastPiecewise):
27182718 for component in covered_components :
27192719 preimages = [ self .apply_to_coho_interval (interval , inverse = True ) for interval in component ]
27202720 preimages .sort (key = coho_interval_left_endpoint_with_epsilon )
2721- restricted_domain = intersection_of_coho_intervals ([component , preimages ])
2722- covered_domain = [interval_including_endpoints_if_continuous (interval , pts_of_discontinuity , self ) for interval in restricted_domain ]
2723- covered_domains .append (covered_domain )
2724- domain_component = union_of_coho_intervals_minus_union_of_coho_intervals (covered_domains ,[])
2725- domain_component_indices = set ([])
2726- domain_move_indices = set (range (len (domain_move )))
2721+ covered_domain = list (intersection_of_coho_intervals ([component , preimages ]))
2722+ covered_domains .append (covered_domain ) #list of open sets in the new version
2723+ domain_component_open = union_of_coho_intervals_minus_union_of_coho_intervals (covered_domains ,[])
2724+ domain_component = union_of_coho_intervals_minus_union_of_coho_intervals ([[interval_including_endpoints_if_continuous (interval , pts_of_discontinuity , self ) for interval in domain_component_open ]],[])
27272725 domains = []
2728- for index_i in list (domain_move_indices ):
2729- i = domain_move [index_i ]
2730- for index_j in range (len (domain_component )):
2731- j = domain_component [index_j ]
2732- if coho_interval_contained_in_coho_interval (i , j ):
2733- # remove interval i from domain if it is fully covered.
2734- domain_move_indices .remove (index_i )
2735- elif coho_intervals_intersecting (i , j ):
2726+ for j in domain_component :
2727+ keep = False
2728+ for i in domain_move :
2729+ if coho_intervals_intersecting (i , j ):
27362730 # extend to the boundary of covered interval.
2737- domain_component_indices .add (index_j )
2738- domains = [[domain_move [index_i ] for index_i in sorted (domain_move_indices )], [domain_component [index_j ] for index_j in sorted (domain_component_indices )]]
2739- union_domains = union_of_coho_intervals_minus_union_of_coho_intervals (domains , [])
2740- open_domains = [open_interval (i [0 ],i [1 ]) for i in union_domains ]
2731+ keep = True
2732+ break
2733+ if keep :
2734+ domains .append (j )
2735+ extended_domains = union_of_coho_intervals_minus_union_of_coho_intervals ([domain_move , domains ], [])
2736+ reduced_domains = []
2737+ for i in extended_domains :
2738+ i_open = open_interval (i [0 ], i [1 ])
2739+ keep = True
2740+ for j in domain_component_open :
2741+ if coho_interval_contained_in_coho_interval (i_open , j ):
2742+ # remove interval i from domain if it is fully covered.
2743+ keep = False
2744+ break
2745+ if keep :
2746+ reduced_domains .append (i )
2747+ open_domains = [open_interval (i [0 ],i [1 ]) for i in reduced_domains ]
27412748 return FunctionalDirectedMove (open_domains , self .directed_move )
27422749
27432750 def plot (self , rgbcolor = None , color = None , * args , ** kwds ):
0 commit comments