Struct MapLocation

Inheritance Relationships

Derived Types

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

bool operator!=(MapLocation const &m) const

Inequality operator for MapLocation.

Return
true if locations are not identical
Parameters

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 to
  • m: 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 from
  • m: the object to read to