forum.alglib.net

ALGLIB forum
It is currently Fri Mar 29, 2024 7:41 am

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: High dimensional data point
PostPosted: Wed Jun 18, 2014 6:43 am 
Offline

Joined: Wed Jun 18, 2014 6:38 am
Posts: 2
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?


Top
 Profile  
 
 Post subject: Re: High dimensional data point
PostPosted: Wed Jun 18, 2014 7:10 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 903
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.


Top
 Profile  
 
 Post subject: Re: High dimensional data point
PostPosted: Wed Jun 18, 2014 7:37 am 
Offline

Joined: Wed Jun 18, 2014 6:38 am
Posts: 2
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


Top
 Profile  
 
 Post subject: Re: High dimensional data point
PostPosted: Wed Jun 18, 2014 11:27 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 903
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.


Top
 Profile  
 
 Post subject: Re: High dimensional data point
PostPosted: Sat Mar 07, 2015 8:06 am 
Offline

Joined: Sat Mar 07, 2015 8:05 am
Posts: 1
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,





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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 80 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group