mirror of https://github.com/CGAL/cgal
loose > lose
This commit is contained in:
parent
5ad86a0fb0
commit
6f875f6fa0
|
|
@ -134,13 +134,13 @@ def main(argv):
|
||||||
avg_diff_str = str(format(abs(avg_diff_to_goal), '.2f'))
|
avg_diff_str = str(format(abs(avg_diff_to_goal), '.2f'))
|
||||||
if key == "Mean_Min_Angle_(degree)" or key == "Mean_Max_Angle_(degree)":
|
if key == "Mean_Min_Angle_(degree)" or key == "Mean_Max_Angle_(degree)":
|
||||||
if avg_diff_to_goal < 0 :
|
if avg_diff_to_goal < 0 :
|
||||||
title += "\nIn average we loose "
|
title += "\nIn average we lose "
|
||||||
else :
|
else :
|
||||||
title += "\nIn average we gain "
|
title += "\nIn average we gain "
|
||||||
title += avg_diff_str + "° toward 60°"
|
title += avg_diff_str + "° toward 60°"
|
||||||
elif key == "Mean_Radius_Ratio" or key == "Mean_Edge_Ratio" or key == "Mean_Aspect_Ratio" :
|
elif key == "Mean_Radius_Ratio" or key == "Mean_Edge_Ratio" or key == "Mean_Aspect_Ratio" :
|
||||||
if avg_diff_to_goal < 0 :
|
if avg_diff_to_goal < 0 :
|
||||||
title += "\nIn average we loose "
|
title += "\nIn average we lose "
|
||||||
else :
|
else :
|
||||||
title += "\nIn average we gain "
|
title += "\nIn average we gain "
|
||||||
title += avg_diff_str + " of ratio toward 1"
|
title += avg_diff_str + " of ratio toward 1"
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ compute_fitness(const typename Traits::Matrix& R, // rotation matrix
|
||||||
CGAL_assertion(points.size() >= 3);
|
CGAL_assertion(points.size() >= 3);
|
||||||
|
|
||||||
FT xmin, ymin, zmin, xmax, ymax, zmax;
|
FT xmin, ymin, zmin, xmax, ymax, zmax;
|
||||||
//cast from double to float looses data, so cast with {} is not allowed
|
//cast from double to float loses data, so cast with {} is not allowed
|
||||||
//cast from double to exact types also works
|
//cast from double to exact types also works
|
||||||
xmin = ymin = zmin = FT((std::numeric_limits<double>::max)());
|
xmin = ymin = zmin = FT((std::numeric_limits<double>::max)());
|
||||||
xmax = ymax = zmax = FT(std::numeric_limits<double>::lowest());
|
xmax = ymax = zmax = FT(std::numeric_limits<double>::lowest());
|
||||||
|
|
@ -83,7 +83,7 @@ compute_fitness_if_smaller(const typename Traits::Matrix& R, // rotation matrix
|
||||||
CGAL_assertion(points.size() >= 3);
|
CGAL_assertion(points.size() >= 3);
|
||||||
|
|
||||||
FT xmin, ymin, zmin, xmax, ymax, zmax;
|
FT xmin, ymin, zmin, xmax, ymax, zmax;
|
||||||
//cast from double to float looses data, so cast with {} is not allowed
|
//cast from double to float loses data, so cast with {} is not allowed
|
||||||
//cast from double to exact types also works
|
//cast from double to exact types also works
|
||||||
xmin = ymin = zmin = FT((std::numeric_limits<double>::max)());
|
xmin = ymin = zmin = FT((std::numeric_limits<double>::max)());
|
||||||
xmax = ymax = zmax = FT(std::numeric_limits<double>::lowest());
|
xmax = ymax = zmax = FT(std::numeric_limits<double>::lowest());
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ compute_2D_deviation(const PointRange& points,
|
||||||
if(theta > 0.25 * CGAL_PI) // @todo is there a point to this
|
if(theta > 0.25 * CGAL_PI) // @todo is there a point to this
|
||||||
theta = 0.5 * CGAL_PI - theta;
|
theta = 0.5 * CGAL_PI - theta;
|
||||||
|
|
||||||
//cast from double to float looses data, so cast with {} is not allowed
|
//cast from double to float loses data, so cast with {} is not allowed
|
||||||
//cast from double to exact types also works
|
//cast from double to exact types also works
|
||||||
return std::make_pair(pol.area(), FT(theta));
|
return std::make_pair(pol.area(), FT(theta));
|
||||||
}
|
}
|
||||||
|
|
@ -125,7 +125,7 @@ void optimize_along_OBB_axes(typename Traits::Matrix& rot,
|
||||||
rotated_points.reserve(points.size());
|
rotated_points.reserve(points.size());
|
||||||
|
|
||||||
FT xmin, ymin, zmin, xmax, ymax, zmax;
|
FT xmin, ymin, zmin, xmax, ymax, zmax;
|
||||||
//cast from double to float looses data, so cast with {} is not allowed
|
//cast from double to float loses data, so cast with {} is not allowed
|
||||||
//cast from double to exact types also works
|
//cast from double to exact types also works
|
||||||
xmin = ymin = zmin = FT((std::numeric_limits<double>::max)());
|
xmin = ymin = zmin = FT((std::numeric_limits<double>::max)());
|
||||||
xmax = ymax = zmax = FT(std::numeric_limits<double>::lowest());
|
xmax = ymax = zmax = FT(std::numeric_limits<double>::lowest());
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ public:
|
||||||
Vertex& get_best_vertex()
|
Vertex& get_best_vertex()
|
||||||
{
|
{
|
||||||
std::size_t simplex_id = static_cast<std::size_t>(-1), vertex_id = static_cast<std::size_t>(-1);
|
std::size_t simplex_id = static_cast<std::size_t>(-1), vertex_id = static_cast<std::size_t>(-1);
|
||||||
//cast from double to float looses data, so cast with {} is not allowed
|
//cast from double to float loses data, so cast with {} is not allowed
|
||||||
//cast from double to exact types also works
|
//cast from double to exact types also works
|
||||||
FT best_fitness = FT((std::numeric_limits<double>::max)());
|
FT best_fitness = FT((std::numeric_limits<double>::max)());
|
||||||
for(std::size_t i=0, ps=m_simplices.size(); i<ps; ++i)
|
for(std::size_t i=0, ps=m_simplices.size(); i<ps; ++i)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue