45 Segment() : std::pair<int,int> (-1,-1) { }
77 return (second==(first+1)) || ((first==0) && (second==(n-1)));
86 bool operator< (
const Segment& that)
const 88 if (this->first != that.first)
89 return this->first < that.first;
91 return this->second > that.second;
99 return QLineF(map(curve,first),map(curve,second));
108 return curve[i % (curve.size()-1)];
129 #endif // POLY_TYPES_H Represents a polygon line segment from node i to j.
global definitions for all algorithms.
std::set< Segment > Segments
a set of Segment objects
Segment(int i, int j)
default constructor with vertices. For poylgon edge segments, j==i+1 or j+1==i is expected....
bool is_edge(int n) const
Segment()
empty constructor; creates an invalid polygon segment
std::ostream & operator<<(std::ostream &stream, const frechet::data::Interval &ival)
operator for printing debug info to a std::ostream
static bool is_edge(int a, int b, int n)
static const int SOUTH_POLE_INDEX
artifical vertex used by Triangulation
QPolygonF Curve
a polygonal curve in the plane; with double floating point precision. This type is heavily used throu...
bool is_diagonal(int n) const
std::list< Polygon > Partition
a partitioning of a polygon, that is a list of sub-sets
double min(double a, double b)
minimum function with checks for NAN
QLineF map(const Curve &curve) const
map (embed) segment to a line in the plane
static QPointF map(const Curve &curve, int i)
map a polygon vertex to a point in the plane
std::vector< int > Polygon
Polygon a sub-set of vertex indexes.
double max(double a, double b)
maximum function with checks for NAN