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

Represents the arrangement of all Nbrs around a centre node. More...

#include <quadaction.h>

Collaboration diagram for dialect::Arrangement:
Collaboration graph

Public Member Functions

 Arrangement (Nbrs nbrs)
 Standard constructor. More...
 
std::vector< unsigned > vacancy (void) const
 Get the "vacancy vector" for this Arrangement. More...
 
std::vector< unsigned > dist (void) const
 Get the "distribution vector" for this Arrangement. More...
 
std::vector< unsigned > rDist (void) const
 Get the "reduced distribution vector" for this Arrangement. More...
 
Assignment_SP getBasicAssignment (void) const
 Get the "basic Assignment" for this Arrangement. More...
 
Assignment_SP getAssignmentForQuadAction (std::string quadAction) const
 Get the Assignment resulting from a given quad action. More...
 
Assignments computeNAssignments (unsigned N) const
 Compute all possible Assignments in which precisely N semiaxes are occupied, sorted by ascending cost. More...
 
Assignments computeAllAssignments (void) const
 Compute all possible Assignments. More...
 

Public Attributes

Nbrs nbrs
 All Nbrs in the Arrangement.
 
Nbrs semis
 The semiaxes.
 
Quads quads
 The quadrants.
 

Detailed Description

Represents the arrangement of all Nbrs around a centre node.

Constructor & Destructor Documentation

◆ Arrangement()

Arrangement::Arrangement ( Nbrs  nbrs)

Standard constructor.

Parameters
[in]nbrsall the Nbrs of the (implied) centre node

Member Function Documentation

◆ computeAllAssignments()

Assignments Arrangement::computeAllAssignments ( void  ) const

Compute all possible Assignments.

Returns
vector of Assignment_SPs. The ordering is such that any and all 4-assignments come first, in order of ascending cost, followed by any and all 3-assignments, again in order of ascending cost, then likewise for 2- and 1-assignments.

References computeNAssignments().

Here is the call graph for this function:

◆ computeNAssignments()

Assignments Arrangement::computeNAssignments ( unsigned  N) const

Compute all possible Assignments in which precisely N semiaxes are occupied, sorted by ascending cost.

Parameters
[in]Nthe number of semiaxes to be occupied
Returns
vector of Assignment_SPs, sorted by ascending cost.

References getAssignmentForQuadAction(), getBasicAssignment(), dialect::lookupQuadActions(), nbrs, quads, rDist(), dialect::SEMIAXIS_SETS_BY_CARDINALITY, and vacancy().

Referenced by computeAllAssignments().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dist()

vector< unsigned > Arrangement::dist ( void  ) const

Get the "distribution vector" for this Arrangement.

Returns
vector telling how many Nbrs are in each quadrant

References quads.

Referenced by rDist().

Here is the caller graph for this function:

◆ getAssignmentForQuadAction()

Assignment_SP Arrangement::getAssignmentForQuadAction ( std::string  quadAction) const

Get the Assignment resulting from a given quad action.

Parameters
[in]quadActiona string of four letters chosen from among {A, B, C, D}, representing the action to be taken in each of the four quadrants.
Returns
the Assignment resulting from the quad action.

References getBasicAssignment(), and quads.

Referenced by computeNAssignments().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBasicAssignment()

Assignment_SP Arrangement::getBasicAssignment ( void  ) const

Get the "basic Assignment" for this Arrangement.

Returns
the Assignment in which no quad actions have been taken, i.e. in which the semiaxees are just as initially defined, and in which the cost is zero.

References semis.

Referenced by computeNAssignments(), and getAssignmentForQuadAction().

Here is the caller graph for this function:

◆ rDist()

vector< unsigned > Arrangement::rDist ( void  ) const

Get the "reduced distribution vector" for this Arrangement.

Returns
vector of 0's, 1's, and 2's telling, respectively, whether there are zero, one, or >= 2 Nbrs are in each quadrant

References dist().

Referenced by computeNAssignments().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vacancy()

vector< unsigned > Arrangement::vacancy ( void  ) const

Get the "vacancy vector" for this Arrangement.

Returns
vector of 0's and 1's, where 0 means the corresponding semiaxis is vacant, and 1 means it is occupied

References semis.

Referenced by computeNAssignments().

Here is the caller graph for this function:

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