Denys Rozumnyi
commited on
Commit
·
5cc6347
1
Parent(s):
5f76e47
update
Browse files- geom_solver.py +12 -7
- testing.ipynb +0 -0
geom_solver.py
CHANGED
@@ -16,7 +16,7 @@ def my_empty_solution():
|
|
16 |
class GeomSolver(object):
|
17 |
|
18 |
def __init__(self):
|
19 |
-
self.min_vertices =
|
20 |
self.kmeans_th = 130
|
21 |
self.point_dist_th = 60
|
22 |
self.th_min_support = 3
|
@@ -147,13 +147,18 @@ class GeomSolver(object):
|
|
147 |
vertices = centers
|
148 |
print("Enough vertices.")
|
149 |
else:
|
150 |
-
|
151 |
-
if self.
|
152 |
-
|
|
|
|
|
153 |
else:
|
154 |
-
|
155 |
-
|
156 |
-
|
|
|
|
|
|
|
157 |
self.vertices_aug = vertices
|
158 |
|
159 |
|
|
|
16 |
class GeomSolver(object):
|
17 |
|
18 |
def __init__(self):
|
19 |
+
self.min_vertices = 18
|
20 |
self.kmeans_th = 130
|
21 |
self.point_dist_th = 60
|
22 |
self.th_min_support = 3
|
|
|
147 |
vertices = centers
|
148 |
print("Enough vertices.")
|
149 |
else:
|
150 |
+
vertices = centers
|
151 |
+
if self.repeat_predicted:
|
152 |
+
while vertices.shape[0] < self.min_vertices:
|
153 |
+
vertices = np.concatenate((vertices, centers))
|
154 |
+
vertices = vertices[:self.min_vertices]
|
155 |
else:
|
156 |
+
if self.mean_fixed:
|
157 |
+
added_one = (self.min_vertices * self.wf_center - self.vertices.sum(0)) / (self.min_vertices - nvert)
|
158 |
+
else:
|
159 |
+
added_one = self.wf_center
|
160 |
+
added = added_one[None].repeat(self.min_vertices - nvert,0)
|
161 |
+
vertices = np.concatenate((self.vertices, added))
|
162 |
self.vertices_aug = vertices
|
163 |
|
164 |
|
testing.ipynb
CHANGED
The diff for this file is too large to render.
See raw diff
|
|