29#if defined(DSLSubsegment_RECURSES)
30#error Recursive header files inclusion detected in DSLSubsegment.h
33#define DSLSubsegment_RECURSES
35#if !defined DSLSubsegment_h
37#define DSLSubsegment_h
44#include "DGtal/base/Common.h"
47#include "DGtal/arithmetic/IntegerComputer.h"
74 template <
typename TInteger,
typename TNumber>
732#include "DSLSubsegment.ih"
740#undef DSLSubsegment_RECURSES
RayC(const Integer p, const Integer q, const Integer r, const Integer slope)
RayC(const Integer x0, const Integer y0)
Aim: Given a Digital Straight line and two endpoints A and B on this line, compute the minimal charac...
void update(Vector &u, Point &A, Number s, Vector *v)
Integer slope(Integer p, Integer q, Integer r, Number alpha, Number beta)
Integer smartFirstDichotomy(Integer fp, Integer fq, Integer gp, Integer gq, Number alpha, Number beta, Integer n, bool *flagRayFound)
Integer smartFirstDichotomy(Integer fp, Integer fq, Integer gp, Integer gq, Number a, Number b, Number mu, Integer n, bool *flagRayFound)
DGtal::PointVector< 2, Number > VectorF
void shortFindSolution(Integer fp, Integer fq, Integer gp, Integer gq, RayC r, Integer n, Integer *resAlphaP, Integer *resAlphaQ, Integer *resBetaP)
void DSLSubsegmentLocalCH(Number a, Number b, Number mu, Point &A, Point &B)
RayC raySup(Integer fp, Integer fq, RayC r)
DSLSubsegment(Number alpha, Number beta, Point &A, Point &B, Number precision=1e-10)
Integer intersection(Point &P, Vector &v, Number s)
void convexHullApprox(Vector &l, Integer r, Integer n, Point *inf, Point *sup)
DGtal::PointVector< 2, Integer > Vector
void lowerConvexHull(Vector &l, Integer mu, Point &A, Point &B, Point *prevInfL, Point *infL, Point *infR, Point *prevInfR)
Position positionWrtRay(RayC &r, Number alpha, Number beta)
RayC rayOfHighestSlope(Integer p, Integer q, Integer r, Integer smallestSlope, Integer n)
Integer intersection(Point &P, Vector &v, Vector &aL, Integer r)
void convexHullHarPeled(Vector &l, Integer n, Point *inf, Point *sup)
BOOST_CONCEPT_ASSERT((concepts::CInteger< Integer >))
Integer intersectionVertical(Point &P, Vector &v, Integer n)
RayC localizeRay(Integer fp, Integer fq, Integer gp, Integer gq, Integer r, Number a, Number b, Number mu, Integer n)
DGtal::PointVector< 2, Integer > Point
void DSLSubsegmentFareyFan(Number a, Number b, Number mu, Point &A, Point &B)
Integer computeMaxRemainder(Number a, Number b, Number mu, Point A, Point B)
long double LongDoubleType
void convexHullApproxTwoPoints(Vector &l, Integer r, Integer n, Point *inf, Point *sup, Point *prevInf, Point *prevSup, bool inv)
RayC localizeRay(Integer fp, Integer fq, Integer gp, Integer gq, Integer r, Number alpha, Number beta, Integer n)
RayC smartRayOfSmallestSlope(Integer fp, Integer fq, Integer gp, Integer gq, Integer r)
DGtal::PointVector< 2, Integer > Ray
Point nextTermInFareySeriesEuclid(Integer fp, Integer fq, Integer n)
void selfDisplay(std::ostream &out) const
Position positionWrtRay(RayC &r, Number a, Number b, Number mu)
void convexHullApprox(Number s, Integer n, Point *inf, Point *sup)
void findSolutionWithoutFractions(Integer fp, Integer fq, Integer gp, Integer gq, RayC r, Integer n, Integer *resAlphaP, Integer *resAlphaQ, Integer *resBetaP, bool found)
void update(Vector &u, Point &A, Vector &l, Integer r, Vector *v)
Integer computeMinRemainder(Number a, Number b, Number mu, Point A, Point B)
Integer slope(Integer p, Integer q, Integer r, Number a, Number b, Number mu)
DGtal::PointVector< 2, Number > PointF
BOOST_CONCEPT_ASSERT((concepts::CEuclideanRing< Number >))
DSLSubsegment(Number a, Number b, Number mu, Point &A, Point &B, std::string type)
Aim: Implements basic operations that will be used in Point and Vector classes.
DGtal is the top-level namespace which contains all DGtal functions and types.
auto inf(PointVector< ptDim, LeftEuclideanRing, LeftContainer > const &lhs, PointVector< ptDim, RightEuclideanRing, RightContainer > const &rhs) -> decltype(DGtal::constructFromArithmeticConversion(lhs, rhs))
Implements the infimum (or greatest lower bound).
auto sup(PointVector< ptDim, LeftEuclideanRing, LeftContainer > const &lhs, PointVector< ptDim, RightEuclideanRing, RightContainer > const &rhs) -> decltype(DGtal::constructFromArithmeticConversion(lhs, rhs))
Implements the supremum (or least upper bound).
Aim: Defines the mathematical concept equivalent to a unitary commutative ring with a division operat...
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...