0

In one of the project have used the commons-math3-3.3.jar. This jar has concept of ValueServer. Have the code

private static ValueServer getValueServer(final File file, final int count)
                throws ZeroException, NullArgumentException, IOException {
                ValueServer vServer = new ValueServer();
                vServer.setValuesFileURL(file.toURI().toURL());
                vServer.setMode(ValueServer.DIGEST_MODE);
                vServer.computeDistribution(count);

                return vServer;
            }

Here the arguments passed is a file path and a random number.

Cant find any documentation or explanation for it.

Can anyone help understand what this does.

Thanks

Rehan
  • 929
  • 1
  • 12
  • 29

1 Answers1

1

It is class which can be used to generate random numbers using specified distribution. The main difference to other generators is that it also computes the mean, mode, sigma of all of the values it generates so far, so that you don't need to recompute them yourself.

The source code is very easy to read https://commons.apache.org/proper/commons-math/jacoco/org.apache.commons.math3.random/ValueServer.java.html

gigadot
  • 8,879
  • 7
  • 35
  • 51