No particular case.  Seth referred to the two options of creating a new 
matrix or creating the map in place in one of his comments on the original 
post, so I was just being accommodating.  I guess the parallel would be 
matrix:set and matrix:set-and-report. But as noted, I have some unease with 
the map-in-place with multiple matrices and would be happy to drop it.  I'm 
not an expert in the efficiency of Java's cleaning up discarded arrays so I 
don't know if keeping the old matrix would make things more efficient if 
the matrix is large.

On another point, and perhaps this is another topic entirely, how do I find 
out what exceptions are thrown by ReporterTask.report?  The map primitive 
throws an appropriate error when the task refers to an argument not matched 
by a list, but I'm not getting that by catching runtime exceptions in my 
java code.  I've checked the API, but don't see that information there.

On Thursday, February 20, 2014 3:02:13 PM UTC-5, Jason Bertsche wrote:
>
>  I've updated my update to the matrix extension by allowing the new map 
> reporter primitive to take multiple matrices just as the NetLogo map 
> primitive can take multiple lists.
>
>
> Great!
>
> I've also added a map-in-place command primitive that replaces its single 
> matrix argument with the new matrix.
>
>
> What's the use case you're trying to address with `map-in-place`?
>
> Jason Bertsche
> Senior Software Developer - NetLogo
>
> On 02/19/2014 07:31 PM, Charles wrote:
>  
> A question about design.  I've updated my update to the matrix extension 
> by allowing the new map reporter primitive to take multiple matrices just 
> as the NetLogo map primitive can take multiple lists.  I've also added a 
> map-in-place command primitive that replaces its single matrix argument 
> with the new matrix.  It would be trivial to allow map-in-place to take 
> multiple matrices and to replace the first one in the list.  But this makes 
> me uneasy.  It seems to me to be courting confusion and errors, and doing 
> things in place seems out of keeping with most NetLogo primitives. 
>
>  Any thoughts?
>
>  Charles
>
> On Monday, February 17, 2014 4:24:08 PM UTC-5, Charles wrote: 
>>
>> Seth's comment in Stack Overflow about the usefulness of a map primitive 
>> in the matrix extension led me to add one, matrix:map task matrix.  In the 
>> process, I did some updating to use jama-1.0.3 rather than 1.0.2 and made 
>> some minor non-substantive changes to the code to make my compiler happy. 
>>  I forked the original code off of the github NetLogo site to my own github 
>> account, but now that I've made the changes, I'm not sure what to do next. 
>>  As a bundled extension I can't put it out there myself, and I assume that 
>> even if the changes were useful for a large enough audience, there would be 
>> a good bit of checking that you all would want to do.  Indeed, I'm not 
>> really clear on how I would push this back to you if it were useful.  So, 
>> I'm looking for advice on next steps, although if that is to just use it 
>> myself, that's fine too. 
>>
>>  Charles
>>  
>  -- 
> You received this message because you are subscribed to the Google Groups 
> "netlogo-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to