mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-14 12:52:09 +00:00
fixed near/far macros issue by renaming near(to to_nearest), far(to to_furthest) and centroid to to_centroid for consistency.
[SVN r80398]
This commit is contained in:
@@ -137,15 +137,15 @@ must be greater than 10 */</span>
|
||||
|
||||
<span class="comment">/* same as default - distance between Indexable's closest point and a query point
|
||||
must be greater than 10 */</span>
|
||||
<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">near</span><span class="special">(</span><span class="number">10</span><span class="special">)),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
|
||||
<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">to_nearest</span><span class="special">(</span><span class="number">10</span><span class="special">)),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
|
||||
|
||||
<span class="comment">/* distance between Indexable's furthest point and a query point
|
||||
must be greater than 10 */</span>
|
||||
<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">far</span><span class="special">(</span><span class="number">10</span><span class="special">)),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
|
||||
<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">to_furthest</span><span class="special">(</span><span class="number">10</span><span class="special">)),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
|
||||
|
||||
<span class="comment">/* distance between Indexable's centroid and a query point
|
||||
must be greater than 10 */</span>
|
||||
<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">centroid</span><span class="special">(</span><span class="number">10</span><span class="special">)),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
|
||||
<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">to_centroid</span><span class="special">(</span><span class="number">10</span><span class="special">)),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section">
|
||||
@@ -163,7 +163,7 @@ must be greater than 10 */</span>
|
||||
<a href="http://www.boost.org/libs/geometry/doc/html/geometry/reference/concepts/concept_point.html" target="_top">Point</a> <span class="identifier">pt</span><span class="special">(...);</span>
|
||||
<a href="http://www.boost.org/libs/geometry/doc/html/geometry/reference/concepts/concept_box.html" target="_top">Box</a> <span class="identifier">b</span><span class="special">(...);</span>
|
||||
|
||||
<span class="identifier">size_t</span> <span class="identifier">n1</span> <span class="special">=</span> <span class="identifier">rt</span><span class="special">.</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">far</span><span class="special">(</span><span class="number">1</span><span class="special">),</span> <span class="number">10</span><span class="special">),</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">b</span><span class="special">),</span> <span class="identifier">returned_value</span><span class="special">);</span>
|
||||
<span class="identifier">size_t</span> <span class="identifier">n1</span> <span class="special">=</span> <span class="identifier">rt</span><span class="special">.</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">to_furthest</span><span class="special">(</span><span class="number">1</span><span class="special">),</span> <span class="number">10</span><span class="special">),</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">b</span><span class="special">),</span> <span class="identifier">returned_value</span><span class="special">);</span>
|
||||
|
||||
<span class="identifier">size_t</span> <span class="identifier">n2</span> <span class="special">=</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">pt</span><span class="special">,</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">within</span><span class="special">(</span><span class="identifier">b</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"><p><small>Last revised: August 26, 2012 at 01:34:23 GMT</small></p></td>
|
||||
<td align="left"><p><small>Last revised: September 04, 2012 at 18:00:33 GMT</small></p></td>
|
||||
<td align="right"><div class="copyright-footer"></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -92,15 +92,15 @@ non-point `__indexable__` should be taken into account in the routine calculatin
|
||||
|
||||
/* same as default - distance between Indexable's closest point and a query point
|
||||
must be greater than 10 */
|
||||
index::nearest(rt, index::min_bounded(pt, index::near(10)), k, std::back_inserter(returned_values));
|
||||
index::nearest(rt, index::min_bounded(pt, index::to_nearest(10)), k, std::back_inserter(returned_values));
|
||||
|
||||
/* distance between Indexable's furthest point and a query point
|
||||
must be greater than 10 */
|
||||
index::nearest(rt, index::min_bounded(pt, index::far(10)), k, std::back_inserter(returned_values));
|
||||
index::nearest(rt, index::min_bounded(pt, index::to_furthest(10)), k, std::back_inserter(returned_values));
|
||||
|
||||
/* distance between Indexable's centroid and a query point
|
||||
must be greater than 10 */
|
||||
index::nearest(rt, index::min_bounded(pt, index::centroid(10)), k, std::back_inserter(returned_values));
|
||||
index::nearest(rt, index::min_bounded(pt, index::to_centroid(10)), k, std::back_inserter(returned_values));
|
||||
|
||||
[endsect]
|
||||
|
||||
@@ -114,7 +114,7 @@ It is possible to use spatial predicates described before in nearest neighbours
|
||||
__point__ pt(...);
|
||||
__box__ b(...);
|
||||
|
||||
size_t n1 = rt.nearest(index::bounded(pt, index::far(1), 10), index::intersects(b), returned_value);
|
||||
size_t n1 = rt.nearest(index::bounded(pt, index::to_furthest(1), 10), index::intersects(b), returned_value);
|
||||
|
||||
size_t n2 = index::nearest(rt, pt, k, index::within(b), std::back_inserter(returned_values));
|
||||
|
||||
|
||||
@@ -33,31 +33,31 @@ namespace detail {
|
||||
// relations
|
||||
|
||||
template <typename T>
|
||||
struct near
|
||||
struct to_nearest
|
||||
{
|
||||
near(T const& v) : value(v) {}
|
||||
to_nearest(T const& v) : value(v) {}
|
||||
T value;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct centroid
|
||||
struct to_centroid
|
||||
{
|
||||
centroid(T const& v) : value(v) {}
|
||||
to_centroid(T const& v) : value(v) {}
|
||||
T value;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct far
|
||||
struct to_furthest
|
||||
{
|
||||
far(T const& v) : value(v) {}
|
||||
to_furthest(T const& v) : value(v) {}
|
||||
T value;
|
||||
};
|
||||
|
||||
// tags
|
||||
|
||||
struct near_tag {};
|
||||
struct centroid_tag {};
|
||||
struct far_tag {};
|
||||
struct to_nearest_tag {};
|
||||
struct to_centroid_tag {};
|
||||
struct to_furthest_tag {};
|
||||
|
||||
// relation
|
||||
|
||||
@@ -65,36 +65,36 @@ template <typename T>
|
||||
struct relation
|
||||
{
|
||||
typedef T value_type;
|
||||
typedef near_tag tag;
|
||||
typedef to_nearest_tag tag;
|
||||
static inline T const& value(T const& v) { return v; }
|
||||
static inline T & value(T & v) { return v; }
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct relation< near<T> >
|
||||
struct relation< to_nearest<T> >
|
||||
{
|
||||
typedef T value_type;
|
||||
typedef near_tag tag;
|
||||
static inline T const& value(near<T> const& r) { return r.value; }
|
||||
static inline T & value(near<T> & r) { return r.value; }
|
||||
typedef to_nearest_tag tag;
|
||||
static inline T const& value(to_nearest<T> const& r) { return r.value; }
|
||||
static inline T & value(to_nearest<T> & r) { return r.value; }
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct relation< centroid<T> >
|
||||
struct relation< to_centroid<T> >
|
||||
{
|
||||
typedef T value_type;
|
||||
typedef centroid_tag tag;
|
||||
static inline T const& value(centroid<T> const& r) { return r.value; }
|
||||
static inline T & value(centroid<T> & r) { return r.value; }
|
||||
typedef to_centroid_tag tag;
|
||||
static inline T const& value(to_centroid<T> const& r) { return r.value; }
|
||||
static inline T & value(to_centroid<T> & r) { return r.value; }
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct relation< far<T> >
|
||||
struct relation< to_furthest<T> >
|
||||
{
|
||||
typedef T value_type;
|
||||
typedef far_tag tag;
|
||||
static inline T const& value(far<T> const& r) { return r.value; }
|
||||
static inline T & value(far<T> & r) { return r.value; }
|
||||
typedef to_furthest_tag tag;
|
||||
static inline T const& value(to_furthest<T> const& r) { return r.value; }
|
||||
static inline T & value(to_furthest<T> & r) { return r.value; }
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
@@ -115,9 +115,9 @@ closer or further than value v. This is default relation.
|
||||
\param v Point or bound value.
|
||||
*/
|
||||
template <typename T>
|
||||
detail::near<T> near(T const& v)
|
||||
detail::to_nearest<T> to_nearest(T const& v)
|
||||
{
|
||||
return detail::near<T>(v);
|
||||
return detail::to_nearest<T>(v);
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -133,9 +133,9 @@ closer or further than value v.
|
||||
\param v Point or bound value.
|
||||
*/
|
||||
template <typename T>
|
||||
detail::centroid<T> centroid(T const& v)
|
||||
detail::to_centroid<T> to_centroid(T const& v)
|
||||
{
|
||||
return detail::centroid<T>(v);
|
||||
return detail::to_centroid<T>(v);
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -152,9 +152,9 @@ closer or further than value v.
|
||||
\param v Point or bound value.
|
||||
*/
|
||||
template <typename T>
|
||||
detail::far<T> far(T const& v)
|
||||
detail::to_furthest<T> to_furthest(T const& v)
|
||||
{
|
||||
return detail::far<T>(v);
|
||||
return detail::to_furthest<T>(v);
|
||||
}
|
||||
|
||||
// distance predicates
|
||||
@@ -244,8 +244,8 @@ by PointRelation. This is default nearest predicate.
|
||||
|
||||
\tparam PointRelation PointRelation type.
|
||||
|
||||
\param pr The point relation. This may be generated by bgi::near(Point),
|
||||
bgi::centroid(Point) or bgi::far(Point).
|
||||
\param pr The point relation. This may be generated by bgi::to_nearest(Point),
|
||||
bgi::to_centroid(Point) or bgi::to_furthest(Point).
|
||||
*/
|
||||
template <typename PointRelation>
|
||||
inline detail::unbounded<PointRelation>
|
||||
@@ -264,10 +264,10 @@ Point but only if nearest points are further than some distance.
|
||||
\tparam PointRelation PointRelation type.
|
||||
\tparam MinRelation MinRelation type.
|
||||
|
||||
\param pr The point relation. This may be generated by bgi::near(Point),
|
||||
bgi::centroid(Point) or bgi::far(Point).
|
||||
\param minr The minimum bound relation. This may be generated by bgi::near(min_distance),
|
||||
bgi::centroid(min_distance) or bgi::far(min_distance).
|
||||
\param pr The point relation. This may be generated by bgi::to_nearest(Point),
|
||||
bgi::to_centroid(Point) or bgi::to_furthest(Point).
|
||||
\param minr The minimum bound relation. This may be generated by bgi::to_nearest(min_distance),
|
||||
bgi::to_centroid(min_distance) or bgi::to_furthest(min_distance).
|
||||
*/
|
||||
template <typename PointRelation, typename MinRelation>
|
||||
inline detail::min_bounded<PointRelation, MinRelation>
|
||||
@@ -286,10 +286,10 @@ Point but only if nearest points are closer than some distance.
|
||||
\tparam PointRelation PointRelation type.
|
||||
\tparam MaxRelation MaxRelation type.
|
||||
|
||||
\param pr The point relation. This may be generated by bgi::near(Point),
|
||||
bgi::centroid(Point) or bgi::far(Point).
|
||||
\param maxr The maximum bound relation. This may be generated by bgi::near(max_distance),
|
||||
bgi::centroid(max_distance) or bgi::far(max_distance).
|
||||
\param pr The point relation. This may be generated by bgi::to_nearest(Point),
|
||||
bgi::to_centroid(Point) or bgi::to_furthest(Point).
|
||||
\param maxr The maximum bound relation. This may be generated by bgi::to_nearest(max_distance),
|
||||
bgi::to_centroid(max_distance) or bgi::to_furthest(max_distance).
|
||||
*/
|
||||
template <typename PointRelation, typename MaxRelation>
|
||||
inline detail::max_bounded<PointRelation, MaxRelation>
|
||||
@@ -310,12 +310,12 @@ points are further than some distance and closer than some other distance.
|
||||
\tparam MinRelation MinRelation type.
|
||||
\tparam MaxRelation MaxRelation type.
|
||||
|
||||
\param pr The point relation. This may be generated by bgi::near(Point),
|
||||
bgi::centroid(Point) or bgi::far(Point).
|
||||
\param minr The minimum bound relation. This may be generated by bgi::near(min_distance),
|
||||
bgi::centroid(min_distance) or bgi::far(min_distance).
|
||||
\param maxr The maximum bound relation. This may be generated by bgi::near(max_distance),
|
||||
bgi::centroid(max_distance) or bgi::far(max_distance).
|
||||
\param pr The point relation. This may be generated by bgi::to_nearest(Point),
|
||||
bgi::to_centroid(Point) or bgi::to_furthest(Point).
|
||||
\param minr The minimum bound relation. This may be generated by bgi::to_nearest(min_distance),
|
||||
bgi::to_centroid(min_distance) or bgi::to_furthest(min_distance).
|
||||
\param maxr The maximum bound relation. This may be generated by bgi::to_nearest(max_distance),
|
||||
bgi::to_centroid(max_distance) or bgi::to_furthest(max_distance).
|
||||
*/
|
||||
template <typename PointRelation, typename MinRelation, typename MaxRelation>
|
||||
inline detail::bounded<PointRelation, MinRelation, MaxRelation>
|
||||
@@ -483,7 +483,7 @@ struct distances_calc_impl_rel
|
||||
|
||||
template <typename T>
|
||||
struct distances_calc_impl_rel<
|
||||
cdist<T, detail::near_tag>
|
||||
cdist<T, detail::to_nearest_tag>
|
||||
>
|
||||
{
|
||||
template <typename Point, typename Indexable>
|
||||
@@ -496,7 +496,7 @@ struct distances_calc_impl_rel<
|
||||
|
||||
template <typename T>
|
||||
struct distances_calc_impl_rel<
|
||||
cdist<T, detail::centroid_tag>
|
||||
cdist<T, detail::to_centroid_tag>
|
||||
>
|
||||
{
|
||||
template <typename Point, typename Indexable>
|
||||
@@ -509,7 +509,7 @@ struct distances_calc_impl_rel<
|
||||
|
||||
template <typename T>
|
||||
struct distances_calc_impl_rel<
|
||||
cdist<T, detail::far_tag>
|
||||
cdist<T, detail::to_furthest_tag>
|
||||
>
|
||||
{
|
||||
template <typename Point, typename Indexable>
|
||||
|
||||
@@ -30,7 +30,7 @@ struct distances_calc<
|
||||
typedef typename detail::relation<PointRelation>::value_type point_type;
|
||||
typedef typename geometry::default_distance_result<point_type, Box>::type distance_type;
|
||||
|
||||
typedef detail::cdist<distance_type, detail::near_tag> result_type;
|
||||
typedef detail::cdist<distance_type, detail::to_nearest_tag> result_type;
|
||||
|
||||
static inline result_type apply(PointRelation const& p, Box const& i)
|
||||
{
|
||||
@@ -51,7 +51,7 @@ struct distances_calc<
|
||||
typedef typename detail::relation<PointRelation>::value_type point_type;
|
||||
typedef typename geometry::default_distance_result<point_type, Box>::type distance_type;
|
||||
|
||||
typedef detail::cdist<distance_type, detail::near_tag> result_type;
|
||||
typedef detail::cdist<distance_type, detail::to_nearest_tag> result_type;
|
||||
|
||||
static inline result_type apply(detail::unbounded<PointRelation> const& pp, Box const& i)
|
||||
{
|
||||
@@ -73,8 +73,8 @@ struct distances_calc<
|
||||
typedef typename geometry::default_distance_result<point_type, Box>::type distance_type;
|
||||
|
||||
typedef typename detail::cdist_merge<
|
||||
cdist<distance_type, detail::near_tag>,
|
||||
cdist<distance_type, detail::far_tag>
|
||||
cdist<distance_type, detail::to_nearest_tag>,
|
||||
cdist<distance_type, detail::to_furthest_tag>
|
||||
>::type result_type;
|
||||
|
||||
static inline result_type apply(detail::min_bounded<PointRelation, MinRelation> const& pp, Box const& i)
|
||||
@@ -96,7 +96,7 @@ struct distances_calc<
|
||||
typedef typename detail::relation<PointRelation>::value_type point_type;
|
||||
typedef typename geometry::default_distance_result<point_type, Box>::type distance_type;
|
||||
|
||||
typedef cdist<distance_type, detail::near_tag> result_type;
|
||||
typedef cdist<distance_type, detail::to_nearest_tag> result_type;
|
||||
|
||||
static inline result_type apply(detail::max_bounded<PointRelation, MaxRelation> const& pp, Box const& i)
|
||||
{
|
||||
@@ -118,8 +118,8 @@ struct distances_calc<
|
||||
typedef typename geometry::default_distance_result<point_type, Box>::type distance_type;
|
||||
|
||||
typedef typename detail::cdist_merge<
|
||||
cdist<distance_type, detail::near_tag>,
|
||||
cdist<distance_type, detail::far_tag>
|
||||
cdist<distance_type, detail::to_nearest_tag>,
|
||||
cdist<distance_type, detail::to_furthest_tag>
|
||||
>::type result_type;
|
||||
|
||||
static inline result_type apply(detail::bounded<PointRelation, MinRelation, MaxRelation> const& pp, Box const& i)
|
||||
@@ -173,7 +173,7 @@ struct distances_predicates_check<
|
||||
Distances const& d)
|
||||
{
|
||||
return pred.comparable_min
|
||||
<= cdist_value<Distances>::template get<detail::far_tag>(d);
|
||||
<= cdist_value<Distances>::template get<detail::to_furthest_tag>(d);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -188,7 +188,7 @@ struct distances_predicates_check<
|
||||
detail::max_bounded<PointRelation, MaxRelation> const& pred,
|
||||
Distances const& d)
|
||||
{
|
||||
return cdist_value<Distances>::template get<detail::near_tag>(d)
|
||||
return cdist_value<Distances>::template get<detail::to_nearest_tag>(d)
|
||||
<= pred.comparable_max;
|
||||
}
|
||||
};
|
||||
@@ -205,8 +205,8 @@ struct distances_predicates_check<
|
||||
Distances const& d)
|
||||
{
|
||||
return pred.comparable_min
|
||||
<= cdist_value<Distances>::template get<detail::far_tag>(d)
|
||||
&& cdist_value<Distances>::template get<detail::near_tag>(d)
|
||||
<= cdist_value<Distances>::template get<detail::to_furthest_tag>(d)
|
||||
&& cdist_value<Distances>::template get<detail::to_nearest_tag>(d)
|
||||
<= pred.comparable_max;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -392,13 +392,13 @@ public:
|
||||
|
||||
\param dpred The distances predicates. May be a Point. This is default case where Value which
|
||||
nearest point is closest to Point is returned. May be a PointRelation which define
|
||||
how distance to Value is calculated. This may be generated by bgi::near(Point),
|
||||
bgi::centroid(Point) or bgi::far(Point). DistancesPredicates may also define distances
|
||||
how distance to Value is calculated. This may be generated by bgi::to_nearest(Point),
|
||||
bgi::to_centroid(Point) or bgi::to_furthest(Point). DistancesPredicates may also define distances
|
||||
bounds. E.g. that some distance must be between min_distance and max_distance. This may
|
||||
be generated by bgi::unbounded(PointRelation) - default case, bgi::min_bounded(PointRelation, MinRelation),
|
||||
bgi::max_bounded(PointRelation, MaxRelation), bgi::bounded(PointRelation, MinRelation, MaxRelation).
|
||||
MinRelation and MaxRelation describes bounds and may be generated by bgi::near(dist_bound),
|
||||
bgi::centroid(dist_bound) or bgi::far(dist_bound).
|
||||
MinRelation and MaxRelation describes bounds and may be generated by bgi::to_nearest(dist_bound),
|
||||
bgi::to_centroid(dist_bound) or bgi::to_furthest(dist_bound).
|
||||
|
||||
\param v The reference to the object which will contain the result.
|
||||
|
||||
@@ -416,13 +416,13 @@ public:
|
||||
|
||||
\param dpred The distances predicates. May be a Point. This is default case where Value which
|
||||
nearest point is closest to Point is returned. May be a PointRelation which define
|
||||
how distance to Value is calculated. This may be generated by bgi::near(Point),
|
||||
bgi::centroid(Point) or bgi::far(Point). DistancesPredicates may also define distances
|
||||
how distance to Value is calculated. This may be generated by bgi::to_nearest(Point),
|
||||
bgi::to_centroid(Point) or bgi::to_furthest(Point). DistancesPredicates may also define distances
|
||||
bounds. E.g. that some distance must be between min_distance and max_distance. This may
|
||||
be generated by bgi::unbounded(PointRelation) - default case, bgi::min_bounded(PointRelation, MinRelation),
|
||||
bgi::max_bounded(PointRelation, MaxRelation), bgi::bounded(PointRelation, MinRelation, MaxRelation).
|
||||
MinRelation and MaxRelation describes bounds and may be generated by bgi::near(dist_bound),
|
||||
bgi::centroid(dist_bound) or bgi::far(dist_bound).
|
||||
MinRelation and MaxRelation describes bounds and may be generated by bgi::to_nearest(dist_bound),
|
||||
bgi::to_centroid(dist_bound) or bgi::to_furthest(dist_bound).
|
||||
\param pred The spatial predicates. May be a Geometry (in this case default
|
||||
predicate - intersects is used) or generated by bgi::covered_by(geometry),
|
||||
bgi::disjoint(geometry), bgi::intersects(geometry), bgi::overlaps(geometry),
|
||||
@@ -445,13 +445,13 @@ public:
|
||||
|
||||
\param dpred The distances predicates. May be a Point. This is default case where Value which
|
||||
nearest point is closest to Point is returned. May be a PointRelation which define
|
||||
how distance to Value is calculated. This may be generated by bgi::near(Point),
|
||||
bgi::centroid(Point) or bgi::far(Point). DistancesPredicates may also define distances
|
||||
how distance to Value is calculated. This may be generated by bgi::to_nearest(Point),
|
||||
bgi::to_centroid(Point) or bgi::to_furthest(Point). DistancesPredicates may also define distances
|
||||
bounds. E.g. that some distance must be between min_distance and max_distance. This may
|
||||
be generated by bgi::unbounded(PointRelation) - default case, bgi::min_bounded(PointRelation, MinRelation),
|
||||
bgi::max_bounded(PointRelation, MaxRelation), bgi::bounded(PointRelation, MinRelation, MaxRelation).
|
||||
MinRelation and MaxRelation describes bounds and may be generated by bgi::near(dist_bound),
|
||||
bgi::centroid(dist_bound) or bgi::far(dist_bound).
|
||||
MinRelation and MaxRelation describes bounds and may be generated by bgi::to_nearest(dist_bound),
|
||||
bgi::to_centroid(dist_bound) or bgi::to_furthest(dist_bound).
|
||||
\param k The max number of values.
|
||||
\param out_it The output iterator of the result range. E.g. a back_insert_iterator.
|
||||
|
||||
@@ -469,13 +469,13 @@ public:
|
||||
|
||||
\param dpred The distances predicates. May be a Point. This is default case where Value which
|
||||
nearest point is closest to Point is returned. May be a PointRelation which define
|
||||
how distance to Value is calculated. This may be generated by bgi::near(Point),
|
||||
bgi::centroid(Point) or bgi::far(Point). DistancesPredicates may also define distances
|
||||
how distance to Value is calculated. This may be generated by bgi::to_nearest(Point),
|
||||
bgi::to_centroid(Point) or bgi::to_furthest(Point). DistancesPredicates may also define distances
|
||||
bounds. E.g. that some distance must be between min_distance and max_distance. This may
|
||||
be generated by bgi::unbounded(PointRelation) - default case, bgi::min_bounded(PointRelation, MinRelation),
|
||||
bgi::max_bounded(PointRelation, MaxRelation), bgi::bounded(PointRelation, MinRelation, MaxRelation).
|
||||
MinRelation and MaxRelation describes bounds and may be generated by bgi::near(dist_bound),
|
||||
bgi::centroid(dist_bound) or bgi::far(dist_bound).
|
||||
MinRelation and MaxRelation describes bounds and may be generated by bgi::to_nearest(dist_bound),
|
||||
bgi::to_centroid(dist_bound) or bgi::to_furthest(dist_bound).
|
||||
\param k The max number of values.
|
||||
\param pred The spatial predicates. May be a Geometry (in this case default
|
||||
predicate - intersects is used) or generated by bgi::covered_by(geometry),
|
||||
|
||||
@@ -308,9 +308,9 @@ private:
|
||||
std::pair<node_distances_type, const node *> const& p2)
|
||||
{
|
||||
return index::detail::cdist_value<node_distances_type>
|
||||
::template get<index::detail::near_tag>(p1.first)
|
||||
::template get<index::detail::to_nearest_tag>(p1.first)
|
||||
< index::detail::cdist_value<node_distances_type>
|
||||
::template get<index::detail::near_tag>(p2.first);
|
||||
::template get<index::detail::to_nearest_tag>(p2.first);
|
||||
}
|
||||
|
||||
template <typename Distance>
|
||||
@@ -318,7 +318,7 @@ private:
|
||||
{
|
||||
return smallest_dist
|
||||
< index::detail::cdist_value<node_distances_type>
|
||||
::template get<index::detail::near_tag>(d);
|
||||
::template get<index::detail::to_nearest_tag>(d);
|
||||
}
|
||||
|
||||
parameters_type const& m_parameters;
|
||||
|
||||
@@ -20,12 +20,6 @@
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/random.hpp>
|
||||
|
||||
/*#include <boost/pool/pool_alloc.hpp>
|
||||
#undef near
|
||||
#undef far
|
||||
#undef min
|
||||
#undef max*/
|
||||
|
||||
template <typename V>
|
||||
struct test_pred
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user