Assignment Search Framework
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
map_utils.h File Reference

Go to the source code of this file.

Functions

bool read_in_pathfinding_probs (std::string file_name, std::vector< MapLocation > &starts, std::vector< MapLocation > &goals)
 

Detailed Description

Utilities for maps.

Function Documentation

bool read_in_pathfinding_probs ( std::string  file_name,
std::vector< MapLocation > &  starts,
std::vector< MapLocation > &  goals 
)

Reads in the pathfinding problems from the given file.

The input format is assumed to be as follows. Each line represents a different problem, and each is defined by 4 integers. The first two are the x and y coordinates of the start state. The last two are the x and y coordinates of the goal state.

Todo:
Add more extensive error checking.
Parameters
file_nameThe file name to read from.
startsThe vector in which to store the start states.
goalsThe vector in which to store the goal states.
Returns
If the read was successful or not.