File dicebox.py changed (mode: 100644) (index b440c6f..bf30e0e) |
... |
... |
class Goal(DiceBox): |
1635 |
1635 |
#č takže musíme sami lepit nové etikety |
#č takže musíme sami lepit nové etikety |
1636 |
1636 |
bx.global_stats['nsim'] = bx.nsim |
bx.global_stats['nsim'] = bx.nsim |
1637 |
1637 |
|
|
|
1638 |
|
failsi = bx.failsi |
|
1639 |
|
|
1638 |
1640 |
if 'tri' in dir(bx): |
if 'tri' in dir(bx): |
1639 |
1641 |
#č Tri.get_pf_estimation() vrací: |
#č Tri.get_pf_estimation() vrací: |
1640 |
1642 |
# 'TRI_estimation': tri_estimation, 'global_stats': {mix, failure}, \ |
# 'TRI_estimation': tri_estimation, 'global_stats': {mix, failure}, \ |
|
... |
... |
class Goal(DiceBox): |
1653 |
1655 |
estimations['ghull_estimation'] = bx.ghull_estimation |
estimations['ghull_estimation'] = bx.ghull_estimation |
1654 |
1656 |
|
|
1655 |
1657 |
#č hrozně důležitý. Těšíme se na csv-čko. |
#č hrozně důležitý. Těšíme se na csv-čko. |
1656 |
|
bx.global_stats = {**bx.global_stats, **estimations['global_stats']} |
|
|
1658 |
|
bx.global_stats.update(estimations['global_stats']) |
|
1659 |
|
bx.global_stats['success_points'] = len(failsi[~failsi]) |
|
1660 |
|
bx.global_stats['failure_points'] = len(failsi[failsi]) |
1657 |
1661 |
bx.global_stats['success'] = tri_estimation[0] |
bx.global_stats['success'] = tri_estimation[0] |
1658 |
|
|
|
|
1662 |
|
bx.global_stats['candidates_sets'] = len(bx.candidates_index) |
1659 |
1663 |
return estimations |
return estimations |
1660 |
1664 |
|
|
1661 |
1665 |
|
|
|
... |
... |
class Goal(DiceBox): |
1674 |
1678 |
|
|
1675 |
1679 |
global_stats = bx.global_stats |
global_stats = bx.global_stats |
1676 |
1680 |
# outside dodá Ghull |
# outside dodá Ghull |
|
1681 |
|
global_stats['success_points'] = len(failsi[~failsi]) |
|
1682 |
|
global_stats['failure_points'] = len(failsi[failsi]) |
1677 |
1683 |
global_stats['success'] = tri_estimation[0] |
global_stats['success'] = tri_estimation[0] |
1678 |
1684 |
global_stats['failure'] = tri_estimation[1] |
global_stats['failure'] = tri_estimation[1] |
1679 |
1685 |
global_stats['mix'] = tri_estimation[2] |
global_stats['mix'] = tri_estimation[2] |
1680 |
1686 |
global_stats['vertex_estimation'] = vertex_estimation |
global_stats['vertex_estimation'] = vertex_estimation |
1681 |
1687 |
global_stats['weighted_vertex_estimation'] = weighted_vertex_estimation |
global_stats['weighted_vertex_estimation'] = weighted_vertex_estimation |
1682 |
1688 |
global_stats['nsimplex'] = 0 |
global_stats['nsimplex'] = 0 |
|
1689 |
|
global_stats['tn_scheme'] = bx.scheme.name |
|
1690 |
|
global_stats['tn_scheme_points'] = bx.scheme.points.shape[1] |
|
1691 |
|
global_stats['newly_invalidated'] = 0 |
|
1692 |
|
global_stats['newly_estimated'] = 0 |
|
1693 |
|
global_stats['simplex_stats'] = 0 |
|
1694 |
|
global_stats['candidates_sets'] = len(bx.candidates_index) |
1683 |
1695 |
global_stats['ncoplanar'] = 0 |
global_stats['ncoplanar'] = 0 |
1684 |
1696 |
|
|
1685 |
1697 |
return {'TRI_overall_estimations': tri_estimation, \ |
return {'TRI_overall_estimations': tri_estimation, \ |
File simplex.py changed (mode: 100644) (index 4fc9e55..4f221bd) |
... |
... |
class _Triangulation: |
254 |
254 |
#č ty množiny jsou tak trošku overkill, ale budiž |
#č ty množiny jsou tak trošku overkill, ale budiž |
255 |
255 |
sx.simplices_set = set() |
sx.simplices_set = set() |
256 |
256 |
|
|
|
257 |
|
sx.newly_estimated = 0 |
|
258 |
|
sx.newly_invalidated = 0 |
|
259 |
|
|
257 |
260 |
# create .tri triangulation |
# create .tri triangulation |
258 |
261 |
#č tri - Deloneho triangulace |
#č tri - Deloneho triangulace |
259 |
262 |
#č žádné chyby nechytám |
#č žádné chyby nechytám |
|
... |
... |
class _Triangulation: |
339 |
342 |
to_estimate = new_simplices_set - sx.simplices_set |
to_estimate = new_simplices_set - sx.simplices_set |
340 |
343 |
to_invalidate = new_simplices_set - to_estimate |
to_invalidate = new_simplices_set - to_estimate |
341 |
344 |
|
|
|
345 |
|
sx.newly_estimated = len(to_estimate) |
|
346 |
|
sx.newly_invalidated = len(to_invalidate) |
|
347 |
|
|
342 |
348 |
#č invalidace |
#č invalidace |
343 |
349 |
# difference_update |
# difference_update |
344 |
350 |
sx.simplices_set -= to_invalidate |
sx.simplices_set -= to_invalidate |
|
... |
... |
class JustCubatureTriangulation(_FastTriangulation, _CubatureTriangulation): |
844 |
850 |
#ё так, для красоты |
#ё так, для красоты |
845 |
851 |
global_stats = dict() |
global_stats = dict() |
846 |
852 |
# outside dodá Ghull |
# outside dodá Ghull |
|
853 |
|
global_stats['success_points'] = None #č další kód musí to přepsat |
|
854 |
|
global_stats['failure_points'] = None #č další kód musí to přepsat |
847 |
855 |
global_stats['success'] = None #č další kód musí to přepsat |
global_stats['success'] = None #č další kód musí to přepsat |
848 |
856 |
global_stats['failure'] = tri_estimation[1] |
global_stats['failure'] = tri_estimation[1] |
849 |
857 |
global_stats['mix'] = tri_estimation[2] |
global_stats['mix'] = tri_estimation[2] |
850 |
858 |
global_stats['vertex_estimation'] = vertex_estimation |
global_stats['vertex_estimation'] = vertex_estimation |
851 |
859 |
global_stats['weighted_vertex_estimation'] = weighted_vertex_estimation |
global_stats['weighted_vertex_estimation'] = weighted_vertex_estimation |
852 |
860 |
global_stats['nsimplex'] = sx.tri.nsimplex |
global_stats['nsimplex'] = sx.tri.nsimplex |
|
861 |
|
global_stats['tn_scheme'] = sx.tn_scheme.name |
|
862 |
|
global_stats['tn_scheme_points'] = sx.tn_scheme.points.shape[1] |
|
863 |
|
global_stats['newly_invalidated'] = sx.newly_invalidated |
|
864 |
|
global_stats['newly_estimated'] = sx.newly_estimated |
|
865 |
|
global_stats['simplex_stats'] = len(sx.simplex_stats) |
|
866 |
|
global_stats['candidates_sets'] = None #č další kód musí to přepsat |
853 |
867 |
global_stats['ncoplanar'] = len(sx.tri.coplanar) |
global_stats['ncoplanar'] = len(sx.tri.coplanar) |
854 |
868 |
|
|
855 |
869 |
return {'TRI_estimation': tri_estimation, 'global_stats': global_stats, \ |
return {'TRI_estimation': tri_estimation, 'global_stats': global_stats, \ |