'compute density' -> 'require_uniform_sampling'

This commit is contained in:
Shihao Wu 2014-06-09 16:37:56 +08:00
parent cf267b2524
commit d778282040
3 changed files with 16 additions and 15 deletions

View File

@ -177,12 +177,12 @@ A flow chart of the WLOP algorithm
Comparison for three simplification methods: Left: Random simplification result. Middle: Grid simplification result. Right: WLOP simplification result.
\cgalFigureEnd
\subsubsection Point_set_processing_3WLOP_Parameter Parameter: compute_density
Computing density weights for each point is an optional preprocessing. For example, as shown in the following figure, if <code>`compute_density=false`</code>, WLOP preserves the intrinsic non-uniform sampling of the original points; if <code>`compute_density=true`</code>, WLOP is resilient to non-uniform sampling and generate sample points with more uniform distribution, at the expense of computational time.
\subsubsection Point_set_processing_3WLOP_Parameter Parameter: require_uniform_sampling
Computing density weights for each point is an optional preprocessing. For example, as shown in the following figure, if <code>`require_uniform_sampling=false`</code>, WLOP preserves the intrinsic non-uniform sampling of the original points; if <code>`require_uniform_sampling=true`</code>, WLOP is resilient to non-uniform sampling and generate sample points with more uniform distribution, at the expense of computational time.
\cgalFigureBegin{Point_set_processing_3figWLOP_parameter_density, WLOP_parameter_density.jpg}
Comparison between with and without density: Left: input. Middle: <code>`compute_density = false`</code>. Right: <code>`compute_density=true`</code>.
Comparison between with and without density: Left: input. Middle: <code>`require_uniform_sampling = false`</code>. Right: <code>`require_uniform_sampling=true`</code>.
\cgalFigureEnd
\subsubsection Point_set_processing_3WLOP_parallel_performance Parallel Performance:

View File

@ -43,7 +43,8 @@ int main(void)
const double retain_percentage = 2; // percentage of points to retain.
const double neighbor_radius = 0.03; // neighbors size.
const unsigned int iter_number = 30; // number of iterations.
const bool compute_density = true; //compute density of input point set.
const bool require_uniform_sampling = true; // Optional pre-processing.
CGAL::wlop_simplify_and_regularize_point_set
<CGAL::Parallel_tag> // parallel version
(points.begin(),
@ -52,7 +53,7 @@ int main(void)
retain_percentage,
neighbor_radius,
iter_number,
compute_density);
require_uniform_sampling);
*/
//with all parameters ends

View File

@ -348,7 +348,7 @@ wlop_simplify_and_regularize_point_set(
///< The algorithm is very slow for large values.
///< Default: 0.05 * diameter of bounding box.
unsigned int iter_number, ///< number of iterations. Default: 35.
bool compute_density, ///< if needed to compute density when the
bool require_uniform_sampling,///< if needed to compute density when the
///< input is nonuniform. Default: false.
const Kernel& ///< geometric traits.
)
@ -434,7 +434,7 @@ wlop_simplify_and_regularize_point_set(
// Compute original density weight for original points if user needed
std::vector<FT> original_density_weights;
if (compute_density)
if (require_uniform_sampling)
{
//parallel
#ifdef CGAL_LINKED_WITH_TBB
@ -592,7 +592,7 @@ wlop_simplify_and_regularize_point_set(
const double retain_percentage, ///< percentage of points to retain
double neighbor_radius, ///< size of neighbors.
const unsigned int max_iter_number, ///< number of iterations.
const bool compute_density ///< if needed to compute density
const bool require_uniform_sampling ///< if needed to compute density
/// to generate more rugularized result.
)
{
@ -608,7 +608,7 @@ wlop_simplify_and_regularize_point_set(
retain_percentage,
neighbor_radius,
max_iter_number,
compute_density,
require_uniform_sampling,
Kernel());
}
/// @endcond
@ -629,8 +629,8 @@ wlop_simplify_and_regularize_point_set(
const double retain_percentage = 5, ///< percentage of points to retain
double neighbor_radius = -1, ///< size of neighbors.
const unsigned int max_iter_number = 35, ///< number of iterations.
const bool compute_density = false ///< if needed to compute density to
/// generate more uniform result.
const bool require_uniform_sampling = false ///< if needed to compute density
/// to generate a more uniform result.
)
{
return wlop_simplify_and_regularize_point_set
@ -646,7 +646,7 @@ wlop_simplify_and_regularize_point_set(
retain_percentage,
neighbor_radius,
max_iter_number,
compute_density);
require_uniform_sampling);
}
/// @endcond
@ -664,8 +664,8 @@ wlop_simplify_and_regularize_point_set(
const double retain_percentage = 5, ///< percentage of points to retain
double neighbor_radius = -1, ///< size of neighbors.
const unsigned int max_iter_number = 35, ///< number of iterations.
const bool compute_density = false ///< if needed to compute density to
/// generate more uniform result.
const bool require_uniform_sampling = false ///< if needed to compute density
///to generate a more uniform result.
)
{
typedef typename value_type_traits<OutputIterator>::type OutputIteratorType;
@ -683,7 +683,7 @@ wlop_simplify_and_regularize_point_set(
retain_percentage,
neighbor_radius,
max_iter_number,
compute_density);
require_uniform_sampling);
}
/// @endcond