[mlpack] Range search with periodic boundary conditions

董理 dongli at lasg.iap.ac.cn
Tue May 12 02:44:03 EDT 2015


Dear Ryan,

One more thing. I would like to directly use the space coordinate class in my project instead of arma::mat in CoverTree, such as arma::field<SpaceCoord> (There is ‘col’ method in arma::field, but no ‘unsafe_col’). Because there are auxiliary data like cosLat, etc. It seems that arma::mat is hard-coded. Could I change this easily?

Best regards,
Li

> On 2015年5月12日, at 上午10:45, Ryan Curtin <ryan at ratml.org> wrote:
> 
> On Tue, May 12, 2015 at 06:45:43AM +0800, 董理 wrote:
>> Dear Ryan,
>> 
>> Thanks for your reply! I searched out on the internet, and found the following question:
>> 
>> http://stackoverflow.com/questions/6917664/nearest-neighbor-search-with-periodic-boundary-conditions <http://stackoverflow.com/questions/6917664/nearest-neighbor-search-with-periodic-boundary-conditions>
>> 
>> It seems ‘cover tree’ can be used for periodic boundary condition. I see there already is an implementation of cover tree. Could I use it?
> 
> Yes, you could do that also; I didn't think of that.  If you write a
> periodic metric (and it satisfies the conditions of a metric,
> importantly, the triangle inequality; I haven't thought about this),
> then you can plug that in as the MetricType template parameter to the
> CoverTree class, and then use that with the NeighborSearch class and you
> will get your results correctly.
> 
> -- 
> Ryan Curtin    | "No... not without incident."
> ryan at ratml.org |   - John Preston





More information about the mlpack mailing list