| 
    MachineIntelligenceCore:Algorithms
    
   | 
 
Class representing position in 2-D space. More...
#include <Position2D.hpp>
Public Member Functions | |
| Position2D () | |
| Position2D (long x_, long y_) | |
| Position2D (size_t min_x_, size_t max_x_, size_t min_y_, size_t max_y_) | |
| void | rand (size_t min_x_, size_t max_x_, size_t min_y_, size_t max_y_) | 
| void | set (long x_, long y_) | 
| mic::types::Position2D | operator+ (Action2DInterface ac_) | 
| bool | operator== (mic::types::Position2D pos_) | 
| bool | move (Action2DInterface ac_) | 
| bool | move (Action2DInterface ac_, size_t width_, size_t height_, bool circular_world_=true) | 
Public Attributes | |
| long | x | 
| The x coordinate.  More... | |
| long | y | 
| The y coordinate.  More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &os_, const Position2D &pos_) | 
Class representing position in 2-D space.
Definition at line 35 of file Position2D.hpp.
      
  | 
  inline | 
Default constructor. Sets position to (0,0).
Definition at line 47 of file Position2D.hpp.
      
  | 
  inline | 
Constructor. Sets position to (0,0).
Definition at line 52 of file Position2D.hpp.
      
  | 
  inline | 
Constructor responsible for generation of a random position.
| min_x_ | Min x cooridnate. | 
| max_x_ | Max x cooridnate. | 
| min_y_ | Min y cooridnate. | 
| max_y_ | Max y cooridnate. | 
Definition at line 61 of file Position2D.hpp.
References rand().

      
  | 
  inline | 
Performs "deterministic" move in 2D.
| ac_ | The action to be performed. | 
Definition at line 131 of file Position2D.hpp.
References mic::types::Action2DInterface::dx, mic::types::Action2DInterface::dy, x, and y.
      
  | 
  inline | 
Performs "deterministic" move in 2D. Depending on the value of circular_world_ flag, exceeding the boundaries will result in moving to the "other side" of the space (if true) or return the information that the move was not possible.
| ac_ | The action to be performed. | 
| width_ | Width of the "2D space". | 
| height_ | Height of the "2D space". | 
| circular_world_ | Flag determining whether exceeding the boundaries will result in moving to the "other side" of the space (if true) or return the information that the move was not possible. | 
Definition at line 147 of file Position2D.hpp.
References mic::types::Action2DInterface::dx, mic::types::Action2DInterface::dy, x, and y.
      
  | 
  inline | 
Operator returning new position being the result of the taken action from given position.
| ac_ | The action to be performed. | 
Definition at line 106 of file Position2D.hpp.
References mic::types::Action2DInterface::dx, mic::types::Action2DInterface::dy, x, and y.
      
  | 
  inline | 
Comparison operator.
| pos_ | The compared position. | 
Definition at line 118 of file Position2D.hpp.
      
  | 
  inline | 
Random position.
| min_x_ | Min x cooridnate. | 
| max_x_ | Max x cooridnate. | 
| min_y_ | Min y cooridnate. | 
| max_y_ | Max y cooridnate. | 
Definition at line 72 of file Position2D.hpp.
Referenced by Position2D().
      
  | 
  inline | 
Sets position coordinates.
| x_ | The x coordinate. | 
| y_ | The y coordinate. | 
Definition at line 96 of file Position2D.hpp.
      
  | 
  friend | 
Returns ostream containing description of given position.
| os_ | Ostream. | 
| pos_ | Position. | 
Definition at line 174 of file Position2D.hpp.
| long mic::types::Position2D::x | 
The x coordinate.
Definition at line 39 of file Position2D.hpp.
Referenced by move(), operator+(), operator==(), rand(), and set().
| long mic::types::Position2D::y | 
The y coordinate.
Definition at line 42 of file Position2D.hpp.
Referenced by move(), operator+(), operator==(), rand(), and set().