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

Represents a neighbouring node to a central node. More...

#include <quadaction.h>

Collaboration diagram for dialect::Nbr:
Collaboration graph

Public Member Functions

 Nbr (id_type id, double dx, double dy)
 Standard constructor. More...
 
unsigned octalCode (void) const
 
double deflection (void) const
 A measure of how far into its quadrant this nbr lies, in the clockwise direction. More...
 

Detailed Description

Represents a neighbouring node to a central node.

Constructor & Destructor Documentation

◆ Nbr()

Nbr::Nbr ( id_type  id,
double  dx,
double  dy 
)

Standard constructor.

Parameters
[in]ida unique identifier; useful for associating an instance with the node it represents
[in]dxx-displacement of this Nbr relative to central node
[in]dyy-displacement of this Nbr relative to central node

Member Function Documentation

◆ deflection()

double Nbr::deflection ( void  ) const

A measure of how far into its quadrant this nbr lies, in the clockwise direction.

Returns
If this nbr lies in quadrant n or on semiaxis n, then return the squared sine of the angle that this nbr makes with semiaxis n.

References octalCode().

Here is the call graph for this function:

◆ octalCode()

unsigned Nbr::octalCode ( void  ) const
Returns
A code number from 0 to 7, indicating where this neighbour lies relative to the central node: Semiaxes 0,1,2,3 get octal codes 0,2,4,6; Quadrants 0,1,2,3 get octal codes 1,3,5,7.

Referenced by deflection().

Here is the caller graph for this function:

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