commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Artem Barger (JIRA)" <>
Subject [jira] [Commented] (RNG-5) Create API usage demo example application.
Date Fri, 12 Aug 2016 20:16:21 GMT


Artem Barger commented on RNG-5:

I think this comment on main method of ComputePi is not quite accurate. 

     * Arguments:
     * <ul>
     *  <li>
     *   Error on the approximation: computation will stop when the
     *   absolute difference between successive approximations is lower
     *   than the given value.
     *  </li>
     *  <li>
     *   {@link RandomSource Random source identifier}.
     *  </li>
     * </ul>

I think that Monte-Carlo method doesn't restricted for integration on [0..1]^d, while for
user guide demo it could be fine. 
Also I think that 
private double[] generateU01()

Could be generalized to produce numbers within interval [a..b]
private double[] generate(double a, double b)

and generate numbers with
rand[i] = (b - a) * rng.nextDouble() + a;

And last, can you explain why convergence scheme wasn't good?

> Create API usage demo example application.
> ------------------------------------------
>                 Key: RNG-5
>                 URL:
>             Project: Commons RNG
>          Issue Type: Task
>            Reporter: Artem Barger
>         Attachments:
> Need to create a demo application for user guide to demonstrate how to use the API and
show possible application.

This message was sent by Atlassian JIRA

View raw message