|
LongestRunOfOnesTest (Longest Run Of Ones Random Test) |
|
|
| LongestRunOfOnesTest Class |
|
|
|
|
Derived class from: BaseRandomTest
Implements the LongestRunOfOnes random test.
The class contains:
Constructors & Destructor
Initializer methods
Class methods
Specific Class methods
Class Constructors & Destructor
|
|
|
LongestRunOfOnesTest (); |
| |
|
Creates an object of the class, sets the default values for members
and creates the MathematicalFunctions object needed to execute the random test.
|
|
|
|
LongestRunOfOnesTest (MathematicalFunctions* functions); |
| |
|
|
|
|
|
~LongestRunOfOnesTest (); |
| |
|
|
|
|
|
void SetAlpha (double alpha); [ Inherited from BaseRandomTest ] |
| |
|
Sets the alpha value for the random test object.
Alpha is the significance level that determines the region of acceptance and rejection.
For example, if alpha is set to >= 0,001 then we are demanding a confidence level of 99,9%.
|
|
|
|
bool IsRandom (BaseCryptoRandomStream* stream); [ Overridden, BaseRandomTest virtual method defined ] |
| |
|
Performs the specific randomness test.
Checks randomness of BaseCryptoRandomStream stream parameter and returns 0 (false randomness) or 1 (true randomness).
|
|
|
|
double GetPValue (void); [ Inherited from BaseRandomTest ]
|
| |
|
Gets PValue of the last checked BaseCryptoRandomStream .
PValue is the probability that a perfect random number generator would have produced a sequence less random than the BaseCryptoRandomStream checked, given the kind of non-randomness assessed by the test.
|
|
|
|
double GetAlpha (void); [ Inherited from BaseRandomTest ]
|
| |
|
Gets the alpha of the random test object.
|
|
|
|
RandomTests GetType (void); [ Overridden, BaseRandomTest virtual method defined ] |
| |
|
Gets the random test type (the algorithm that implements) of the object.
Returns the corresponding RandomTests value.
|
|
|
|
unsigned int GetMinimumLength (void); [ Overridden, BaseRandomTest virtual method defined ] |
| |
|
Gets the minimum length that the BaseCryptoRandomStream must have in order to perform the random test.
|
|
|
|
void SetLongRunCase (int longRunCase);
|
| |
|
Sets the long run case longRunCase parameter. |
|
|
|
int GetLongRunCase (void);
|
| |
|
Gets the longRunCase parameter. |
|
|
|
int GetN (void);
|
| |
|
Gets the "N" result. |
|
|
|
int GetM (void);
|
| |
|
Gets the "M" result. |
|
|
|
double GetChiSquared (void);
|
| |
|
Gets the chiSquared result. |
|
|
|
void GetAssignment (unsigned int* assignmentsArray);
|
| |
|
Gets the assignment array assignmentsArray (minimum array lenght is 7) result. |
|
|
|
unsigned int GetAssignmentOfIndex (int index);
|
| |
|
Gets the assignment result by index index (index must be between 0 and 6). |
You can check the page Used Symbols for an explanation of the symbols near the information.
|
|
|