|
Adaptagrams
|
Represents a quadrant, relative to a central node. More...
#include <quadaction.h>

Public Member Functions | |
| Quad (unsigned num) | |
| Standard constructor. More... | |
| void | addNbr (const Nbr_SP &nbr) |
| Add a neighbour. | |
| size_t | size (void) const |
| Say how many Nbrs are in this quadrant. | |
| void | sortAndComputeCosts (void) |
| To be called after all nbrs have been added. Sorts the nbrs into clockwise order, and then computes and stores the costs associated with the clockwise and anticlockwise actions. | |
| Assignment | constructAssignmentForAction (char action) const |
| Construct an Assignment indicating which Nbr(s) were assigned to which semiaxes, and representing the cost. More... | |
Public Attributes | |
| unsigned | num |
| The number of this quadrant, 0, 1, 2, or 3. | |
| Nbrs | nbrs |
| The Nbrs that lie in this quadrant. | |
| double | ACost |
| Cost for anticlockwise action. | |
| double | CCost |
| Cost for clockwise action. | |
Represents a quadrant, relative to a central node.
| Quad::Quad | ( | unsigned | num | ) |
| Assignment Quad::constructAssignmentForAction | ( | char | action | ) | const |
Construct an Assignment indicating which Nbr(s) were assigned to which semiaxes, and representing the cost.
| [in] | action | an action code letter, in {A, B, C, D}: A: Anticlockwise B: Both C: Clockwise D: Do nothing |
References ACost, CCost, nbrs, num, and size().

1.8.14