Topic: Interest in multidimensional sorting/searching


Author: tkeitt@gmail.com
Date: Tue, 20 Mar 2018 11:43:35 -0700 (PDT)
Raw View
------=_Part_16393_539033600.1521571415852
Content-Type: multipart/alternative;
 boundary="----=_Part_16394_282944088.1521571415852"

------=_Part_16394_282944088.1521571415852
Content-Type: text/plain; charset="UTF-8"

I have written a small library that adds analogs of std::sort,
lower/upper_bound, etc. to work on containers of tuple-like types. It uses
recursive partitioning around the median as in a kd-tree. I am wondering if
there is any interest in adding these to the standard library. A report can
be found here: https://thk686.github.io/kdtools/articles/kdtools.html. The
current reference implementation is very simple C++11 but manages
reasonable sorting and querying performance. I was thinking perhaps adding
a namespace std::tuples::sort, std::tuples::lower_bound, etc.

THK

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/f8b4432f-d4cc-4c53-8875-82a708ced473%40isocpp.org.

------=_Part_16394_282944088.1521571415852
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I have written a small library that adds analogs of std::s=
ort, lower/upper_bound, etc. to work on containers of tuple-like types. It =
uses recursive partitioning around the median as in a kd-tree. I am wonderi=
ng if there is any interest in adding these to the standard library. A repo=
rt can be found here:=C2=A0https://thk686.github.io/kdtools/articles/kdtool=
s.html. The current reference implementation is very simple C++11 but manag=
es reasonable sorting and querying performance. I was thinking perhaps addi=
ng a namespace std::tuples::sort, std::tuples::lower_bound, etc.=C2=A0<div>=
<br></div><div>THK</div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/f8b4432f-d4cc-4c53-8875-82a708ced473%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/f8b4432f-d4cc-4c53-8875-82a708ced473=
%40isocpp.org</a>.<br />

------=_Part_16394_282944088.1521571415852--

------=_Part_16393_539033600.1521571415852--

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Tue, 20 Mar 2018 18:12:09 -0400
Raw View
--000000000000a3081f0567df5d70
Content-Type: text/plain; charset="UTF-8"

I'd like next_dim and get<> to be passed in as a template param (optional
param at end probably).
I sometimes have the same data, but I want to sort it differently.
I used an "extract_info" thing that I used to answer all the customizable
questions.

I think this should go into boost more than std.  I was thinking of putting
mine there.

Mine also has an iterator to give the next-closest point, although (as you
can imagine) this is a heavy and complicated iterator.
It would probably be much easier (but still heavy?) if/when we have
coroutines.


There is also lots of research in this area, particularly when you relax
the rules a bit and allow _mostly_ correct answers.


On Tue, Mar 20, 2018 at 2:43 PM, <tkeitt@gmail.com> wrote:

> I have written a small library that adds analogs of std::sort,
> lower/upper_bound, etc. to work on containers of tuple-like types. It uses
> recursive partitioning around the median as in a kd-tree. I am wondering if
> there is any interest in adding these to the standard library. A report can
> be found here: https://thk686.github.io/kdtools/articles/kdtools.html.
> The current reference implementation is very simple C++11 but manages
> reasonable sorting and querying performance. I was thinking perhaps adding
> a namespace std::tuples::sort, std::tuples::lower_bound, etc.
>
> THK
>
> --
> You received this message because you are subscribed to the Google Groups
> "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> To view this discussion on the web visit https://groups.google.com/a/
> isocpp.org/d/msgid/std-proposals/f8b4432f-d4cc-4c53-
> 8875-82a708ced473%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/f8b4432f-d4cc-4c53-8875-82a708ced473%40isocpp.org?utm_medium=email&utm_source=footer>
> .
>



--
Be seeing you,
Tony

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOHCbivWbSegOUKvqgdqABYsh3_kvCVkPoZzEZ_f_jS8WLz-bg%40mail.gmail.com.

--000000000000a3081f0567df5d70
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div><div>I&#39;d like next_dim and get&lt;&gt; =
to be passed in as a template param (optional param at end probably).<br></=
div>I sometimes have the same data, but I want to sort it differently.<br><=
/div>I used an &quot;extract_info&quot; thing that I used to answer all the=
 customizable questions.<br><br></div>I think this should go into boost mor=
e than std.=C2=A0 I was thinking of putting mine there.<br><br></div><div>M=
ine also has an iterator to give the next-closest point, although (as you c=
an imagine) this is a heavy and complicated iterator.<br></div><div>It woul=
d probably be much easier (but still heavy?) if/when we have coroutines.<br=
><br></div><div><br></div>There is also lots of research in this area, part=
icularly when you relax the rules a bit and allow _mostly_ correct answers.=
<br><br></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On =
Tue, Mar 20, 2018 at 2:43 PM,  <span dir=3D"ltr">&lt;<a href=3D"mailto:tkei=
tt@gmail.com" target=3D"_blank">tkeitt@gmail.com</a>&gt;</span> wrote:<br><=
blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px=
 #ccc solid;padding-left:1ex"><div dir=3D"ltr">I have written a small libra=
ry that adds analogs of std::sort, lower/upper_bound, etc. to work on conta=
iners of tuple-like types. It uses recursive partitioning around the median=
 as in a kd-tree. I am wondering if there is any interest in adding these t=
o the standard library. A report can be found here:=C2=A0<a href=3D"https:/=
/thk686.github.io/kdtools/articles/kdtools.html" target=3D"_blank">https://=
thk686.github.<wbr>io/kdtools/articles/kdtools.<wbr>html</a>. The current r=
eference implementation is very simple C++11 but manages reasonable sorting=
 and querying performance. I was thinking perhaps adding a namespace std::t=
uples::sort, std::tuples::lower_bound, etc.=C2=A0<div><br></div><div>THK</d=
iv></div><span class=3D"HOEnZb"><font color=3D"#888888">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/f8b4432f-d4cc-4c53-8875-82a708ced473%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/f8b4=
432f-d4cc-4c53-<wbr>8875-82a708ced473%40isocpp.org</a><wbr>.<br>
</font></span></blockquote></div><br><br clear=3D"all"><br>-- <br><div clas=
s=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><=
div>Be seeing you,<br></div>Tony<br></div></div>
</div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAOHCbivWbSegOUKvqgdqABYsh3_kvCVkPoZz=
EZ_f_jS8WLz-bg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOHCbivWbSegOUKv=
qgdqABYsh3_kvCVkPoZzEZ_f_jS8WLz-bg%40mail.gmail.com</a>.<br />

--000000000000a3081f0567df5d70--

.