Adaptagrams
Public Member Functions | Public Attributes | List of all members
dialect::Quad Struct Reference

Represents a quadrant, relative to a central node. More...

#include <quadaction.h>

Collaboration diagram for dialect::Quad:
Collaboration graph

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.
 

Detailed Description

Represents a quadrant, relative to a central node.

Constructor & Destructor Documentation

◆ Quad()

Quad::Quad ( unsigned  num)

Standard constructor.

Parameters
[in]numThe number of this quadrant in {0, 1, 2, 3}

References num.

Member Function Documentation

◆ constructAssignmentForAction()

Assignment Quad::constructAssignmentForAction ( char  action) const

Construct an Assignment indicating which Nbr(s) were assigned to which semiaxes, and representing the cost.

Parameters
[in]actionan action code letter, in {A, B, C, D}: A: Anticlockwise B: Both C: Clockwise D: Do nothing
Returns
the Assignment

References ACost, CCost, nbrs, num, and size().

Here is the call graph for this function:

The documentation for this struct was generated from the following files: