[Spatial] Declaring a metric problem
Library of generic, k-d tree multi-dimensional containers
Brought to you by:
bouhdevel
From: Taylor, W. <tay...@se...> - 2017-02-11 07:05:01
|
Hello, We are trying to find the 5 closest spots from a given longitude and latitude. And we are getting a undefined reference. This is our struct that we defined for our metric typedef spatial::point_multiset<2, coord, spatial::accessor_less<coord_acc, coord>> tree; typedef double distance_type; //[1] double distance_to_key(dimension_type rank, const coord& origin, const coord& key) const; //[2], [4] double distance_to_plane(dimension_type rank, dimension_type dim, const coord& origin, const coord& key) const; //[3],[4] double distance_to_plane(dimension_type rank, dimension_type dim, const coord& origin, const coord& key) { return 0.0; } double distance_to_key(dimension_type rank, const coord& origin, const coord& key) { distance_type distance; distance = getDistance(origin.lat, origin.lon, key.lat, key.lon, 'M'); return distance; } }; This is how we call the neighbor iterator neighbor_iterator<tree, guacMet> iter = neighbor_begin(container, metric, target); I do not know hwy we are getting a undefined reference to guacMet.distance_to_plane and guacMet_distance_to_key Any help would be greatly appreciated. Thank you Wes |