Main Page   Class Hierarchy   Compound List   File List   Compound Members  

Randomizer< Bijection > Class Template Reference

A bijection over {0,...,n-1} that can be used to randomize an Edge in order to obtain a (pseudo-)random permutation. More...

#include <randomizer.h>

List of all members.

Public Methods

 Randomizer (NodeCount noOfNodes)
 The constructor.

RelabeledEdge randomize (const Edge &edge) const
 Randomizes an Edge.


Private Methods

NodeID randomize (NodeID nodeID) const
 Randomizes a node ID using the underlying bijection.


Private Attributes

NodeCount _noOfNodes
 The number of nodes that specifies the domain and co-domain of the bijection.

Bijection _bijection
 The underlying bijection.


Detailed Description

template<typename Bijection = RandomizerLinearCongruence>
class Randomizer< Bijection >

A bijection over {0,...,n-1} that can be used to randomize an Edge in order to obtain a (pseudo-)random permutation.

Either RandomizerLinearCongruence or RandomizerFeistel can be used as underlying bijection.

Definition at line 131 of file randomizer.h.


Member Function Documentation

template<typename Bijection = RandomizerLinearCongruence>
RelabeledEdge Randomizer< Bijection >::randomize const Edge   edge const [inline]
 

Randomizes an Edge.

The source and the target vertices are randomized using the bijection. The original source and target vertices are saved, so a RelabeledEdge, which contains both the randomized and the original vertices, is returned.

Definition at line 145 of file randomizer.h.

References Edge::source(), EdgeWithoutSource::target(), and EdgeWithoutSource::weight().


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