DGtal 2.1.0
Loading...
Searching...
No Matches
DGtal::detail::AffineGeometryScalarOperations< float > Struct Reference

Aim: Internal class used by AffineGeometry to differentiate operations on lattice points and operations on points with floating-point coordinates. This specialization assume float for coordinates. More...

#include <DGtal/geometry/tools/AffineGeometry.h>

Static Public Member Functions

static std::pair< float, float > getMultipliers (float a, float b)
 
static float gcd (float, float)
 
static float lcmPositive (float, float)
 
static bool isNonZero (float x, double tol)
 

Friends

template<typename T >
struct DGtal::AffineGeometry
 
template<typename T >
struct DGtal::AffineBasis
 

Detailed Description

Aim: Internal class used by AffineGeometry to differentiate operations on lattice points and operations on points with floating-point coordinates. This specialization assume float for coordinates.

Description of template class 'AffineGeometryScalarOperations'

Definition at line 323 of file AffineGeometry.h.

Member Function Documentation

◆ gcd()

static float DGtal::detail::AffineGeometryScalarOperations< float >::gcd ( float  ,
float   
)
inlinestatic
Returns
1.0f

Definition at line 343 of file AffineGeometry.h.

344 {
345 return 1.0f;
346 }

◆ getMultipliers()

static std::pair< float, float > DGtal::detail::AffineGeometryScalarOperations< float >::getMultipliers ( float  a,
float  b 
)
inlinestatic
Parameters
[in]aany number
[in]bany number
Returns
the pair ( b, a ), which allows to cancel a component in a Gauss pivoting algorithm.

Definition at line 334 of file AffineGeometry.h.

335 {
336 return (b >= 0 )
337 ? std::make_pair( b, a )
338 : std::make_pair( -b, -a );
339 }
STL namespace.

◆ isNonZero()

static bool DGtal::detail::AffineGeometryScalarOperations< float >::isNonZero ( float  x,
double  tol 
)
inlinestatic
Parameters
[in]xany number
[in]tolthe accepted tolerance value below which the number is considered null (typically 1e-12).
Returns
'true' iff x is non zero.

Definition at line 363 of file AffineGeometry.h.

364 {
365 const double dx = double(x);
366 return (dx > tol) || ( dx < -tol );
367 }

◆ lcmPositive()

static float DGtal::detail::AffineGeometryScalarOperations< float >::lcmPositive ( float  ,
float   
)
inlinestatic
Returns
1.0f

Definition at line 350 of file AffineGeometry.h.

351 {
352 return 1.0f;
353 }

Friends And Related Symbol Documentation

◆ DGtal::AffineBasis

template<typename T >
friend struct DGtal::AffineBasis
friend

Definition at line 326 of file AffineGeometry.h.

◆ DGtal::AffineGeometry

template<typename T >
friend struct DGtal::AffineGeometry
friend

Definition at line 325 of file AffineGeometry.h.


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