Skip to content

Commit

Permalink
added header for each file
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinXu1210 committed Sep 7, 2023
1 parent ca971f9 commit 92029f2
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
11 changes: 10 additions & 1 deletion 2D_Vector/OccupancyMapHash.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
// This file implements the OccupancyMapHash class
// This class is a hash table based approach to occupancy map
// The occupancy map is a 2D grid of boolean values
// The occupancy map is implemented as a 2D vector of boolean values
// The occupancy map is initialized to be all false
// The occupancy map is updated by setting the location to be occupied
// The occupancy map is queried by checking the occupancy status of a location

#include "OccupancyMapHash.h"

const int MAX_SIZE = 2048; // MAX_SIZE is the maximum size of the map
Expand Down Expand Up @@ -27,4 +35,5 @@ bool COccupancyMapHash::CheckIsOccupied(std::pair<int,int> Location)
{
// Return the occupancy status of the location
return mOccupancyGrid[Location.first][Location.second];
}
}

4 changes: 3 additions & 1 deletion 2D_Vector/OccupancyMapHash.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Header file for OccupancyMapHash.cpp

#ifndef _OCCUPANCYMAPVECTOR_H
#define _OCCUPANCYMAPVECTOR_H

Expand All @@ -7,7 +9,7 @@

// Class to implement a occupancy map using a vector
class COccupancyMapHash : public COccupancyMapBase
{
{

public:
COccupancyMapHash();
Expand Down
8 changes: 8 additions & 0 deletions Set/OccupancyMapHash.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
// Implementation of the OccupancyMapHash class
// This class is a hash table based approach to occupancy map
// The occupancy map is a 2D grid of boolean values
// The occupancy map is implemented as a 2D vector of boolean values
// The occupancy map is initialized to be all false
// The occupancy map is updated by setting the location to be occupied
// The occupancy map is queried by checking the occupancy status of a location

#include "OccupancyMapHash.h"

// Constructor
Expand Down
2 changes: 2 additions & 0 deletions Set/OccupancyMapHash.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Header file for OccupancyMapHash.cpp

#ifndef _OCCUPANCYMAPVECTOR_H
#define _OCCUPANCYMAPVECTOR_H

Expand Down

0 comments on commit 92029f2

Please sign in to comment.