444 void astar_print_path(map came_from, node* current, node *start) 445 { 446 node *x; 447 if (came_from.find(current) == came_from.end()) 448 return; 449 x = came_from[current]; 450 if (x == start) { 451 printf("Start at #%s#\n", x->name.c_str()); 452 return; 453 } 454 astar_print_path(came_from, x, start); 455 /* see if this is the last node on its line */ 456 if (x->curlink != current->curlink) { 457 printf("Take #%s# to #%s#\n", lines[x->curlink].c_str(), current->name.c_str()); 458 } 459 puts(lines[x->curlink].c_str()); 460 puts(current->name.c_str()); 461 } #tart at #Amersham Metropolitan Line Chorleywood Metropolitan Line Rickmansworth Metropolitan Line Moor Park Metropolitan Line Northwood Metropolitan Line Northwood Hills Metropolitan Line Pinner Metropolitan Line North Harrow Metropolitan Line Harrow-on-the-Hill Metropolitan Line Northwick Park Metropolitan Line Preston Road Metropolitan Line Wembley Park Metropolitan Line Finchley Road Metropolitan Line Baker Street Metropolitan Line Great Portland Street Metropolitan Line Euston Square Metropolitan Line King's Cross St. Pancras Metropolitan Line Farringdon Metropolitan Line Barbican Metropolitan Line Moorgate Metropolitan Line Liverpool Street # to #Bethnal GreenLine Metropolitan Line Bethnal Green Central Line Mile End Central Line Stratford # to #West HamLine Central Line West Ham Jubilee Line Canning Town # to #Royal Victoria Jubilee Line Royal Victoria Docklands Light Railway Custom House Docklands Light Railway Prince Regent Docklands Light Railway Royal Albert Docklands Light Railway Beckton Park Docklands Light Railway Cyprus Docklands Light Railway Gallions Reach # to #Becktonds Light Railway Docklands Light Railway Beckton