mirror of
https://github.com/JHUAPL/kami.git
synced 2026-01-07 22:13:51 -05:00
Grid and domain cleanup and documentation updates
This commit is contained in:
@@ -51,7 +51,7 @@ namespace kami {
|
||||
/**
|
||||
* @brief Constructor for one-dimensional coordinates
|
||||
*/
|
||||
explicit GridCoord1D(int x_coord);;
|
||||
explicit GridCoord1D(int x_coord);
|
||||
|
||||
/**
|
||||
* @brief Return the `x` coordinate
|
||||
|
||||
@@ -133,10 +133,31 @@ namespace kami {
|
||||
inline friend GridCoord2D operator*(const double lhs, const GridCoord2D &rhs);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief Find the distance between two points using the Chebyshev metric
|
||||
*
|
||||
* @param p the point to measure the distance to
|
||||
*
|
||||
* @returns the distance as a `double`
|
||||
*/
|
||||
inline double distance_chebyshev(std::shared_ptr<GridCoord2D> &p) const;
|
||||
|
||||
/**
|
||||
* @brief Find the distance between two points using the Euclidean metric
|
||||
*
|
||||
* @param p the point to measure the distance to
|
||||
*
|
||||
* @returns the distance as a `double`
|
||||
*/
|
||||
inline double distance_euclidean(std::shared_ptr<GridCoord2D> &p) const;
|
||||
|
||||
/**
|
||||
* @brief Find the distance between two points using the Manhattan metric
|
||||
*
|
||||
* @param p the point to measure the distance to
|
||||
*
|
||||
* @returns the distance as a `double`
|
||||
*/
|
||||
inline double distance_manhattan(std::shared_ptr<GridCoord2D> &p) const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <kami/domain.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include <kami/domain.h>
|
||||
|
||||
namespace kami {
|
||||
|
||||
std::ostream &operator<<(std::ostream &lhs, const Coord &rhs) {
|
||||
|
||||
@@ -23,10 +23,6 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <kami/agent.h>
|
||||
#include <kami/domain.h>
|
||||
#include <kami/grid1d.h>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
@@ -35,6 +31,10 @@
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
|
||||
#include <kami/agent.h>
|
||||
#include <kami/domain.h>
|
||||
#include <kami/grid1d.h>
|
||||
|
||||
namespace kami {
|
||||
|
||||
GridCoord1D::GridCoord1D(int x_coord) : _x_coord(x_coord) {}
|
||||
|
||||
@@ -23,10 +23,6 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <kami/agent.h>
|
||||
#include <kami/domain.h>
|
||||
#include <kami/grid2d.h>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
@@ -34,6 +30,10 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <kami/agent.h>
|
||||
#include <kami/domain.h>
|
||||
#include <kami/grid2d.h>
|
||||
|
||||
namespace kami {
|
||||
|
||||
int GridCoord2D::get_x_location() const {
|
||||
|
||||
Reference in New Issue
Block a user