DGtal 2.0.0
Loading...
Searching...
No Matches
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 {
115 return a / b;
116 }
Binary functor that returns the algebraic quotient i of a/b with any fractional part discarded (trunc...

References DGtal::NumberTraitsImpl< std::decay< T >::type >::ZERO.


The documentation for this struct was generated from the following file: