DGtal  1.1.0
DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency > Class Template Reference

Aim: This class represents a naive (resp. standard) digital straight segment (DSS), ie. the sequence of simply 8- (resp. 4-)connected digital points contained in a naive (resp. standard) digital straight line (DSL) between two points of it. More...

#include <DGtal/geometry/curves/ArithmeticalDSS.h>

Inheritance diagram for DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >:
[legend]
Collaboration diagram for DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >:
[legend]

## Public Types

typedef TCoordinate Coordinate

typedef TInteger Integer

typedef ArithmeticalDSL< Coordinate, Integer, adjacency > DSL

typedef DSL::Space Space

typedef DSL::Point Point

typedef DSL::Vector Vector

typedef DSL::Steps Steps

typedef Coordinate Position

typedef DSL::ConstIterator ConstIterator

typedef DSL::ConstReverseIterator ConstReverseIterator

typedef DGtal::PointVector< 2, double > PointD

## Public Member Functions

BOOST_CONCEPT_ASSERT ((concepts::CInteger< Coordinate >))

BOOST_CONCEPT_ASSERT ((concepts::CInteger< Integer >))

ArithmeticalDSS (const Point &aPoint)

ArithmeticalDSS (const Coordinate &aA, const Coordinate &aB, const Integer &aLowerBound, const Integer &aUpperBound, const Point &aF, const Point &aL, const Point &aUf, const Point &aUl, const Point &aLf, const Point &aLl, const Steps &aSteps, const Vector &aShift)

ArithmeticalDSS (const DSL &aDSL, const Point &aF, const Point &aL, const Point &aUf, const Point &aUl, const Point &aLf, const Point &aLl)

ArithmeticalDSS (const Coordinate &aA, const Coordinate &aB, const Point &aF, const Point &aL, const Point &aUf, const Point &aUl, const Point &aLf, const Point &aLl)

ArithmeticalDSS (const Point &aF, const Point &aL, const bool &areOnTheUpperLine=true)

ArithmeticalDSS (const DSL &aDSL, const Point &aF, const Point &aL)

ArithmeticalDSS (const ArithmeticalDSS &aDSS, const Point &aF, const Point &aL)

template<typename Iterator >
ArithmeticalDSS (const Iterator &aItb, const Iterator &aIte)

ArithmeticalDSS (const ArithmeticalDSS &aOther)

ArithmeticalDSSoperator= (const ArithmeticalDSS &aOther)

ArithmeticalDSS negate () const

bool equalsTo (const ArithmeticalDSS &aOther) const

bool operator== (const ArithmeticalDSS &aOther) const

bool operator!= (const ArithmeticalDSS &aOther) const

~ArithmeticalDSS ()

void selfDisplay (std::ostream &out) const

bool isValid () const

const DSLdsl () const

Coordinate a () const

Coordinate b () const

Integer mu () const

Integer omega () const

Vector shift () const

Steps steps () const

Point back () const

Point front () const

Point Uf () const

Point Ul () const

Point Lf () const

Point Ll () const

Integer remainder (const Point &aPoint) const

Integer orthogonalPosition (const Point &aPoint) const

Position position (const Point &aPoint) const

bool before (const Point &aP1, const Point &aP2) const

bool beforeOrEqual (const Point &aP1, const Point &aP2) const

bool isInDSL (const Point &aPoint) const

bool isInDSS (const Point &aPoint) const

bool operator() (const Point &aPoint) const

bool isInDSL (const DSL &aDSL) const

bool isInDSL (const DSL &aDSL, std::vector< Point > &Ulp, std::vector< Point > &Llp, Point &outP) const

ArithmeticalDSS computeUnion (const ArithmeticalDSS &aOther) const

ConstIterator begin () const

ConstIterator end () const

ConstReverseIterator rbegin () const

ConstReverseIterator rend () const

unsigned short int isExtendableFront (const Point &aNewPoint) const

unsigned short int isExtendableBack (const Point &aNewPoint) const

bool extendFront (const Point &aNewPoint)

bool extendBack (const Point &aNewPoint)

bool retractFront ()

bool retractBack ()

PointD project (const Point &aM, double aR) const

PointD project (const Point &aM, const Point &aP) const

std::string className () const

## Protected Member Functions

bool retractUpdateLeaningPoints (const Vector &aDirection, const Point &aFirst, const Point &aLast, const Point &aBezout, const Point &aFirstAtOppositeSide, Point &aLastAtOppositeSide, Point &aFirstAtRemovalSide, const Point &aLastAtRemovalSide)

void retractUpdateParameters (const Vector &aNewDirection)

Point myF

Point myL

Point myUf

Point myUl

Point myLf

Point myLl

DSL myDSL

## Friends

class ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency >

## Detailed Description

### template<typename TCoordinate, typename TInteger = TCoordinate, unsigned short adjacency = 8> class DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >

Aim: This class represents a naive (resp. standard) digital straight segment (DSS), ie. the sequence of simply 8- (resp. 4-)connected digital points contained in a naive (resp. standard) digital straight line (DSL) between two points of it.

Obviously, a given DSS belongs to infinitely many DSLs, but one of them has minimal parameters, ie has a minimal $$\omega$$. ArithmeticalDSS uses this minimal bounding DSL to represent its slope and its intercept.
ArithmeticalDSS stores as data members not only this minimal bounding DSL, but also its ending points as well as the first and last lower and upper leaning points, due to the role that these points play in the update algorithms. Indeed, ArithmeticalDSS provides some methods to update its internal representation:

See Digital straight lines and segments for further details. See also NaiveDSS8 and StandardDSS4, which are aliases of this class.

Template Parameters
 TCoordinate a model of integer for the DGtal point coordinates and the slope parameters. TInteger a model of integer for the intercepts and the remainders that represents a larger range of integers than TCoordinate.

This class is a model of CPointFunctor and of CConstBidirectionalRange.

ArithmeticalDSL NaiveDSL StandardDSL
exampleArithmeticalDSL.cpp exampleArithmeticalDSS.cpp

Definition at line 95 of file ArithmeticalDSS.h.

## ◆ ConstIterator

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 typedef DSL::ConstIterator DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::ConstIterator

Type of iterator.

Definition at line 148 of file ArithmeticalDSS.h.

## ◆ ConstReverseIterator

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 typedef DSL::ConstReverseIterator DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::ConstReverseIterator

Type of reverse iterator.

Definition at line 152 of file ArithmeticalDSS.h.

## ◆ Coordinate

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 typedef TCoordinate DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::Coordinate

Type used for the points coordinates and the slope parameters.

Definition at line 113 of file ArithmeticalDSS.h.

## ◆ DSL

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 typedef ArithmeticalDSL DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::DSL

Type of the bounding DSL.

Definition at line 124 of file ArithmeticalDSS.h.

## ◆ Integer

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 typedef TInteger DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::Integer

Type used for the intercepts and the remainders.

Definition at line 118 of file ArithmeticalDSS.h.

## ◆ Point

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 typedef DSL::Point DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::Point

Type of point.

Definition at line 132 of file ArithmeticalDSS.h.

## ◆ PointD

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 typedef DGtal::PointVector<2, double> DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::PointD

Type of embedded points

project

Definition at line 158 of file ArithmeticalDSS.h.

## ◆ Position

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 typedef Coordinate DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::Position

Type used for the position of a point in the DSL.

Definition at line 144 of file ArithmeticalDSS.h.

## ◆ Space

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 typedef DSL::Space DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::Space

Type of digital space.

Definition at line 128 of file ArithmeticalDSS.h.

## ◆ Steps

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 typedef DSL::Steps DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::Steps

Type of steps (defined as a STL pair of vectors).

Definition at line 140 of file ArithmeticalDSS.h.

## ◆ Vector

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 typedef DSL::Vector DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::Vector

Type of vector.

Definition at line 136 of file ArithmeticalDSS.h.

## ◆ ArithmeticalDSS() [1/9]

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::ArithmeticalDSS ( const Point & aPoint )

Simple constructor. All members of the bounding DSL are set to zero and all point members are set to aPoint

## ◆ ArithmeticalDSS() [2/9]

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::ArithmeticalDSS ( const Coordinate & aA, const Coordinate & aB, const Integer & aLowerBound, const Integer & aUpperBound, const Point & aF, const Point & aL, const Point & aUf, const Point & aUl, const Point & aLf, const Point & aLl, const Steps & aSteps, const Vector & aShift )

Constructor. The user gives all the (redondant) parameters and should be sure that the resulting DSS is valid.

isValid
Parameters
 aA y-component of the direction vector aB x-component of the direction vector aLowerBound lower intercept aUpperBound upper intercept aF the first point aL the last point aUf the first upper point aUl the last upper point aLf the first lower point aLl the last lower point aSteps pair of steps used to iterate over the DSS points aShift shift vector

## ◆ ArithmeticalDSS() [3/9]

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::ArithmeticalDSS ( const DSL & aDSL, const Point & aF, const Point & aL, const Point & aUf, const Point & aUl, const Point & aLf, const Point & aLl )

Constructor. The user gives all the (redondant) parameters and should be sure that the resulting DSS is valid.

isValid
Parameters
 aDSL bounding DSL aF the first point aL the last point aUf the first upper point aUl the last upper point aLf the first lower point aLl the last lower point

## ◆ ArithmeticalDSS() [4/9]

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::ArithmeticalDSS ( const Coordinate & aA, const Coordinate & aB, const Point & aF, const Point & aL, const Point & aUf, const Point & aUl, const Point & aLf, const Point & aLl )

Constructor. Minimal set of parameters to build the DSS in constant time. The user should be sure that the slope is consistent with the position of the leaning points.

isValid
Parameters
 aA y-component of the direction vector aB x-component of the direction vector aF the first point aL the last point aUf the first upper point aUl the last upper point aLf the first lower point aLl the last lower point

NB: in O(1)

## ◆ ArithmeticalDSS() [5/9]

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::ArithmeticalDSS ( const Point & aF, const Point & aL, const bool & areOnTheUpperLine = true )

Construction of a sequence of patterns (or reversed patterns) from two end points.

Parameters
 aF the first point aL the last point areOnTheUpperLine boolean equal to 'true' if the two given end points are upper leaning points (pattern case, default), 'false' if they are lower leaning points (reversed pattern case).

NB: logarithmic-time in the greatest component of the vector starting from aF and pointing to aL

## ◆ ArithmeticalDSS() [6/9]

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::ArithmeticalDSS ( const DSL & aDSL, const Point & aF, const Point & aL )

Construction as the subsegment of minimal parameters of a given DSL.

Parameters
 aDSL bounding DSL aF first point of the subsegment aL last point of the subsegment

NB: logarithmic-time in the greatest component of the direction vector of the subsegment. Uses smartCH algorithm (see Roussillon 2014 ).

ArithmeticalDSSFactory

## ◆ ArithmeticalDSS() [7/9]

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::ArithmeticalDSS ( const ArithmeticalDSS< TCoordinate, TInteger, adjacency > & aDSS, const Point & aF, const Point & aL )

Construction as the subsegment of minimal parameters of a greater DSS.

Parameters
 aDSS bounding DSS aF first point of the subsegment aL last point of the subsegment

NB: logarithmic-time in the greatest component of the direction vector of the subsegment. Uses reversedSmartCH algorithm (see Roussillon 2014 ).

ArithmeticalDSSFactory

## ◆ ArithmeticalDSS() [8/9]

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
template<typename Iterator >
 DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::ArithmeticalDSS ( const Iterator & aItb, const Iterator & aIte )

Construction from a range of iterator on points.

Parameters
 aItb begin iterator aIte end iterator
Template Parameters
 Iterator a model of forward iterator

NB: linear-time in the size of the range

## ◆ ArithmeticalDSS() [9/9]

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::ArithmeticalDSS ( const ArithmeticalDSS< TCoordinate, TInteger, adjacency > & aOther )

Copy constructor.

Parameters
 aOther the object to clone.

## ◆ ~ArithmeticalDSS()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::~ArithmeticalDSS ( )

Destructor.

## ◆ a()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Coordinate DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::a ( ) const
Returns
a parameter of the bounding DSL of minimal parameters

## ◆ b()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Coordinate DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::b ( ) const
Returns
b parameter of the bounding DSL of minimal parameters

## ◆ back()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Point DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::back ( ) const
Returns
back point of the DSS, ie. first visited point equal to * ArithmeticalDSS::begin()

## ◆ before()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 bool DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::before ( const Point & aP1, const Point & aP2 ) const

Returns a boolean equal to 'true' if aP1 is located (strictly) before aP2 in the direction orthogonal to myShift, 'false' otherwise.

Parameters
 aP1 any point aP2 any point
Returns
'true' is aP2 is strictly before aP2, 'false' otherwise
beforeOrEqual position

## ◆ beforeOrEqual()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 bool DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::beforeOrEqual ( const Point & aP1, const Point & aP2 ) const

Returns a boolean equal to 'true' if aP1 is located before aP2 or is equal to aP2, 'false' otherwise.

Parameters
 aP1 any point aP2 any point
Returns
'true' is aP2 is before or equal to aP2, 'false' otherwise
before position

## ◆ begin()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 ConstIterator DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::begin ( ) const
Returns
begin iterator, which points to the point returned by ArithmeticalDSS::back()

## ◆ BOOST_CONCEPT_ASSERT() [1/2]

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::BOOST_CONCEPT_ASSERT ( (concepts::CInteger< Coordinate >) )

## ◆ BOOST_CONCEPT_ASSERT() [2/2]

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::BOOST_CONCEPT_ASSERT ( (concepts::CInteger< Integer >) )

## ◆ className()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 std::string DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::className ( ) const
Returns
the style name used for drawing this object.

## ◆ computeUnion()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 ArithmeticalDSS DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::computeUnion ( const ArithmeticalDSS< TCoordinate, TInteger, adjacency > & aOther ) const

Compute the union of two DSSs. If the union belongs to a DSL, returns the DSS of minimal characteristics that includes the two DSSs. Otherwise, returns the void DSS (DSS(Point(0,0)). See Sivignon 2014 ).

Parameters
 aOther a DSS
Returns
a DSS

nb: runs in O(1) when: 1) the union of the two DSSs is not part of a DSL, 2) the two DSSs are connected, 3) the last point of the first DSS and the first point of the second DSS have the same ordinate (or abscissa). Otherwise, runs in O(log(n)) where n is the total length of the union.

## ◆ dsl()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 const DSL& DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::dsl ( ) const
Returns
the bounding DSL of minimal parameters NB: since we return a const reference, you must copy the result, if you want to keep it beyond the object's existence.

## ◆ end()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 ConstIterator DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::end ( ) const
Returns
end iterator, which points after the point returned by ArithmeticalDSS::front()

## ◆ equalsTo()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 bool DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::equalsTo ( const ArithmeticalDSS< TCoordinate, TInteger, adjacency > & aOther ) const

Equality.

Parameters
 aOther the object to compare with.
Returns
'true' if all the members of the two objects are equal, 'false' otherwise

## ◆ extendBack()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 bool DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::extendBack ( const Point & aNewPoint )

Tests whether the union between a point, which is located at the back of the DSS, and the DSS is still a DSS. Computes the parameters of the new DSS with the adding point if true.

Parameters
Returns
'true' if the union is a DSS, 'false' otherwise.
isExtendableBack extendFront

## ◆ extendFront()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 bool DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::extendFront ( const Point & aNewPoint )

Tests whether the union between a point, which is located at the front of the DSS, and the DSS is still a DSS. Computes the parameters of the new DSS with the adding point if true.

Parameters
Returns
'true' if the union is a DSS, 'false' otherwise.
isExtendableFront extendBack

## ◆ front()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Point DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::front ( ) const
Returns
front point of the DSS, ie. last visited point equal to * - - ArithmeticalDSS::end()

## ◆ isExtendableBack()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 unsigned short int DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::isExtendableBack ( const Point & aNewPoint ) const

Tests whether the union between a new point, which is located at the back of the DSS, and the DSS is still a DSS.

Parameters
 aNewPoint the point to test
Returns
an integer equal to 0 if the union between aNewPoint and the segment is not a DSS, but strictly greater than 0 otherwise. The value gives the way of updating the members of the DSS: 1: initialization of the first step 2: repetition of the first step 3: initialization of the second step on the left 4: initialization of the second step on the right 5: weakly interior on the left 6: weakly interior on the right 7: weakly exterior on the left 8: weakly exterior on the right 9: strongly interior, nothing to update
extend isExtendableFront

## ◆ isExtendableFront()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 unsigned short int DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::isExtendableFront ( const Point & aNewPoint ) const

Tests whether the union between a new point, which is located at the front of the DSS, and the DSS is still a DSS.

Parameters
 aNewPoint a point to test
Returns
an integer equal to 0 if the union between aNewPoint and the segment is not a DSS, but strictly greater than 0 otherwise. The value gives the way of updating the members of the DSS: 1: initialization of the first step 2: repetition of the first step 3: initialization of the second step on the left 4: initialization of the second step on the right 5: weakly interior on the left 6: weakly interior on the right 7: weakly exterior on the left 8: weakly exterior on the right 9: strongly interior, nothing to update
extend isExtendableBack

## ◆ isInDSL() [1/3]

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 bool DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::isInDSL ( const DSL & aDSL ) const

Returns a boolean equal to true if 'this' belongs to the DSL aDSL, false otherwise.

Returns
'true' if 'this' belongs to the DSL aDSL. 'false' otherwise.
Parameters

## ◆ isInDSL() [2/3]

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 bool DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::isInDSL ( const DSL & aDSL, std::vector< Point > & Ulp, std::vector< Point > & Llp, Point & outP ) const

Returns a boolean equal to true if 'this' belongs to the DSL aDSL, false otherwise. Also returns extra information about the leaning points included in 'this' or a point outside aDSL.

Parameters
 [in] aDSL any DSL [in,out] Ulp the list of aDSL upper leaning points on 'this', if any [in,out] Llp the list of aDSL lower leaning points on 'this', if any [in,out] outP a point of 'this' that does not belong to aDSL, if any
Returns
'true' if 'this' belongs to the DSL aDSL. 'false' otherwise.

## ◆ isInDSL() [3/3]

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 bool DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::isInDSL ( const Point & aPoint ) const
Returns
'true' if aPoint is in the DSL of minimal parameters containing this segment, 'false' otherwise.
Parameters
 aPoint any point

## ◆ isInDSS()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 bool DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::isInDSS ( const Point & aPoint ) const
Returns
'true' if aPoint is in the DSS 'false' otherwise.
Parameters
 aPoint any point

## ◆ isValid()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 bool DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.

NB: in O( log( max( |myA |,| myB | ) ) )

## ◆ Lf()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Point DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::Lf ( ) const
Returns
first lower leaning point of the DSS

## ◆ Ll()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Point DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::Ll ( ) const
Returns
last lower leaning point of the DSS

## ◆ mu()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Integer DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::mu ( ) const
Returns
mu parameter, the intercept of the bounding DSL of minimal parameters

## ◆ negate()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 ArithmeticalDSS DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::negate ( ) const

Returns a copy of '*this' with a reverse orientation, ie. with parameters -myA , -myB , -myUpperBound , -myLowerBound and swapped leaning points.

Returns
the negation of '*this'.

## ◆ omega()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Integer DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::omega ( ) const
Returns
omega parameter, the thickness of the bounding DSL of minimal parameters

## ◆ operator!=()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 bool DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::operator!= ( const ArithmeticalDSS< TCoordinate, TInteger, adjacency > & aOther ) const

Difference.

Parameters
 aOther the object to compare with.
Returns
'true' the two set of points that are implicitly defined are different, 'false' otherwise

## ◆ operator()()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 bool DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::operator() ( const Point & aPoint ) const

## ◆ operator=()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 ArithmeticalDSS& DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::operator= ( const ArithmeticalDSS< TCoordinate, TInteger, adjacency > & aOther )

Assignment.

Parameters
 aOther the object to copy.
Returns
a reference on 'this'.

## ◆ operator==()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 bool DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::operator== ( const ArithmeticalDSS< TCoordinate, TInteger, adjacency > & aOther ) const

Equality.

Parameters
 aOther the object to compare with.
Returns
'true' the two sets of points that are implicitly defined are equal (without respect to the orientation), 'false' otherwise

## ◆ orthogonalPosition()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Integer DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::orthogonalPosition ( const Point & aPoint ) const

Returns the position of aPoint (which does not necessarily belong to the DSS) computed along the direction that is orthogonal to the direction vector

Parameters
 aPoint the point whose position is returned
Returns
the position

## ◆ position()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Position DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::position ( const Point & aPoint ) const

Returns the position of aPoint (which does not necessarily belong to the DSS) computed along the direction given by myShift

Parameters
 aPoint the point whose position is returned
Returns
the position

## ◆ project() [1/2]

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 PointD DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::project ( const Point & aM, const Point & aP ) const

Projects the point aM onto the straight line going through point aP.

Parameters
 aM any point (may not be part of the DSS). aP any point (may not be part of the DSS).
Returns
the projected point.

## ◆ project() [2/2]

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 PointD DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::project ( const Point & aM, double aR ) const

Projects the point aM onto the straight line whose points have remainder aR.

Parameters
 aM any point (may not be part of the DSS). aR the remainder (may not be an integer).
Returns
the projected point.

## ◆ rbegin()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 ConstReverseIterator DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::rbegin ( ) const
Returns
begin reverse iterator, which points to the point returned by ArithmeticalDSS::front()

## ◆ remainder()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Integer DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::remainder ( const Point & aPoint ) const

Returns the remainder of aPoint (which does not necessarily belong to the DSS)

Returns
remainder of aPoint
Parameters
 aPoint any point

## ◆ rend()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 ConstReverseIterator DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::rend ( ) const
Returns
end iterator, which points before the point returned by ArithmeticalDSS::back()

## ◆ retractBack()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 bool DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::retractBack ( )

Removes the back point of the DSS if it remains strictly more than one point

Returns
'true' if the retraction has been done, 'false' otherwise
retract

## ◆ retractFront()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 bool DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::retractFront ( )

Removes the front point of the DSS if it remains strictly more than one point

Returns
'true' if the retraction has been done, 'false' otherwise
retract

## ◆ retractUpdateLeaningPoints()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 bool DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::retractUpdateLeaningPoints ( const Vector & aDirection, const Point & aFirst, const Point & aLast, const Point & aBezout, const Point & aFirstAtOppositeSide, Point & aLastAtOppositeSide, Point & aFirstAtRemovalSide, const Point & aLastAtRemovalSide )
protected

Updates the leaning points of the DSS if the end point is a leaning point that has to be removed from the DSS.

Parameters
 aDirection direction vector aFirst new end of the DSS aLast opposite end of the DSS aBezout weakly exterior point used to compute the new slope and to update the leaning points aFirstAtOppositeSide first leaning point located at the side that is not affected by the removal aLastAtOppositeSide last leaning point located at the side that is not affected by the removal but that has to be updated aFirstAtRemovalSide first leaning point that is removed and has to be updated. aLastAtRemovalSide last leaning point located on the same side than aFirstAtRemovalSide
Returns
'true' is the slope has to be updated, 'false' otherwise
retractFront retractBack

## ◆ retractUpdateParameters()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 void DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::retractUpdateParameters ( const Vector & aNewDirection )
protected

Updates the parameters of the bounding DSL after the retraction.

Parameters
 aNewDirection direction vector
retractFront retractBack

## ◆ selfDisplay()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 void DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::selfDisplay ( std::ostream & out ) const

Writes/Displays the object on an output stream.

Parameters
 out the output stream where the object is written.

## ◆ shift()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Vector DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::shift ( ) const
Returns
the shift vector

## ◆ steps()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Steps DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::steps ( ) const
Returns
the couple of vectors used to iterate over the DSS point.

## ◆ Uf()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Point DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::Uf ( ) const
Returns
first upper leaning point of the DSS

## ◆ Ul()

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Point DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::Ul ( ) const
Returns
last upper leaning point of the DSS

## ◆ ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency >

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 friend class ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency >
friend

Definition at line 793 of file ArithmeticalDSS.h.

## Field Documentation

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
static

Definition at line 104 of file ArithmeticalDSS.h.

## ◆ myDSL

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 DSL DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::myDSL
protected

Bounding DSL of minimal parameters

Definition at line 781 of file ArithmeticalDSS.h.

## ◆ myF

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Point DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::myF
protected

First point

Definition at line 755 of file ArithmeticalDSS.h.

## ◆ myL

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Point DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::myL
protected

Last point

Definition at line 759 of file ArithmeticalDSS.h.

## ◆ myLf

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Point DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::myLf
protected

First lower leaning point ( of remainder myMu + myOmega - 1 )

Definition at line 771 of file ArithmeticalDSS.h.

## ◆ myLl

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Point DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::myLl
protected

Last lower leaning point ( of remainder myMu + myOmega - 1 )

Definition at line 775 of file ArithmeticalDSS.h.

## ◆ myUf

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Point DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::myUf
protected

First upper leaning point ( of remainder myMu )

Definition at line 763 of file ArithmeticalDSS.h.

## ◆ myUl

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
 Point DGtal::ArithmeticalDSS< TCoordinate, TInteger, adjacency >::myUl
protected

Last upper leaning point ( of remainder myMu )

Definition at line 767 of file ArithmeticalDSS.h.

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