Path 1.0
MaskNext Class Reference

N-Ring neighborhood masks with prime directions. More...

#include <shortestpath.h>

Static Public Member Functions

static int Size (int)
 Return the number of neighbors.
 
static QPoint Next (int)
 Return an edge of the mask.
 
static double Length (int)
 Return the length of the edge of the mask.
 

Static Protected Attributes

static const int n = 4 + 4 + 8 + 16 + 16 + 32 + 16 + 48
 Number of neihgbors, computed for each extra ring.
 
static const QPoint next [n]
 Neighbors.
 
static const int size [8]
 Number of neighbors.
 
static const double length [n]
 Edge lengths.
 

Detailed Description

N-Ring neighborhood masks with prime directions.

The neighborhood is implemented for 0 ≤ n ≤ 7.

Member Function Documentation

◆ Length()

double MaskNext::Length ( int e)
static

Return the length of the edge of the mask.

Parameters
eEdge, should be in [0, n[ where n = MaskNext::Size(m) is the size of the maks.
See also
MaskNext::Next(int)

◆ Next()

QPoint MaskNext::Next ( int e)
static

Return an edge of the mask.

Parameters
eEdge, should be in [0, n[ where n = MaskNext::Size(m) is the size of the maks.

◆ Size()

int MaskNext::Size ( int m)
static

Return the number of neighbors.

Parameters
mMask type, should be 0 ≤ m ≤ 7.

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