Sep-03-2020, 05:58 AM
Hello guys
good day
I have a list of near 10000 points with x,y,z coordinates and a fourth property which is 1 or 2 or 3 (let call it p).
The points are mostly in pair, I mean for almost 95% of points, there is another point with same x,y,z and p.
I need to find out for a point if there is any other point with same x,y,z,p or not!
I have tried a for in for loop in python , something like:
for i=1 to 10000
for j=1 to 10000
if x(i)=x(j) and y(i)=y(j) and z(i)=z(j) and p(i)=p(j)
then put a comment
the code is working well if i have small number of points. for example for a number of point of 500 it takes 10 minutes for python to run.
The problem is that when i put n=10000, it takes a lot of time (near 4 hours)and my computer falls down without any answer.
Would you kindly please show me a solution?
Thanks in advance
good day
I have a list of near 10000 points with x,y,z coordinates and a fourth property which is 1 or 2 or 3 (let call it p).
The points are mostly in pair, I mean for almost 95% of points, there is another point with same x,y,z and p.
I need to find out for a point if there is any other point with same x,y,z,p or not!
I have tried a for in for loop in python , something like:
for i=1 to 10000
for j=1 to 10000
if x(i)=x(j) and y(i)=y(j) and z(i)=z(j) and p(i)=p(j)
then put a comment
the code is working well if i have small number of points. for example for a number of point of 500 it takes 10 minutes for python to run.
The problem is that when i put n=10000, it takes a lot of time (near 4 hours)and my computer falls down without any answer.
Would you kindly please show me a solution?
Thanks in advance