forum.alglib.net
http://forum.alglib.net/

High dimensional data point
http://forum.alglib.net/viewtopic.php?f=2&t=2060
Page 1 of 1

Author:  junc [ Wed Jun 18, 2014 6:43 am ]
Post subject:  High dimensional data point

I saw many with real_2d_array
but did not see explicit support for higher dimension data point
is 3D point not generally supported?

If I have point which have 3 components x,y,z, how can I declare my 3d point array?

real_2d_array xyz = "[[1,1,1],[1,2,2],[4,1,4],[2,3,5],[4,1.5,3]]"; -> does this code work?

Author:  Sergey.Bochkanov [ Wed Jun 18, 2014 7:10 am ]
Post subject:  Re: High dimensional data point

Hello!

Yes, it will work, with 3D, 4D and so on. 2D array may have arbitrary number of columns, and string constructor can successfully parse inputs of arbitrary size.

Author:  junc [ Wed Jun 18, 2014 7:37 am ]
Post subject:  Re: High dimensional data point

Thanks for your fast response.

Then what if I would like to declare double type of each component of my data rather than string?
If each data point is a struct as below,
struct point {
double x = 1.1;
double y = 1.2;
double z = 1.3;
};

how can I declare

Author:  Sergey.Bochkanov [ Wed Jun 18, 2014 11:27 am ]
Post subject:  Re: High dimensional data point

real_2d_array can not work with structures defined by you - ALGLIB does not know anything about them. You have to write your own initialized which converts array of your structures to ALGLIB 2D array.

Author:  Sumeraxe [ Sat Mar 07, 2015 8:06 am ]
Post subject:  Re: High dimensional data point

I'm trying the same thing with my 3D cloud points in Delphi but could not figuring out how to make the KDTree work. Could you give me a concrete example of creating a KDTree from a 3D points cloud and search the neighbor points from a given X, Y, Z coordinate and a search radius R ?

Kind regards,





........................

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/