Re: [Scilab-users] Pairwise distance of a huge amount of points

2014-09-02 Thread Dang, Christophe
Hello, > De : Ezequiel Soule > Envoyé : lundi 1 septembre 2014 15:36 > > I implemented a cell algorithm, which is used in molecular dynamics [...] > you divide the space in "cells", with a size that has to be larger than the > maximum > posible distance, then you identify in which cell each point

Re: [Scilab-users] Pairwise distance of a huge amount of points

2014-09-01 Thread Ezequiel Soule
Hi, I am working in something related, which is deteriming overlaps in a sistem of spheres with random positions. So I have to compute the distance between centers of spheres, and compare it with the contact distance. I implemented a cell algorithm, which is used in molecular dynamics (you can

Re: [Scilab-users] Pairwise distance of a huge amount of points

2014-09-01 Thread Dang, Christophe
Hello, > De : Samuel Gougeon > Envoyé : vendredi 29 août 2014 23:51 > > Actually the algo in members() defines and runs over multiline slices, > that shortens a lot the number of iterations in the explicit loop [...] > but is more complex to implement. Sounds interesting. I'll have a look at it.

Re: [Scilab-users] Pairwise distance of a huge amount of points

2014-09-01 Thread Dang, Christophe
Hello, > De : sho...@energetiq.com > Envoyé : vendredi 29 août 2014 16:38 > > If your goal is to find nearest the N neighbors of a given point, > look up the K-D Tree algorithm This is not the case, but I keep your advice in mind. Tree algorithms are often an elegant and efficient way to solve pr

Re: [Scilab-users] Pairwise distance of a huge amount of points

2014-08-29 Thread Samuel Gougeon
Le 29/08/2014 12:58, Dang, Christophe a écrit : Just to close the subject: I tried to implement the algorithm with sparse matrices, and it is less efficient than scanning over one dimension: 7 times faster than the naive algorithm. Yes, it was somewhat expected. Also for memory consumption, th

Re: [Scilab-users] Pairwise distance of a huge amount of points

2014-08-29 Thread Samuel Gougeon
Le 29/08/2014 09:29, Dang, Christophe a écrit : Hello, De Samuel Gougeon Envoyé : jeudi 28 août 2014 23:59 You will need one loop over slices along one of both dimensions. Such a slicing algorithm in an identical situation is used inside members.sci. OK, I just overlooked the file but am lazy

Re: [Scilab-users] Pairwise distance of a huge amount of points

2014-08-29 Thread shorne
distances over that much smaller set, if necessary... S From: "Dang, Christophe" To: "International users mailing list for Scilab." , Date: 08/29/2014 06:58 AM Subject: Re: [Scilab-users] Pairwise distance of a huge amount of points Sent by: "users"

Re: [Scilab-users] Pairwise distance of a huge amount of points

2014-08-29 Thread Dang, Christophe
Just to close the subject: I tried to implement the algorithm with sparse matrices, and it is less efficient than scanning over one dimension: 7 times faster than the naive algorithm. If I generate the sparse matrix from a n*(n-1)/2 vector, it is even worse: less efficient than the naive algori

Re: [Scilab-users] Pairwise distance of a huge amount of points

2014-08-29 Thread Dang, Christophe
Hello, > De Samuel Gougeon > Envoyé : jeudi 28 août 2014 23:59 > > You will need one loop over slices along one of both dimensions. > Such a slicing algorithm in an identical situation is used inside members.sci. OK, I just overlooked the file but am lazy to read a 400 lines script and prefered

Re: [Scilab-users] Pairwise distance of a huge amount of points

2014-08-28 Thread Samuel Gougeon
Hello Christophe, Le 28/08/2014 16:22, Dang, Christophe a écrit : Hello, I need to compute the pairwise distance of a huge amount of points, namely n = 49545. I re-read a previous discussion http://mailinglists.scilab.org/Plot-overlays-on-images-tp2617675p4030599.html So, I'm trying yo avoid

[Scilab-users] Pairwise distance of a huge amount of points

2014-08-28 Thread Dang, Christophe
Hello, I need to compute the pairwise distance of a huge amount of points, namely n = 49545. I re-read a previous discussion http://mailinglists.scilab.org/Plot-overlays-on-images-tp2617675p4030599.html So, I'm trying yo avoid loops, but I need then at least to have a vectors, or sparse matrice