31 #if defined(ArithmeticalDSSConvexHull_RECURSES)
32 #error Recursive header files inclusion detected in ArithmeticalDSSConvexHull.h
35 #define ArithmeticalDSSConvexHull_RECURSES
37 #if !defined ArithmeticalDSSConvexHull_h
39 #define ArithmeticalDSSConvexHull_h
44 #include "DGtal/base/Common.h"
62 template <
typename Vector,
typename TPosition>
82 template <
typename Po
intVector>
86 return ( -
myShift[1] * aPointVector[0]
87 +
myShift[0] * aPointVector[1] );
100 template <
typename Integer>
129 template <
typename Integer>
162 namespace functions {
193 template<
typename Position,
typename Coordinate,
typename PointVector,
194 typename OutputIterator,
195 typename PositionFunctor,
196 typename TruncationFunctor1,
typename TruncationFunctor2>
200 const Coordinate& remainderBound,
204 const Coordinate& rY,
208 const PositionFunctor& pos,
209 const TruncationFunctor1& f1,
210 const TruncationFunctor2& f2);
239 template<
typename PointVector,
typename Coordinate,
typename Position,
240 typename PositionFunctor,
typename OutputIterator>
244 const Coordinate& aRemainderBound,
245 const Position& aPositionBound,
247 const Coordinate& aRStep,
249 const Coordinate& aRShift,
250 const PositionFunctor& aPositionFunctor,
251 OutputIterator uIto, OutputIterator lIto);
270 template<
typename DSL,
typename OutputIterator>
274 const typename DSL::Position& aLength,
275 OutputIterator uIto, OutputIterator lIto);
307 typename OutputIterator,
308 typename TruncationFunctor1,
typename TruncationFunctor2,
309 typename PositionFunctor>
312 const Position& aFirstPosition,
const Position& aLastPosition,
314 const PositionFunctor& pos,
315 const TruncationFunctor1& f1,
316 const TruncationFunctor2& f2);
344 template<
typename Po
intVector,
typename Position,
typename PositionFunctor,
typename OutputIterator>
347 const Position& aFirstPosition,
const Position& aLastPosition,
348 const PositionFunctor& aPositionFunctor,
349 OutputIterator uIto, OutputIterator lIto);
370 template<
typename DSS,
typename OutputIterator>
373 const typename DSS::Position& aPositionBound,
374 OutputIterator uIto, OutputIterator lIto);
384 #include "DGtal/geometry/curves/ArithmeticalDSSConvexHull.ih"
391 #undef ArithmeticalDSSConvexHull_RECURSES
Aim: Implements basic operations that will be used in Point and Vector classes.
DigitalPlane::Point Vector
Point::Coordinate Integer
PointVector smartCH(const PointVector &aFirstPoint, const Coordinate &aRemainderBound, const Position &aPositionBound, const PointVector &aStep, const Coordinate &aRStep, const PointVector &aShift, const Coordinate &aRShift, const PositionFunctor &aPositionFunctor, OutputIterator uIto, OutputIterator lIto)
Procedure that computes the lower and upper left hull of a DSS of first point aFirstPoint,...
bool smartCHPreviousVertex(PointVector &X, const PointVector &Y, PointVector &V, const Position &aFirstPosition, const Position &aLastPosition, OutputIterator ito, const PositionFunctor &pos, const TruncationFunctor1 &f1, const TruncationFunctor2 &f2)
Procedure that computes the previous vertex of the left hull of a DSS of main direction vector V ,...
bool smartCHNextVertex(const Position &positionBound, const Coordinate &remainderBound, PointVector &X, Coordinate &rX, const PointVector &Y, const Coordinate &rY, PointVector &V, Coordinate &rV, OutputIterator ito, const PositionFunctor &pos, const TruncationFunctor1 &f1, const TruncationFunctor2 &f2)
Procedure that computes the next (lower or upper) vertex of the left hull of a DSS.
PointVector reversedSmartCH(PointVector U, PointVector L, PointVector V, const Position &aFirstPosition, const Position &aLastPosition, const PositionFunctor &aPositionFunctor, OutputIterator uIto, OutputIterator lIto)
Procedure that computes the lower and upper left hull of the left subsegment of a greater DSS charact...
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: The traits class for all models of Cinteger.
Binary functor that returns the algebraic quotient i of a/b with any fractional part discarded (trunc...
Integer operator()(const Integer &a, const Integer &b) const
Functor that returns the position of any point/vector with respect to a digital straight line of shif...
Vector myShift
shift vector
Position operator()(const PointVector &aPointVector) const
PositionFunctorFrom2DPoint(const Vector &aShift)
BinaryFunctor that computes the algebraic quotient i of a/b with any non zero fractional part discard...
Integer operator()(const Integer &a, const Integer &b) const