Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 383399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:16:44+00:00 2026-05-12T15:16:44+00:00

I am building a mySQL table listing points in n-dimensions, each dimension being indexed.

  • 0

I am building a mySQL table listing points in n-dimensions, each dimension being indexed. Given any point in the n-dimensional system, I would like to be able to output all of the other points in order of their distance from the chosen point.

A simple solution would be to calculate distances from each point using the pythagorean theorem… sqrt(x^2+y^2)=z. I have been seeking a more efficient method. Only an approximate order is needed, so i’m very open minded.

Thanks.

-diddle

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T15:16:44+00:00Added an answer on May 12, 2026 at 3:16 pm

    Along with what’s been given, you could also consider “binning” your points — i.e. (at least mentally) draw a grid over your “map”, and track points based on which square they fall into. Basically, you start with the points in the same square, then the ones in a “ring” surrounding the chosen point’s square, then the next ring outward, and so on. Depending on the size of grid you use, you can make this about as precise or approximate as you like. Of course, a 2D grid is for 2D points — if have more dimensions, you’ll have to increase the dimensionality of the grid to match.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a quick csv from a mysql table with a query like: select
I'm building a form with php/mysql. I've got a table with a list of
I'm planning on building a mySQL table that requires a student's name which looks
I am building an online hotel booking system.... Using php and mysql.... Users can
I have building MYSQL queries with backticks. For example, SELECT `title` FROM `table` WHERE
I'm building a city names table in MySQL with about 10K rows to be
Ran into an interesting problem with a MySQL table I was building as a
I'm building a MySQL query to determine how many items from each of several
building a site using PHP and MySQL that needs to store a lot of
I'm building a wepage in php using MySQL as my database. Which way is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.