220 37401 <CAOHCbivWbSegOUKvqgdqABYsh3_kvCVkPoZzEZ_f_jS8WLz-bg@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Tony V E <tvaneerd@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Interest in multidimensional sorting/searching
 extensions (std::tuples::sort, etc.)?
Date: Tue, 20 Mar 2018 18:12:09 -0400
Lines: 129
Approved: news@gmane.org
Message-ID: <CAOHCbivWbSegOUKvqgdqABYsh3_kvCVkPoZzEZ_f_jS8WLz-bg@mail.gmail.com>
References: <f8b4432f-d4cc-4c53-8875-82a708ced473@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="000000000000a3081f0567df5d70"
X-Trace: blaine.gmane.org 1521583809 16993 195.159.176.226 (20 Mar 2018 22:10:09 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 20 Mar 2018 22:10:09 +0000 (UTC)
To: Standard Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCUZ5QWKNQILVDWG2UCRUBCCXEAZA@isocpp.org Tue Mar 20 23:10:05 2018
Return-path: <std-proposals+bncBCUZ5QWKNQILVDWG2UCRUBCCXEAZA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ot0-f200.google.com ([74.125.82.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCUZ5QWKNQILVDWG2UCRUBCCXEAZA@isocpp.org>)
	id 1eyPSG-0004K2-V9
	for gclcip-std-proposals@m.gmane.org; Tue, 20 Mar 2018 23:10:05 +0100
Original-Received: by mail-ot0-f200.google.com with SMTP id w4-v6sf1770370ote.8
        for <gclcip-std-proposals@m.gmane.org>; Tue, 20 Mar 2018 15:12:12 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1521583931; cv=pass;
        d=google.com; s=arc-20160816;
        b=SJzIFx6KA4cwB68yYTAcIjal7aZkD1zbWBQSfNCWOxm0sG46DrahMZ/O53USTrdwyC
         ETTFdUcO+3vaATJYjT0cmOBUCkc6Qo/ddcdho0XsAFuQ6U1tmPqxLVJVqb4RCjsU+Sse
         B7dftaQ1eUOmXyIk4MpYrxir9ZGdR0n7LJQg82tgdSVJQ2NJ13ZTkmo+rUlHRqL/uyhs
         WelV3dhF4InFmZxul6PZ4Kmmj3EYhWrl1NwpRtvQiXfO/2wjgidG7C5Iu5RTr8OCDdFR
         YkWrBxYqbgFGDpar9idDl61rajOiIooUnbV27w2ad90Lexrgohz5A1hKQ2JTTq9bcN6e
         SRpQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:references:in-reply-to:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=fLBj+PZyFuaoGpfO6iOkgfKC2agq4IFPVrxMgE30eag=;
        b=ejiCcEns5bbKEtd4uZnKRhiD5vFNpgEnS2ZcR7cvmkxvj1cDjRPCzBpwtVuRXG+Icd
         O6hQFccV6A76clJKQJgjkza16TCo0YUhh6bF2jnXg9fofzII4LA+tB3jANe2QkFGzymS
         am9F3vypHYUJLOrxkpnPAKGUm1fVmjw/d0hudVQKuZBF/rT4S/wU4LZr++u98VD2O/Ly
         WBJ67KCFGniQlORyz0JFaogZOl2RU/4DsuICoWf0irYg4tJc9VlmkN936SKWWX0yjTp4
         VoM5wcufZuAAE0xJgmF5DrAk0gt3YKzVwBRRYtVIBoPGkr/gwwy3FDQig140vnz1Q5iZ
         fVjw==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=sIpuKuHs;
       spf=pass (google.com: domain of tvaneerd@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tvaneerd@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=fLBj+PZyFuaoGpfO6iOkgfKC2agq4IFPVrxMgE30eag=;
        b=sgyqWAl+qTcuDEMn5/zjVp1CZ+rF/hBO8bCAou1eKTDY1tLQfr4P5jxJfdyubd8U5J
         i42oVlNdHzy+A9cJ7hsBM2CHihTsbcTYHGAjVj3jYnWn88q83sjNeegDG6c0jMz6fNJc
         c8McjUU/Xj9l93s+wlt+dSPB6bYT/+sDo4ZsStdPiHJhdPOl3WcNHiRsfgSUbHhA8dDd
         LPBK5FSBRC09I25QlyziHX9VcblJhaDW0JnyiuO9WbfSlox+mfZWmv/IdmZsM6ejfhxc
         31ClQ1iHydlHDSjTpAECys8qigTnwQa+XelXpEtXp5zqy2H2AfMl+kWLHiXjY7ZO4cdq
         pOtg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=fLBj+PZyFuaoGpfO6iOkgfKC2agq4IFPVrxMgE30eag=;
        b=jZgy0YeC2QkKb8TDwytxIYb05h18/zCncwuimaXjWK/3aeGv5qlO8H/QY5K4ZuZAnK
         Tw8sfAZB1HzdTNHplzqH5seMhP15xqxjWhSHY3p/8M62Pj06IKZvmQYuxUSMSPO9ZQtz
         ocpDJvASk4ruYQYpIz3tjcJQ+AyKxHamQWqbDLVBh9evEL12i1mvd0vz100fZbTfd9EK
         3LS1Sp7osaDXrzEETfRo6eepMr6RkhqCUgZLQyebjESd+PdLS/EORmxUi7aTsyhIx5np
         wmlZY33S8r4RilzRK2XgmgAAMja/XK+gKbQZXgz5KDZT4s+j/veNLPRbXM0jxbMLQvQm
         49Ag==
X-Gm-Message-State: AElRT7EcbRE5vMELN+qjRDps1SfbWrRWGDc0y6Jx3Xv+YHMsQE2jlcUS
	kiIqfzkr0lrWi8BBpi9tsIFGHA==
X-Google-Smtp-Source: AG47ELsKPSvvQ65lth8oQtRn+fOCKCxquk38sFOO4f/YgYBcaKNyo5gpBg+S39S0f1Pau3/2xpBpPQ==
X-Received: by 2002:a9d:3145:: with SMTP id v5-v6mr8557326otd.44.1521583931787;
        Tue, 20 Mar 2018 15:12:11 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:aca:4546:: with SMTP id s67-v6ls339085oia.7.gmail; Tue, 20
 Mar 2018 15:12:10 -0700 (PDT)
X-Received: by 10.202.16.24 with SMTP id 24mr10764064oiq.44.1521583930289;
        Tue, 20 Mar 2018 15:12:10 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1521583930; cv=none;
        d=google.com; s=arc-20160816;
        b=qWDRUtiYrYFOeVPvkcgAdryvyg6xCIeyj3tKvBnzplNlwPoE11rl4u/REbprjZQIId
         FIcR/pJLap/Pbw18uBqDB9Dfx+sCURHyTcQT9rHqn3nOV67Mc4mei0t8Axmad1QLIsUf
         ePBV0Q0Y9jx9bWNUYtNBKRojhmqNb5s0NxUfTj9/7j89ZbPWMncI6o2GPLmSJRwXb70h
         e5Sen+TmDctQE8tZ4h2tumZbXD7Zsvo7z8/w9c5QX2nBYeywd4h7ESQ12iCsg0tKC19T
         7iqqwoZEHwHa5ccPn58FV9Fj4TjLwJoFFXkHZyzwcPMKZwasdFrOGpnqK7nOIWp8H8sl
         IEvw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :dkim-signature:arc-authentication-results;
        bh=Fvgg8rmjVKlOCt4ijKkXUKKIxhaI0Vod5gtGEeXjcQI=;
        b=pWajhNxuwBOAcGujdLCSKV8GYUw6mDIwiNF6TFU3TaieM/rOcrohdaebLcNhpHy4ch
         PH4uZeOXmkDt7d2YDodKWc6xyoFafNfDOsrr4MVbDKGp7NTmA552YPLaQhP7pmXBoksD
         pUy/YzPUUJaqy4aiXgUWGhsBTKKnYN08E2xoX6Qx/sJGqxetFKmjNKCRxXANmfD1QClr
         PFFxkElY5EZG+xRncB0h5v8gNpWIatphHFmt1Hagivr/to/7Lq63SsZpA3cXr7w1OLTs
         rPFqt1G5jrnwBCkQKuhghwnfjO8UjKfYise8ADPPG8lueRQzt8ti86kptwt8B+z6MM9U
         Fk5A==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=sIpuKuHs;
       spf=pass (google.com: domain of tvaneerd@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tvaneerd@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id t37-v6sor1072891otf.264.2018.03.20.15.12.10
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Tue, 20 Mar 2018 15:12:10 -0700 (PDT)
Received-SPF: pass (google.com: domain of tvaneerd@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 2002:a9d:37e6:: with SMTP id x93-v6mr12262384otb.256.1521583929885;
 Tue, 20 Mar 2018 15:12:09 -0700 (PDT)
Original-Received: by 2002:a9d:5541:0:0:0:0:0 with HTTP; Tue, 20 Mar 2018 15:12:09
 -0700 (PDT)
In-Reply-To: <f8b4432f-d4cc-4c53-8875-82a708ced473@isocpp.org>
X-Original-Sender: tvaneerd@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=sIpuKuHs;       spf=pass
 (google.com: domain of tvaneerd@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=tvaneerd@gmail.com;       dmarc=pass (p=NONE
 sp=QUARANTINE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:37401
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/37401>

--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--

.
