Commit 5ef79444 authored by f.mack's avatar f.mack

Cleaned up the code

parent a88f8ab9
Pipeline #1316 canceled with stage
......@@ -176,8 +176,8 @@ enum GridCode { //used in floor fields
enum FastMarchingFlags {
FM_UNKNOWN = 0,
FM_SINGLE = 1,
FM_DOUBLE = 2,
FM_SINGLE = 1, // single and double indicate whether a grid point was reached from one or two
FM_DOUBLE = 2, // directions (rows and columns) when performing the fast marching algorithm
FM_FINAL = 3,
FM_ADDED = 4, // added to trial but not calculated
//FM_BLOCKER = -5, // currently not used
......
......@@ -428,7 +428,7 @@ void DirectionLocalFloorfield::Init(Building* buildingArg, double stepsize,
}
end = std::chrono::system_clock::now();
std::chrono::duration<double> elapsed_seconds = end-start;
Log->Write("INFO: \tTaken time: " + std::to_string(elapsed_seconds.count()));
Log->Write("INFO: \tTime to construct FF in DirectionLocalFloorfield: " + std::to_string(elapsed_seconds.count()));
// }
_initDone = true;
}
......
This diff is collapsed.
......@@ -406,11 +406,12 @@ SubRoom* LocalFloorfieldViaFM::isInside(const long int key) {
auto neighbors = _grid->getNeighbors(key);
for (auto& neighbor : neighbors.key) {
if (neighbor == -2) continue; // -2 is returned y getNeighbors() for invalid points
if (neighbor == -2) continue; // -2 is returned by getNeighbors() for invalid points
SubRoom* subroom = _subrooms[neighbor];
if (subroom && subroom->IsInSubRoom(probe)) return subroom;
}
// If we weren't successful so far, we have to search the whole list.
const std::map<int, std::shared_ptr<SubRoom>>& subRoomMap = _room->GetAllSubRooms();
for (auto& subRoomPair : subRoomMap) {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment