Java Randomness Test Suite

JRandTest at SourceForge

com.fasteasytrade.JRandTest.Tests
Class MonteCarlo

java.lang.Object
  extended bycom.fasteasytrade.JRandTest.Tests.Base
      extended bycom.fasteasytrade.JRandTest.Tests.MonteCarlo

public class MonteCarlo
extends Base

MonteCarlo class extends Base

Test Monte Carlo. Read x 16 bits, y 16 bits.
if (x,y) distance is larger then (256,256), we count
a miss... the (x,y) point is not in the circle(256).
Else, we count success.

piValue is (success / num_of_points) * 4.

Author:
Zur Aougav

Nested Class Summary
 
Nested classes inherited from class com.fasteasytrade.JRandTest.Tests.Base
Base.point
 
Field Summary
 
Fields inherited from class com.fasteasytrade.JRandTest.Tests.Base
df, DIM, PI, rs, UNIMAX, vecOutputDestinations
 
Constructor Summary
MonteCarlo()
           
 
Method Summary
 void help()
          help method to be implemented by each test class.
 void test(String filename)
          test method to be implemented by each test class.
 
Methods inherited from class com.fasteasytrade.JRandTest.Tests.Base
ABS, ABS, addOutputDestination, avg, chisq, Chisq, chitest, closeInputStream, d4, d4d_d, d4d, exp, exp, G, isOpen, KStest, log, MAX, MAX, MIN, MIN, openInputStream, phi, Phi, Poisson_fit, Poisson, pow, printf, puts, qsort, qsort, qsort, r2_double, read32BitsAsDouble, readByte, readInt, readLong, registerInput, removeOutputDestination, showbit, SIGN, SIGN, sqrt, sqrt, stdev, uni
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonteCarlo

public MonteCarlo()
Method Detail

help

public void help()
Description copied from class: Base
help method to be implemented by each test class.

Overrides:
help in class Base
See Also:
Base.help()

test

public void test(String filename)
          throws Exception
Description copied from class: Base
test method to be implemented by each test class.

Overrides:
test in class Base
Parameters:
filename - input file with random data
Throws:
Exception

Java Randomness Test Suite

JRandTest at SourceForge

JRandTest at SourceForge
Copyright © 2005 Zur Aougav. All Rights Reserved.