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

real_2d_array consisting of 2-tuples
http://forum.alglib.net/viewtopic.php?f=2&t=3817
Page 1 of 1

Author:  thedazedguy [ Tue Sep 26, 2017 8:29 pm ]
Post subject:  real_2d_array consisting of 2-tuples

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!

Author:  Sergey.Bochkanov [ Wed Sep 27, 2017 4:43 pm ]
Post subject:  Re: real_2d_array consisting of 2-tuples

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 :)

Author:  thedazedguy [ Wed Sep 27, 2017 10:39 pm ]
Post subject:  Re: real_2d_array consisting of 2-tuples

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 :)

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