35#include "ramCanvas.hpp"
39 std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
40 const int BSIZ = 2048;
42 std::random_device rd;
43 std::mt19937 rEng(rd());
44 std::uniform_real_distribution<double> uniform_dist_double(-2.0, 2.0);
45 std::uniform_int_distribution<int> uniform_dist_int(3, 7);
47 mjr::ramCanvas1c16b theRamCanvas(BSIZ, BSIZ, -2, 2, -2, 2);
50 for(
int j=0; j<100000; j++) {
51 std::map<uint64_t, uint64_t> ptcnt;
52 double lambda = uniform_dist_double(rEng);
53 double alpha = uniform_dist_double(rEng);
54 double beta = uniform_dist_double(rEng);
55 double gamma = uniform_dist_double(rEng);
56 double w = uniform_dist_double(rEng);
57 int n = uniform_dist_int(rEng);
58 std::complex<double> z(0.01,0.01);
59 for(uint64_t i=0;i<1000;i++) {
60 z = (lambda + alpha*z*std::conj(z)+beta* std::pow(z, n).real() + w*std::complex<double>(0,1))*z+gamma*
static_cast<std::complex<double>
>(std::pow(std::conj(z), n-1));
61 ptcnt[((uint64_t)theRamCanvas.real2intX(z.real()))<<32 | ((uint64_t)theRamCanvas.real2intY(z.imag()))] = 1;
63 if(ptcnt.size() > maxCnt) {
64 maxCnt = ptcnt.size();
65 std::cout << j <<
" " << maxCnt <<
" " << lambda <<
"," << alpha <<
"," << beta <<
"," << gamma <<
"," << w <<
"," << n << std::endl;
68 std::chrono::duration<double> runTime = std::chrono::system_clock::now() - startTime;
69 std::cout <<
"Total Runtime " << runTime.count() <<
" sec" << std::endl;
int main(int argc, char *argv[])