Struct MapLocation¶
- Defined in File MapLocation.h
Inheritance Relationships¶
Derived Types¶
public necsim::DataPoint
(Class DataPoint)public necsim::Step
(Class Step)
Struct Documentation¶
-
struct
MapLocation
¶ Subclassed by necsim::DataPoint, necsim::Step
Public Functions
-
MapLocation
()¶
-
MapLocation
(long x, long y, long xwrap, long ywrap)¶
-
bool
isOnGrid
() const Checks if the location is directly on the grid without wrapping (i.e. xwrap and ywrap are 0).
- Return
- true if on the grid
-
bool
operator==
(MapLocation const &m) const Equality operator for MapLocation.
- Return
- true if the x, y, xwrap and ywrap are identical
- Parameters
m
: the MapLocation object to compare against
-
bool
operator!=
(MapLocation const &m) const Inequality operator for MapLocation.
- Return
- true if locations are not identical
- Parameters
m
: the MapLocation object to compare against
Public Members
-
long
x
-
long
y
-
long
xwrap
-
long
ywrap
Friends
-
std::ostream &
operator<<
(std::ostream &os, const MapLocation &m)¶ Output operator for MapLocation.
- Return
- the output stream
- Parameters
os
: the output stream to write tom
: the object to write out
-
std::istream &
operator>>
(std::istream &is, MapLocation &m)¶ Input operator for MapLocation.
- Return
- the input stream
- Parameters
is
: the input stream to read fromm
: the object to read to
-