bool operator()(const trainStopData& tsd) { double new_dist = haverdist(latitude, longitude, tsd.get_latitude(), tsd.get_longitude()); if (new_dist < shortest_dist) { shortest_dist = new_dist; return true; } return false; }
//printTrainStopInfo (); void operator() (trainStopData stopData){ cout << "Stop ID: " << stopData.get_id()<< endl; cout << "Stop Name: " << stopData.get_stop_name() << endl; cout << "Stop Latitude: " << stopData.get_latitude() << endl; cout << "Stop Longitude: " << stopData.get_longitude() << endl; }
bool operator() (trainStopData stopData){ return _d >= haverdist(_latitude, _longitude, stopData.get_latitude(), stopData.get_longitude()); }
void operator()(trainStopData t){ cout << "Station id: " << t.get_id() << endl; cout << "Station name: " << t.get_stop_name() << endl; cout << "Station latitude and longitude : " << t.get_latitude() << ", " << t.get_longitude() <<endl; }
bool operator()(trainStopData t){ return (d <= haverdist(latitude, longitude, t.get_latitude(), t.get_longitude())); }