Hello,
 
I have some questions about the randomFill(x:[]) function and array reallocation.
 
First of all I need to use the Random Module and I'm not sure what the interval is of the numbers returned... I've found in a paper where it was stated that it returns values between 0 and 1... inclusive? exclusive?
Is it as in most other languages [0, 1) or are both incluse ( -> [0, 1] )?
 
Second is the reallocation of arrays... I haven't found any examples so I've tested a bit around and only got it worked with using a domain and reassigning it. Is this the correct way or is there another "nicer" solution?
 
code snippet:
  9    /** Domain of lifeline buddies array */
 10    var lifelinesDomain : domain(rank=1) = 0..0;
 11    /** Lifeline buddies */
 12    var lifelines : [lifelinesDomain] uint;
...
55     lifelinesDomain = 0..(p.z-1); // reallocation in constructor
 
Sorry if this questions are duplicates or if I've just overlooked the solution in your spec / docs.
 
Kind regards,
Marco
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to