[mlpack-git] [mlpack/mlpack] Replaced SortStruct by std::pair (#721)
Ryan Curtin
notifications at github.com
Tue Jul 12 09:12:31 EDT 2016
> }
> }
>
> - std::sort(sorted.begin(), sorted.end(), structComp<ElemType>);
> + std::sort(sorted.begin(), sorted.end(),
> + [] (const std::pair<ElemType, size_t>& p1,
> + const std::pair<ElemType, size_t>& p2)
> + {
> + return p1.first < p2.first;
> + });
Do you think it would be better to define this comparator function in some header file in the rectangle_tree directory instead of writing the lambda many times? If not, I'll merge as-is, but it might be a good idea to make the code a bit shorter.
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/721/files/ee2a8a1461a33edd830747dccde117ac2cfb12b7#r70434380
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160712/75e7e1d7/attachment.html>
More information about the mlpack-git
mailing list