/*
 * OMNetRandomSourceWrapper.cpp
 *
 *  Created on: Aug 16, 2010
 *      Author: alexandra
 *      Author: Philipp Reinecke
 */

#include "OMNetRandomSourceWrapper.h"

double OMNetRandomSourceWrapper::uni()
{
	/* uniform(0,1) produces uniforms in [0,1), i.e. it may give us zero,
	 * which would lead to Inf as the result of the logarithm used in libphprng.
	 * The 1-uniform() prevents this. [PR]
	 */
  return 1-uniform(0,1,rng);
}

OMNetRandomSourceWrapper::OMNetRandomSourceWrapper(int rnGenNum)
{
  rng = rnGenNum;
}

OMNetRandomSourceWrapper::~OMNetRandomSourceWrapper()
{
  // TODO Auto-generated destructor stub
}
