@@ -103,7 +103,7 @@ def _eval_var(my_gp, all_x, all_y, x_for_var, test_points, persis_info):
103103 return np .array (var_vals )
104104
105105
106- def calculate_grid_distances (lb , ub , num_points ):
106+ def _calculate_grid_distances (lb , ub , num_points ):
107107 """Calculate minimum and maximum distances between points in grid"""
108108 num_points = [num_points ] * len (lb )
109109 spacings = [(ub [i ] - lb [i ]) / (num_points [i ] - 1 ) for i in range (len (lb ))]
@@ -112,7 +112,7 @@ def calculate_grid_distances(lb, ub, num_points):
112112 return min_distance , max_distance
113113
114114
115- def is_point_far_enough (point , eligible_points , r ):
115+ def _is_point_far_enough (point , eligible_points , r ):
116116 """Check if point is at least r distance away from all points in eligible_points."""
117117 for ep in eligible_points :
118118 if np .linalg .norm (point - ep ) < r :
@@ -133,7 +133,7 @@ def _find_eligible_points(x_for_var, sorted_indices, r, batch_size):
133133 eligible_points = []
134134 for idx in sorted_indices :
135135 point = x_for_var [idx ]
136- if is_point_far_enough (point , eligible_points , r ):
136+ if _is_point_far_enough (point , eligible_points , r ):
137137 eligible_points .append (point )
138138 if len (eligible_points ) == batch_size :
139139 break
@@ -165,7 +165,7 @@ def persistent_gpCAM_simple(H_in, persis_info, gen_specs, libE_info):
165165 if U .get ("use_grid" ):
166166 num_points = 10
167167 x_for_var = _generate_mesh (lb , ub , num_points )
168- r_low_init , r_high_init = calculate_grid_distances (lb , ub , num_points )
168+ r_low_init , r_high_init = _calculate_grid_distances (lb , ub , num_points )
169169 else :
170170 x_for_var = persis_info ["rand_stream" ].uniform (lb , ub , (10 * batch_size , n ))
171171
0 commit comments