-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrandom_walker.cpp
124 lines (113 loc) · 22 KB
/
random_walker.cpp
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <stdbool.h>
#include <iostream>
#include <vector>
using namespace std;
#define ROW 6000
#define COL 6000
#define ROW1 1588
#define COL1 2
int Random_Walker(vector<std::vector<int> > grid1,int start_node[2], int max_num_of_steps, int max_edges){
char letters = 'A';
int num_of_steps = 0;
srand((unsigned)time(NULL));
//pick starting point
int ro = start_node[0];//rand() % ROW;
int co = start_node[1];//rand() % COL;
grid1[ro][co]= letters;;
int row = ro;
int col = co;
int edges = 1;
while(edges){
int move = rand() % 4;
switch (move){
case 0:
printf("\nMove - Down[%d,%d]",++row,col);
if (grid1[row][col] == '.' && row < ROW ){ //unoccupied position
grid1[row][col] = ++letters;
++num_of_steps;
break;
}
else{
++edges;
--row;
break;
}
case 1:
printf("\nMove - RIGHT[%d,%d]",row,++col);
if(grid1[row][col] == '.' && col < COL){ //unoccupied position
grid1[row][col] = ++letters;
++num_of_steps;
break;
}else{
++edges;
--col;
break;
}
case 2:
printf("\nMove - UP[%d,%d]",--row,col);
if (grid1[row][col] == '.' && row < ROW){ //unoccupied position
grid1[row][col] = ++letters;
++num_of_steps;
break;
}else{
++edges;
++row;
break;
}
case 3:
printf("\nMove - LEFT[%d,%d]",row,--col);
if (grid1[row][col] == '.' & col < COL){ //unoccupied position
grid1[row][col] = ++letters;
++num_of_steps;
break;
}else{
++edges;
++col;
break;
}
}
if ((num_of_steps >max_num_of_steps) || (edges>max_edges)){
printf("\n\nnum_of_steps - %d\n",num_of_steps);
printf("edges - %d\n",edges);
break;
}
}
return num_of_steps;
}
int main(){
std::vector<std::vector<int> > dataset {{232, 232},{232, 233},{232, 234},{232, 235},{232, 236},{232, 237},{232, 238},{232, 239},{232, 240},{232, 241},{232, 242},{232, 243},{232, 244},{232, 245},{232, 246},{232, 247},{232, 248},{232, 249},{232, 250},{232, 251},{232, 252},{232, 253},{232, 254},{232, 255},{232, 256},{232, 257},{232, 258},{232, 259},{232, 260},{232, 261},{232, 262},{232, 263},{232, 264},{232, 265},{232, 266},{232, 267},{232, 268},{232, 269},{232, 270},{232, 271},{232, 272},{232, 273},{232, 274},{232, 275},{232, 276},{232, 277},{232, 278},{232, 279},{232, 280},{232, 281},{232, 282},{232, 283},{232, 284},{232, 285},{232, 286},{232, 287},{232, 288},{232, 289},{232, 290},{232, 291},{232, 292},{232, 293},{232, 294},{232, 295},{232, 296},{232, 297},{232, 298},{232, 299},{232, 300},{232, 301},{232, 302},{232, 303},{232, 304},{232, 305},{232, 306},{232, 307},{232, 308},{232, 309},{232, 310},{232, 311},{232, 312},{232, 313},{232, 314},{232, 315},{232, 316},{232, 317},{232, 318},{232, 319},{232, 320},{232, 321},{232, 322},{232, 323},{232, 79},{232, 324},{232, 325},{326, 327},{326, 328},{326, 329},{326, 330},{326, 331},{326, 332},{326, 333},{326, 334},{326, 335},{326, 336},{326, 337},{326, 338},{326, 339},{326, 340},{326, 139},{326, 341},{326, 342},{326, 343},{326, 344},{326, 345},{326, 346},{326, 347},{326, 348},{326, 349},{326, 350},{326, 351},{326, 352},{326, 353},{326, 354},{326, 355},{326, 356},{326, 357},{326, 358},{326, 359},{326, 360},{326, 361},{326, 362},{326, 363},{326, 364},{326, 365},{326, 366},{326, 367},{326, 368},{326, 369},{326, 370},{326, 371},{326, 372},{326, 373},{326, 374},{326, 375},{326, 376},{326, 377},{326, 378},{326, 379},{326, 380},{326, 381},{382, 383},{382, 384},{382, 385},{382, 386},{382, 387},{382, 388},{382, 389},{382, 390},{382, 391},{382, 392},{382, 393},{382, 394},{382, 395},{382, 396},{382, 397},{382, 398},{382, 399},{382, 400},{401, 402},{401, 219},{401, 403},{401, 404},{401, 405},{401, 406},{401, 407},{401, 408},{401, 409},{401, 410},{401, 411},{401, 412},{401, 413},{401, 414},{401, 415},{401, 416},{401, 417},{401, 418},{401, 419},{401, 420},{401, 421},{401, 422},{401, 423},{401, 424},{401, 425},{401, 426},{401, 427},{401, 428},{401, 429},{401, 252},{401, 430},{401, 431},{401, 432},{401, 433},{401, 434},{401, 435},{401, 436},{401, 437},{401, 438},{401, 439},{401, 440},{401, 441},{401, 442},{401, 443},{401, 444},{401, 445},{401, 446},{401, 447},{401, 448},{401, 449},{401, 450},{401, 451},{401, 452},{401, 453},{401, 454},{401, 455},{401, 456},{401, 457},{401, 458},{401, 459},{401, 460},{401, 461},{401, 462},{401, 463},{401, 464},{401, 465},{401, 466},{401, 467},{401, 468},{401, 469},{401, 470},{401, 471},{401, 472},{401, 473},{401, 474},{401, 475},{401, 476},{401, 477},{401, 478},{401, 479},{401, 480},{401, 481},{401, 482},{401, 483},{401, 484},{401, 485},{401, 486},{401, 487},{401, 488},{401, 489},{401, 490},{401, 491},{401, 492},{401, 493},{401, 494},{401, 495},{401, 496},{401, 497},{401, 498},{401, 499},{401, 500},{401, 501},{401, 502},{401, 503},{401, 504},{401, 505},{401, 506},{401, 507},{401, 508},{401, 509},{401, 510},{401, 511},{401, 512},{401, 513},{401, 514},{401, 515},{401, 516},{401, 517},{401, 518},{401, 519},{401, 520},{401, 521},{401, 522},{401, 523},{401, 524},{401, 525},{401, 526},{401, 527},{401, 528},{401, 529},{401, 530},{401, 531},{401, 532},{401, 533},{401, 534},{401, 535},{536, 537},{536, 538},{536, 539},{536, 540},{536, 541},{536, 542},{536, 543},{536, 544},{536, 545},{536, 546},{536, 547},{536, 548},{549, 245},{549, 550},{549, 551},{549, 552},{549, 553},{549, 554},{549, 555},{549, 556},{549, 557},{549, 558},{549, 559},{549, 560},{549, 561},{549, 562},{563, 564},{563, 565},{563, 566},{563, 567},{563, 568},{563, 569},{563, 570},{563, 571},{563, 572},{563, 573},{563, 574},{563, 575},{563, 576},{563, 577},{563, 578},{563, 579},{563, 580},{563, 581},{563, 36},{563, 582},{563, 583},{563, 584},{563, 585},{563, 586},{563, 587},{563, 588},{563, 589},{563, 590},{563, 591},{563, 592},{563, 593},{594, 595},{594, 596},{594, 597},{594, 598},{594, 599},{594, 600},{594, 601},{594, 602},{594, 603},{594, 604},{594, 605},{594, 606},{594, 607},{594, 608},{594, 609},{594, 610},{594, 611},{594, 612},{613, 614},{613, 615},{613, 616},{613, 617},{613, 618},{613, 619},{613, 620},{613, 621},{613, 622},{613, 623},{613, 624},{613, 625},{613, 626},{613, 627},{613, 628},{613, 629},{613, 630},{613, 631},{613, 632},{613, 633},{613, 634},{613, 635},{613, 636},{613, 637},{613, 638},{613, 639},{613, 640},{613, 641},{642, 643},{642, 644},{642, 645},{642, 646},{642, 647},{642, 648},{642, 649},{642, 650},{642, 651},{642, 652},{642, 653},{642, 654},{642, 655},{642, 656},{642, 657},{642, 658},{642, 659},{642, 660},{642, 661},{662, 663},{662, 331},{662, 664},{662, 665},{662, 666},{667, 668},{667, 669},{667, 670},{667, 671},{667, 672},{667, 673},{667, 674},{667, 675},{667, 676},{667, 677},{667, 678},{667, 679},{667, 680},{667, 681},{667, 682},{667, 683},{667, 684},{667, 685},{667, 686},{667, 687},{667, 688},{667, 689},{667, 690},{667, 691},{667, 692},{667, 693},{667, 694},{667, 695},{667, 696},{667, 697},{667, 698},{667, 699},{667, 700},{667, 701},{667, 702},{667, 703},{667, 556},{667, 704},{667, 705},{667, 706},{667, 707},{667, 708},{667, 709},{667, 710},{667, 711},{667, 712},{667, 713},{667, 714},{667, 715},{667, 716},{667, 717},{667, 718},{667, 719},{667, 720},{667, 721},{667, 722},{667, 723},{667, 724},{667, 725},{667, 726},{667, 727},{667, 269},{667, 728},{667, 729},{667, 730},{667, 731},{667, 732},{667, 733},{667, 734},{667, 735},{667, 736},{667, 737},{667, 738},{667, 739},{667, 740},{667, 741},{667, 742},{667, 743},{667, 744},{667, 745},{667, 746},{667, 747},{667, 748},{667, 749},{667, 750},{667, 751},{667, 752},{667, 753},{667, 754},{667, 755},{667, 756},{667, 757},{667, 758},{667, 759},{667, 760},{667, 761},{667, 762},{667, 763},{667, 764},{667, 765},{667, 766},{667, 767},{667, 768},{667, 769},{667, 770},{667, 771},{667, 772},{667, 773},{667, 774},{667, 775},{667, 776},{667, 777},{667, 778},{667, 779},{667, 780},{667, 781},{667, 782},{667, 783},{667, 784},{667, 785},{667, 786},{667, 787},{667, 788},{667, 789},{667, 790},{667, 791},{792, 793},{792, 794},{792, 795},{792, 796},{792, 797},{792, 798},{792, 799},{792, 800},{792, 801},{792, 802},{792, 803},{792, 804},{792, 805},{792, 806},{792, 807},{792, 808},{792, 809},{792, 810},{792, 811},{792, 812},{792, 813},{792, 814},{792, 815},{792, 816},{792, 817},{792, 818},{792, 819},{792, 820},{792, 821},{792, 822},{792, 823},{792, 824},{792, 825},{792, 826},{792, 827},{792, 828},{792, 829},{792, 830},{792, 831},{792, 832},{792, 833},{792, 834},{792, 835},{792, 836},{792, 837},{792, 838},{792, 839},{792, 840},{792, 841},{792, 842},{792, 843},{792, 844},{792, 845},{792, 846},{792, 847},{792, 848},{792, 849},{792, 850},{792, 851},{792, 852},{792, 853},{792, 854},{792, 855},{792, 856},{792, 857},{792, 858},{792, 859},{792, 860},{792, 861},{792, 862},{792, 863},{792, 864},{792, 865},{792, 866},{792, 867},{792, 868},{792, 869},{792, 870},{792, 871},{792, 872},{873, 874},{873, 875},{873, 876},{873, 877},{873, 878},{873, 879},{873, 880},{873, 881},{873, 882},{873, 883},{873, 884},{873, 885},{873, 886},{873, 887},{873, 888},{873, 889},{873, 890},{873, 891},{873, 892},{873, 893},{873, 894},{873, 895},{873, 896},{873, 897},{898, 899},{900, 901},{900, 902},{900, 903},{900, 904},{900, 905},{900, 906},{900, 907},{900, 908},{900, 909},{900, 910},{900, 911},{900, 912},{900, 913},{900, 914},{900, 915},{900, 916},{900, 917},{900, 918},{900, 919},{900, 920},{900, 921},{900, 922},{900, 923},{900, 924},{900, 925},{900, 926},{927, 928},{927, 929},{927, 930},{927, 550},{927, 931},{927, 552},{927, 932},{927, 933},{927, 934},{927, 935},{927, 936},{927, 937},{927, 938},{927, 939},{927, 940},{927, 941},{927, 942},{927, 943},{927, 944},{927, 945},{927, 946},{927, 947},{927, 948},{927, 949},{927, 561},{927, 950},{927, 951},{927, 952},{927, 953},{927, 954},{927, 955},{927, 956},{927, 957},{927, 958},{927, 959},{927, 960},{927, 961},{927, 962},{927, 963},{927, 964},{927, 965},{927, 966},{927, 967},{927, 968},{927, 370},{927, 562},{927, 969},{927, 374},{927, 970},{927, 971},{927, 972},{927, 973},{927, 974},{927, 975},{927, 976},{927, 977},{927, 978},{979, 980},{979, 981},{979, 777},{979, 982},{983, 984},{983, 985},{983, 986},{983, 672},{983, 987},{983, 988},{983, 989},{983, 990},{983, 991},{983, 992},{983, 993},{983, 994},{983, 995},{983, 996},{983, 997},{983, 998},{983, 999},{983, 1000},{983, 1001},{983, 253},{983, 1002},{983, 1003},{983, 1004},{983, 1005},{983, 1006},{983, 1007},{983, 1008},{983, 1009},{983, 1010},{983, 1011},{983, 1012},{983, 1013},{983, 1014},{983, 1015},{983, 1016},{983, 1017},{983, 1018},{983, 1019},{983, 1020},{983, 1021},{983, 1022},{983, 1023},{983, 1024},{983, 1025},{983, 1026},{983, 1027},{983, 1028},{983, 1029},{983, 1030},{983, 1031},{983, 1032},{983, 1033},{983, 1034},{983, 1035},{983, 1036},{983, 1037},{983, 1038},{983, 1039},{983, 1040},{983, 1041},{983, 561},{983, 1042},{983, 1043},{983, 1044},{983, 1045},{983, 1046},{983, 1047},{983, 1048},{983, 1049},{983, 1050},{983, 1051},{983, 762},{983, 1052},{983, 1053},{983, 1054},{983, 1055},{983, 1056},{983, 1057},{983, 1058},{983, 1059},{983, 1060},{983, 1061},{983, 1062},{983, 1063},{983, 1064},{983, 1065},{983, 1066},{983, 1067},{983, 1068},{983, 1069},{983, 1070},{983, 1071},{983, 1072},{983, 1073},{983, 1074},{983, 1075},{983, 1076},{983, 1077},{983, 1078},{990, 672},{990, 1974},{990, 1975},{990, 1976},{990, 1977},{990, 1978},{990, 1979},{990, 1980},{990, 1981},{990, 1982},{990, 1983},{990, 1984},{990, 1985},{990, 1986},{990, 1987},{990, 1988},{990, 556},{990, 1989},{990, 1990},{990, 1008},{990, 1991},{990, 1992},{990, 1993},{990, 1994},{990, 1995},{990, 1996},{990, 1997},{990, 1998},{990, 1999},{990, 2000},{990, 2001},{990, 2002},{990, 2003},{990, 2004},{990, 2005},{990, 2006},{990, 2007},{990, 2008},{990, 2009},{990, 2010},{990, 2011},{990, 2012},{990, 1218},{990, 2013},{990, 2014},{990, 2015},{990, 2016},{990, 2017},{990, 2018},{990, 2019},{990, 1398},{990, 2020},{990, 1270},{990, 2021},{990, 2022},{990, 892},{990, 2023},{990, 2024},{990, 1056},{990, 2025},{990, 2026},{990, 2027},{990, 2028},{990, 2029},{990, 1724},{990, 2030},{990, 2031},{990, 2032},{990, 2033},{990, 2034},{990, 2035},{990, 2036},{990, 1408},{990, 2037},{990, 2038},{990, 2039},{2040, 2041},{2040, 2042},{2040, 2043},{2040, 2044},{2040, 2045},{2040, 2046},{2040, 2047},{2040, 2048},{2040, 2049},{2040, 2050},{2040, 2051},{2040, 427},{2040, 431},{2040, 2052},{2040, 2053},{2040, 2054},{2040, 437},{2040, 2055},{2040, 2056},{2040, 2057},{2040, 2058},{2040, 2059},{2040, 2060},{2040, 2061},{2040, 2062},{2040, 2063},{2040, 2064},{2040, 2065},{2040, 2066},{2040, 2067},{2040, 2068},{2040, 2069},{2040, 2070},{2040, 2071},{2040, 2072},{2040, 2073},{2040, 2074},{2040, 2075},{2040, 2076},{2040, 2077},{2040, 2078},{2040, 2079},{2040, 2080},{2040, 2081},{2040, 2082},{2040, 2083},{2040, 2084},{2040, 505},{2040, 2085},{2040, 2086},{2040, 2087},{2040, 2088},{2040, 2089},{2040, 2090},{2040, 2091},{2040, 2092},{2040, 2093},{2040, 2094},{2040, 2095},{3159, 3169},{3159, 3170},{3159, 3171},{3159, 3172},{3159, 3173},{3159, 3174},{3159, 3175},{3159, 3176},{3159, 3177},{3159, 3178},{3159, 3179},{3159, 3180},{3159, 3181},{3159, 3182},{3159, 3183},{3159, 3184},{3159, 3185},{3159, 3186},{3159, 3187},{3159, 3188},{3159, 3189},{3159, 3190},{3159, 3191},{3159, 3192},{3159, 3193},{3159, 3194},{3159, 3195},{3159, 3196},{3159, 3197},{3159, 3198},{3159, 3199},{3159, 3200},{3159, 3201},{3159, 3202},{3159, 3203},{3159, 3204},{3159, 3205},{3159, 3206},{3159, 3207},{3159, 3208},{3159, 3209},{3159, 3210},{3211, 3212},{3211, 1368},{3213, 3214},{3213, 3215},{3213, 3216},{3213, 3217},{3213, 3218},{3213, 3219},{3213, 3220},{3213, 3221},{3213, 3222},{3213, 3223},{3213, 3224},{3213, 3225},{3213, 3226},{3213, 3227},{3213, 3228},{3213, 3229},{3213, 3230},{3213, 3231},{3213, 3232},{3213, 3233},{3213, 3234},{3213, 3235},{3213, 3236},{3213, 3237},{3213, 3238},{3213, 3239},{3213, 3240},{3213, 3241},{3213, 3242},{3213, 3243},{3213, 3244},{3213, 3245},{3213, 3246},{3213, 3247},{3213, 3248},{3213, 3249},{3213, 3250},{3213, 3251},{3213, 3252},{3213, 3253},{3213, 3254},{3213, 3255},{3213, 3256},{3213, 3257},{3213, 3258},{3213, 1946},{3213, 3259},{3213, 3260},{3213, 3261},{3213, 3262},{3213, 3263},{3213, 3264},{3213, 3265},{3213, 3266},{3213, 3267},{3213, 3268},{3269, 3270},{3269, 3271},{3269, 3272},{3269, 3273},{3269, 3274},{3269, 3275},{3269, 3276},{3269, 3277},{3269, 3278},{3269, 3279},{3269, 3280},{3269, 3281},{3269, 3282},{3269, 3283},{3269, 3284},{3269, 3285},{3269, 3286},{3269, 1955},{3269, 3287},{3269, 1963},{3269, 3288},{3289, 613},{3289, 3290},{3289, 3291},{3289, 3292},{3289, 3293},{3289, 3294},{3289, 3295},{3289, 3296},{3289, 3297},{3289, 3298},{3289, 3299},{3289, 3300},{3289, 3301},{3289, 3302},{3289, 3303},{3289, 3304},{3289, 3305},{3289, 3306},{3289, 3307},{3289, 3308},{3289, 3309},{3289, 3310},{3289, 3311},{3289, 3312},{3289, 3313},{3289, 3314},{3289, 3315},{3289, 3316},{3289, 3317},{3289, 3318},{3289, 3319},{3289, 3320},{3289, 3321},{3289, 3322},{3289, 3323},{3289, 3324},{3289, 3325},{3289, 2420},{3289, 3326},{3289, 3327},{3289, 3328},{3289, 3329},{3289, 3330},{3289, 3331},{3289, 3332},{3289, 3333},{3289, 3334},{3289, 3335},{3289, 3336},{3289, 3337},{3289, 3338},{3289, 3339},{3289, 3340},{3289, 3341},{3289, 3342},{3289, 3343},{3289, 3344},{3289, 3345},{3289, 3346},{3289, 3347},{3289, 3348},{3289, 3349},{3289, 3350},{3289, 3351},{3289, 3352},{3289, 3353},{3289, 3354},{3289, 3355},{3289, 3356},{3289, 3357},{3289, 3358},{3289, 3359},{3289, 3360},{3289, 3361},{3289, 3362},{3289, 3363},{3289, 3364},{3289, 3365},{3289, 3366},{3289, 3367},{3289, 3368},{3289, 3369},{3289, 3370},{3289, 3371},{3289, 3372},{3289, 3373},{3289, 3374},{3289, 3375},{3289, 3376},{3289, 3377},{3289, 3378},{3289, 3379},{3289, 3380},{3289, 3381},{3289, 3382},{3289, 3383},{3289, 3384},{3385, 3386},{3385, 3387},{3385, 3388},{3385, 3389},{3385, 3390},{3385, 3391},{3385, 3392},{3385, 3393},{3385, 3394},{3385, 3395},{3385, 3396},{3385, 3397},{3385, 1095},{3385, 3398},{3385, 3399},{3385, 3400},{3385, 3401},{3385, 3402},{3385, 3403},{3385, 3404},{3385, 3405},{3385, 3406},{3385, 3407},{3385, 3408},{3385, 3409},{3385, 3410},{3385, 3411},{3385, 3412},{3385, 3413},{3385, 3414},{3385, 3415},{3385, 3416},{3385, 3417},{3385, 3418},{3385, 3419},{3420, 3421},{3420, 3422},{3420, 3423},{3420, 3424},{3420, 3425},{3420, 3426},{3420, 3427},{3420, 3428},{3420, 3429},{3420, 3430},{3420, 3431},{3420, 3432},{3420, 3433},{3420, 3434},{3420, 3435},{3420, 3436},{3420, 3437},{3420, 3438},{3420, 3439},{3420, 3440},{3420, 3441},{3420, 3442},{3420, 3443},{3420, 3444},{3420, 3445},{3420, 3446},{3420, 3447},{3420, 3448},{3420, 3449},{3420, 3450},{3420, 3451},{3420, 3452},{3420, 3453},{3420, 3454},{3420, 3455},{3420, 3456},{3420, 3457},{3420, 3458},{3420, 3459},{3420, 3460},{3420, 3461},{3420, 3462},{3420, 3463},{3420, 3464},{3420, 3465},{3420, 3466},{3420, 3467},{3420, 3468},{3420, 3469},{3420, 3470},{3420, 3471},{3420, 3472},{3420, 3473},{3420, 3474},{3420, 3475},{3420, 3476},{3420, 3477},{3420, 3478},{3420, 3479},{3420, 3480},{3420, 3481},{3420, 3482},{3420, 3483},{3420, 3484},{3420, 3485},{3420, 3486},{3420, 3487},{3420, 3488},{3420, 3489},{3420, 3490},{3420, 3491},{3420, 3492},{3420, 3493},{3420, 3494},{3420, 3495},{3420, 3496},{3420, 3497},{3420, 3498},{3420, 3499},{3420, 3500},{3420, 3501},{3420, 3502},{3420, 3503},{3420, 3504},{3420, 3505},{3420, 3506},{3420, 3507},{3420, 3508},{3420, 3509},{3420, 3510},{3420, 3511},{3420, 3512},{3420, 3513},{3420, 3514},{3420, 3515},{3420, 3516},{3420, 3517},{3420, 3518},{3420, 3519},{3420, 3520},{3420, 3521},{3420, 3522},{3420, 3523},{3420, 3524},{3420, 3525},{3420, 3526},{3420, 3527},{3420, 3528},{3420, 3529},{3420, 3530},{3531, 3532},{3531, 407},{3531, 3533},{3531, 672},{3531, 3534},{3531, 3535},{3531, 3536},{3531, 3537},{3531, 3538},{3531, 3539},{3531, 3540},{3531, 3541},{3531, 2405},{3531, 3542},{3531, 3543},{3531, 3544},{3531, 3545},{3531, 3546},{3531, 3547},{3531, 3548},{3531, 1031},{3531, 3549},{3531, 3550},{3531, 3551},{3531, 3552},{3531, 3553},{3531, 3554},{3531, 3555},{3531, 3556},{3531, 3557},{3531, 2443},{3531, 3558},{3531, 3559},{3531, 3560},{3531, 3561},{3531, 3562},{3531, 3563},{3531, 3564},{3531, 3565},{3531, 3566},{3531, 3567},{3531, 3568},{3531, 3569},{3531, 3570},{3531, 1369},{3571, 3572},{3571, 3573},{3571, 3574},{3571, 3575},{3571, 3576},{3571, 3577},{3571, 3578},{3571, 3579},{3571, 3580},{3571, 3581},{3571, 3582},{3571, 3583},{3571, 3584},{3571, 3585},{3571, 3586},{3571, 3587},{3571, 3588},{3571, 3589},{3571, 3590},{3571, 3591},{3571, 3592},{3571, 3593},{3571, 3594},{3571, 3595},{3571, 3596},{3571, 3597},{3571, 3598},{3571, 3599},{3571, 3600},{3571, 3601},{3571, 3602},{3571, 3603},{3571, 3604},{3571, 3605},{3571, 3606},{3571, 3607},{3571, 3608},{3571, 3609},{3571, 3610},{3571, 3611},{3571, 3612},{3571, 3613},{3571, 3614},{3571, 3615},{3571, 3616},{3571, 3617},{3571, 3618},{3571, 3619},{3571, 3620},{3571, 3621},{3571, 3265},{3571, 3622},{3571, 3623},{3571, 3624},{3571, 3625},{3571, 3626},{3571, 3627},{3571, 3628},{3571, 3629},{3571, 3630},{3571, 3631},{3632, 3633},{3632, 3634},{3632, 3635},{3632, 3636},{3632, 3637},{5717, 5719},{5717, 5720},{5717, 5721},{5717, 5722},{5717, 5723},{5717, 5724},{5717, 5725},{5717, 5726},{5717, 5727},{5717, 5728},{5717, 5729},{5717, 5730},{5717, 5731},{5717, 5732},{5717, 5733},{5717, 5734},{5717, 5735},{5717, 5736},{5717, 5737},{5717, 5738},{5717, 5739},{5717, 5740},{5717, 5741},{5717, 5742},{5717, 5743},{5717, 5744},{5717, 5745},{5717, 5746},{5717, 5747},{5717, 5748},{5717, 5749},{5717, 5750},{5717, 5751},{5717, 5752},{5717, 5753},{5717, 5754},{5717, 5755},{5717, 5756},{5717, 5757},{5717, 5758},{5717, 5759},{5717, 5760},{5717, 5761},{5717, 5762},{5717, 5763},{5717, 5764},{5717, 5765},{5717, 5766},{5717, 5767},{5717, 5768},{5717, 5769},{5717, 5770},{5717, 5771},{5717, 5772},{5717, 5773},{5717, 5774},{5717, 5775},{5717, 5776},{5717, 5777},{5717, 5778},{5894, 5904},{5894, 5905},{5894, 5906},{5894, 5907},{5908, 5909},{5908, 5910},{5908, 5911},{5908, 5912},{5908, 5913},{5908, 5914},{5908, 5915},{5908, 5916},{5908, 5917},{5908, 5918},{5908, 5919},{5908, 5920},{5908, 5921},{5908, 5922},{5908, 5923},{5908, 5924},{5908, 5925},{5908, 5926},{5908, 5927},{5908, 5928},{5908, 5929},{5908, 5930},{5908, 5931},{5908, 5932},{5908, 5933},{5908, 5934},{5908, 5935},{5908, 5936},{5908, 5937},{5908, 5938},{5908, 5939},{5908, 5940},{5908, 5941},{5908, 5942},{5908, 5943},{5908, 5944},{5908, 5945},{5908, 5946},{5908, 5947},{5908, 5948},{5908, 5949},{5908, 5950},{5908, 5951},{5908, 5952},{5908, 5953},{5908, 5954},{5908, 5955},{5908, 5956},{5908, 5957},{5908, 5958},{5908, 5959},{5908, 5960},{5908, 5961},{5908, 5962},{5908, 5963},{5908, 5964},{5908, 5965},{5908, 5966},{5908, 5967},{5908, 5968},{5908, 5969},{5908, 5970},{5908, 5971},{5908, 5972},{5908, 5973},{5908, 5974}};
std::vector<std::vector<int> > grid(6000, std::vector<int>(6000));
int ro,co;
int walk_length, walk_break;
printf("Grid creating...");
for(int r=0; r < ROW1; r++){
int x,y;
x = dataset[r][0];
y = dataset[r][1];
grid[x][y]='.';
//printf(" m ,n - %d,%d grid-%c\n",m,n,grid1[m][n]);
}
printf("Grid Created");
//test-1
int start_node[2] = {401,440};
walk_length = 40;
walk_break = 1000;
//calling random walk
Random_Walker(grid,start_node ,walk_length, walk_break);
//test-2
int start_node1[2] = {3289,3316};
walk_length = 50;
walk_break = 1000;
//calling random walk
Random_Walker(grid,start_node1 ,walk_length, walk_break);
//test-3
int start_node2[2] = {5908,5920};
walk_length = 50;
walk_break = 1000;
//calling random walk
Random_Walker(grid,start_node2 ,walk_length, walk_break);
return 0;
}