DGtal  1.3.beta
Public Member Functions
DGtal::functors::LargeTruncationFunctor< Integer > Struct Template Reference

Binary functor that returns the algebraic quotient i of a/b with any fractional part discarded (truncation toward zero).
Note that \( |i| \leq |a/b| \). More...

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

Public Member Functions

Integer operator() (const Integer &a, const Integer &b) const
 

Detailed Description

template<typename Integer>
struct DGtal::functors::LargeTruncationFunctor< Integer >

Binary functor that returns the algebraic quotient i of a/b with any fractional part discarded (truncation toward zero).
Note that \( |i| \leq |a/b| \).

(For a truncation toward negative infinity, see IntegerComputer::floorDiv)

Template Parameters
Integera model of integer used to store a and b

Definition at line 101 of file ArithmeticalDSSConvexHull.h.

Member Function Documentation

◆ operator()()

template<typename Integer >
Integer DGtal::functors::LargeTruncationFunctor< Integer >::operator() ( const Integer a,
const Integer b 
) const
inline
Returns
quotient a/b with any fractional part discarded
Parameters
anumerator
bdenominator
Precondition
b is not null

Definition at line 112 of file ArithmeticalDSSConvexHull.h.

113  {
114  ASSERT( b != NumberTraits<Integer>::ZERO );
115  return a / b;
116  }

The documentation for this struct was generated from the following file:
DGtal::NumberTraitsImpl< std::decay< Integer >::type >::ZERO
static const std::decay< Integer >::type ZERO
Constant Zero.
Definition: NumberTraits.h:100