Java Randomness Test Suite

JRandTest at SourceForge

com.fasteasytrade.JRandTest.Tests
Class CountThe1s

java.lang.Object
  extended bycom.fasteasytrade.JRandTest.Tests.Base
      extended bycom.fasteasytrade.JRandTest.Tests.CountThe1s
Direct Known Subclasses:
CountThe1sSpecificBytes

public class CountThe1s
extends Base

CountThe1s from DieHard

Author:
Zur Aougav

Nested Class Summary
 
Nested classes inherited from class com.fasteasytrade.JRandTest.Tests.Base
Base.point
 
Field Summary
(package private)  int A
           
(package private)  int B
           
(package private)  int C
           
(package private)  int D
           
(package private)  int E
           
(package private)  double mean
           
(package private)  int no_wds
           
(package private)  double[] prob
           
(package private)  int rt
           
(package private)  String s
           
(package private)  double std
           
(package private)  boolean testStream
           
 
Fields inherited from class com.fasteasytrade.JRandTest.Tests.Base
df, DIM, PI, rs, UNIMAX, vecOutputDestinations
 
Constructor Summary
CountThe1s()
           
 
Method Summary
(package private)  int b2l(int x)
          convert a byte to a letter : A to E
(package private)  double cnt_stat(String filename, int rshft)
          count the 1's in the sequence of bytes
 void help()
          help method to be implemented by each test class.
 void setParameters()
          to support CountThe1s as stream (current class) and also CountThe1sSpecificBytes, we use differrent help() and setParameters() methods.
 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
 

Field Detail

A

final int A
See Also:
Constant Field Values

B

final int B
See Also:
Constant Field Values

C

final int C
See Also:
Constant Field Values

D

final int D
See Also:
Constant Field Values

E

final int E
See Also:
Constant Field Values

mean

final double mean
See Also:
Constant Field Values

std

final double std

prob

final double[] prob

rt

int rt

no_wds

int no_wds

s

String s

testStream

boolean testStream
Constructor Detail

CountThe1s

public CountThe1s()
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()

setParameters

public void setParameters()
to support CountThe1s as stream (current class) and also CountThe1sSpecificBytes, we use differrent help() and setParameters() methods.


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 - is the filename to be read or the algorithm name.
Throws:
Exception
See Also:
Base.test(java.lang.String)

b2l

int b2l(int x)
convert a byte to a letter : A to E

Returns:
final int A to E

cnt_stat

double cnt_stat(String filename,
                int rshft)
count the 1's in the sequence of bytes


Java Randomness Test Suite

JRandTest at SourceForge

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