File: randomTest.cpp

package info (click to toggle)
dmrgpp 6.06-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 113,900 kB
  • sloc: cpp: 80,986; perl: 14,772; ansic: 2,923; makefile: 83; sh: 17
file content (15 lines) | stat: -rw-r--r-- 301 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "Random48.h"
#include <cstdlib>
#include <iostream>
using namespace PsimagLite;

typedef double RealType;
typedef Random48<RealType> RandomType;

int main(int, char* argv[])
{
	RandomType rng(100);
	rng.seed(std::atoi(argv[1]));
	RealType x = rng.random();
	std::cout << "x=" << x << "\n";
}