forum.alglib.net

ALGLIB forum
It is currently Sun Dec 22, 2024 8:05 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  [ 3 posts ] 
Author Message
 Post subject: real_2d_array consisting of 2-tuples
PostPosted: Tue Sep 26, 2017 8:29 pm 
Offline

Joined: Tue Sep 26, 2017 8:20 pm
Posts: 2
Hello all,
I am trying to set up a "real_2d_array" consisting of only 1 row and having pairs of tuples as elements.
It looks something like this when declared manually (as a toy problem):

real_2d_array a = "[[50,46], [47,53], [46.7,46.1], [45,44]]";

The above declaration works as expected.
The problem is I have thousands of elements in a double precision array which cannot be fed manually to the "real_2d_array" like above.
How do I feed the values that I have in an array say:
double *alph = (double *)malloc(4096 * sizeof(double));

setcontent does not work as it tries to feed the elements like a matrix (which it is not).
This is an array of 2-tuples.

Any help is appreciated.
thanks!


Top
 Profile  
 
 Post subject: Re: real_2d_array consisting of 2-tuples
PostPosted: Wed Sep 27, 2017 4:43 pm 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
Hi!

real_2d_array is not intended to hold tuples. It is plain simple matrix datatype. I just do not have more detailed reply to your question :)


Top
 Profile  
 
 Post subject: Re: real_2d_array consisting of 2-tuples
PostPosted: Wed Sep 27, 2017 10:39 pm 
Offline

Joined: Tue Sep 26, 2017 8:20 pm
Posts: 2
Sergey.Bochkanov wrote:
Hi!

real_2d_array is not intended to hold tuples. It is plain simple matrix datatype. I just do not have more detailed reply to your question :)


Thanks!
I found a workaround :)


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 24 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