Main Page   Class Hierarchy   Compound List   File List   Compound Members  

RandomizerLinearCongruence Class Reference

A bijection that uses the linear congruential method. More...

#include <randomizer.h>

List of all members.

Public Methods

 RandomizerLinearCongruence (NodeCount noOfNodes)
 The constructor.

NodeID operator() (NodeID nodeID) const
 The bijection.


Private Methods

void determineNextPrime (NodeCount noOfNodes)
 Determines the next prime number >= the given number of nodes.

bool isPrime (NodeCount p) const
 Returns true iff the given number is prime.


Private Attributes

NodeCount _prime
 The next prime number >= the given number of nodes.


Detailed Description

A bijection that uses the linear congruential method.

Definition at line 18 of file randomizer.h.


Constructor & Destructor Documentation

RandomizerLinearCongruence::RandomizerLinearCongruence NodeCount    noOfNodes [inline]
 

The constructor.

A bijection over {0,...p-1} is initialized, whereat p is the next prime number greater than or equal to a given n.

Definition at line 26 of file randomizer.h.

References determineNextPrime().


The documentation for this class was generated from the following file:
Generated on Thu Aug 14 15:13:28 2003 for External Memory Minimum Spanning Trees by doxygen1.2.17