frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Ask HN: Multi dimensional sort (beyond Hilbert curve)

1•adec314•1h ago
My point is about structuring and indexing an arbitrary dataset, for preprocessing before eg segmentation/clustering, neighbor querys...

In 1D, sorting is trivial because scalar values have a total, unambiguous order. In 2D and higher dimensions, there is no single way to order points, and points can't all be compared >=/<= in a consistant way. Space-filling curves like Hilbert or Z-order curves still can order Nd points by mapping them to a 1D index, but flattening the space sacrifices much of the original geometric structure.

Recently, I’ve been thinking about partial orders for d-dimensional vectors. For vectors u and v, let denote u >=_k v if u_k >= v_k (comparing along the k-th coordinate axis only).

In 1D, a sorted array satisfies x[i+1] >= x[i]. Extending this naturally to a multi-indexed d-dimensional array x[i, j, k, ...], we can define a dataset as "cartesian sorted" if:

- x[i+1, j, k, ...] >=_1 x[i, j, k, ...] - x[i, j+1, k, ...] >=_2 x[i, j, k, ...] - ...and so on.

In other words, the array of multi indexes is sorted along every row, column, and slice under its corresponding coordinate projection.

What makes this definition interesting is that their exist a very simple algorithm to perform Nd sort in the "cartesian" sense. Just iterate: 1. Perform 1D sorts along every row (apply the permutation i' = sigma_jk(i) on the multi indexes that make all the rows sorted in the >=^1 sense. 2. Perform 1D sorts along every column. 3. Repeat across all dimensions until convergence.

While sorting along one axis can disrupt the order along another, the process is guaranteed to converge fast to a fully "cartesian sorted" state (I have a short proof if anyone is curious).

---

Questions for the HN Community:

1. Is there existing literature or a standard name for this approach? Searching for multi-dimensional sorting mostly yields spatial indexing, radix, or binning approaches, but maybe I missed something obvious ?

2. What are the fundamental limitations that make this approach less common in practice than space-filling curves or k-d trees, if they are some in your opinion ? I thought it would be commonly used already, but it doesn't seems to be a standard tool.

3. Has anyone experimented with similar (or maybe better) multi-index coordinate sorting techniques? I’d love to hear your thoughts or critiques on the concept.

Show HN: Modelfac

1•IceRay•1m ago•1 comments

Wine 11.14 – Run Windows Applications on Linux, BSD, Solaris and macOS

https://www.winehq.org/announce/11.14
1•neustradamus•1m ago•0 comments

Show HN: git clone https://git.swerdlow.dev

https://git.swerdlow.dev/
2•benswerd•6m ago•0 comments

Creative Focus

https://herbertlui.net/creative-focus/
4•herbertl•13m ago•0 comments

OpenAI did not notice Hugging Face hack for a week

https://www.reuters.com/business/its-ai-agent-spent-days-hacking-company-sources-say-openai-did-n...
4•himaraya•22m ago•1 comments

The SharePoint zero-day panic this week is a marketing event

https://tensorust-site.vercel.app/
1•Shmungus•23m ago•0 comments

The computer has been surprising us

https://iwhalen.com/computer-surprise/
3•iwhalen•25m ago•0 comments

Claude used my pipeline to find a counterexample to the Jacobian conjecture

2•JGPTechCo•31m ago•1 comments

The final frontier – 01005 passives (2012)

http://siliconexposed.blogspot.com/2012/06/final-frontier-01005-passives.html
1•gregsadetsky•33m ago•0 comments

The Shape of Apps

https://parakeet.co/blog/the-shape-of-apps/
3•wpm•43m ago•0 comments

Bonsai – a toolkit for building AI chat apps with branchable conversations

https://github.com/Joaoha/Bonsai
2•joaoha•45m ago•0 comments

In desperate need of money so im willing to make anything

1•lowke•45m ago•0 comments

Ask HN: How would I restore this 101 year old postcard?

2•Waterluvian•48m ago•1 comments

Project Babylon: Gerald Bull's Downfall (2006)

https://www.damninteresting.com/project-babylon-gerald-bulls-downfall/
2•networked•49m ago•0 comments

Stripe closed my account with a 0.18% dispute rate

5•rellyattd•51m ago•3 comments

What Happened to WordPerfect? Why the Dominant Word Processor Disappeared

https://www.youtube.com/watch?v=cMnjphv3DQo
4•cable2600•59m ago•1 comments

Show HN: Made a Free Shownotes Generator Website

https://shownotesgenerator.com/
1•wbemaker•1h ago•2 comments

Show HN: OneWayInterview – type a job role, AI builds the async video interview

https://onewayinterview.com/
1•emunova•1h ago•1 comments

LoRA Adapters Generated from Skill.MDs

https://terradev.cloud/tessera
1•Facingsouth•1h ago•0 comments

Open Weights and American AI Leadership

https://www.microsoft.com/en-us/corporate-responsibility/topics/open-weight/
5•haritha1313•1h ago•1 comments

BackSearch – Letting agents search the web

https://www.gr.inc/releases/introducing-backsearch
1•haritha1313•1h ago•0 comments

Cultural moderation of demographic differences in narcissism

https://www.tandfonline.com/doi/full/10.1080/15298868.2025.2593298#abstract
3•bushwart•1h ago•0 comments

Show HN: I rebuilt Microsoft Comic Chat's layout engine in one HTML file

https://arcade.pirillo.com/comic-chatter.html
2•ChrisPirillo•1h ago•1 comments

Amazon cracks down on use of AI images by sellers after New York law

https://www.cnbc.com/2026/07/23/amazon-makes-sellers-label-ai-generated-people-in-images-after-ny...
6•baranul•1h ago•0 comments

Ask HN: Multi dimensional sort (beyond Hilbert curve)

1•adec314•1h ago•0 comments

Florida's Ban on Unnaturally Posed Stuffed Baby Crocodilians

https://www.loweringthebar.net/2026/07/florida-bans-oddly-posed-alligators.html
2•samizdis•1h ago•0 comments

Dimmd – Dark mode for the macOS Apple Mail app

https://www.dimmd.app/
1•spacedawwwg•1h ago•0 comments

Always Tell Your Kids the Truth (2019)

https://www.outsideonline.com/culture/active-families/tell-your-kids-truth/
2•downbad_•1h ago•0 comments

Show HN: Openleetcode – local LeetCode runner where tests live in the repo

https://github.com/therepanic/openleetcode
2•therepanic•1h ago•0 comments

SignFile – Sign anything. One flat price

https://signfile.io/
2•abdullah_eldoud•1h ago•0 comments