![]() |
Fréchet View
1.6.0
A Tool for Exploring Fréchet Distance Algorithms
|
Represents a polygon line segment from node i to j.
Note that polygon edges are meant to be oriented, i.e. j==i+1 The last edge back to the starting point is therefore encoded as (n-1,n) (instead of (n-1,0)). The equation j==i+1 indicates proper polygon edges and indices should be taken modulo n.
However. For diagonals, orientation is not encoded, therefore i < j so that we can sort and identify diagonals.
If this seems confusing, we should think about introducing two data types, (one for edges, another one for diagonals), or introduce a flag for edges.
#include <types.h>
Inherits pair< int, int >.
Public Member Functions | |
Segment () | |
empty constructor; creates an invalid polygon segment More... | |
Segment (int i, int j) | |
default constructor with vertices. For poylgon edge segments, j==i+1 or j+1==i is expected. For diagonal segements, j!=i+1. More... | |
bool | empty () const |
bool | is_diagonal (int n) const |
bool | is_edge (int n) const |
bool | operator< (const Segment &that) const |
ordering operator. Imposes a natural ordering on segments, which is useful for sorting sets of segments. More... | |
QLineF | map (const Curve &curve) const |
map (embed) segment to a line in the plane More... | |
Static Public Member Functions | |
static QPointF | map (const Curve &curve, int i) |
map a polygon vertex to a point in the plane More... | |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inline |