[ 
https://issues.apache.org/jira/browse/MAHOUT-550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13015235#comment-13015235
 ] 

Sean Owen commented on MAHOUT-550:
----------------------------------

I'm going to work on this patch a bit. A few things popped up so far:

- Double.NaN is actually not a value outside the range Double.MIN_VALUE to 
Double.MAX_VALUE, and MIN_VALUE is not even negative, and Random never returns 
NaN anyway.
- gaussian01() needs to add 0.5 to its result before returning. What's the 
reasoning for dividing by 6 out of curiosity?
- I added the enum and generally scrubbed style a bit

The copy-and-paste of unit tests feels a little icky. I think a lot of what's 
copied isn't so relevant, so might just trim the unit test back to what's kinda 
new.

> Add RandomVector and RandomMatrix
> ---------------------------------
>
>                 Key: MAHOUT-550
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-550
>             Project: Mahout
>          Issue Type: New Feature
>          Components: Math
>            Reporter: Lance Norskog
>             Fix For: 0.5
>
>         Attachments: MAHOUT-550.patch, RandomMatrix.patch
>
>
> Add Vector and Matrix implementations that generate a unique and reproducible 
> random number for each index.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to