-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
32 lines (24 loc) · 788 Bytes
/
Copy pathmain.cpp
File metadata and controls
32 lines (24 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>
#include "std_LCG_PLE63.hpp"
#include "uniform_distribution.hpp"
#include "Simplex.hpp"
int main(int argc, char* argv[])
{
std::linear_congruential_engine<uint64_t, 2806196910506780709ULL, 1ULL, (1ULL<<63ULL)> ugen;
float a = 0.0f;
float b = 1.0f;
Simplex s(a, b);
Simplex::container_type v(3, 0.0f);
for(int k = 0; k != 300; ++k)
{
s.sample(v, ugen);
std::cout << std::scientific << std::setw(15) << std::setprecision(4) << v[0]
<< std::scientific << std::setw(15) << std::setprecision(4) << v[1]
<< std::scientific << std::setw(15) << std::setprecision(4) << v[2]
<< std::endl;
}
return 0;
}