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>

Inheritance diagram for DGtal::detail::AffineGeometryScalarOperations< float >:
[legend]

Public Types

typedef float Scalar
typedef Scalar Integer
 In the generic class, the type scalar should be an integral type.

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 Typedef Documentation

◆ Integer

In the generic class, the type scalar should be an integral type.

Definition at line 209 of file AffineGeometry.h.

◆ Scalar

typedef float DGtal::detail::AffineGeometryScalarOperations< float >::Scalar

Definition at line 207 of file AffineGeometry.h.

Member Function Documentation

◆ gcd()

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()

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 }
Aim: Internal class used by AffineGeometry to differentiate operations on point coordinates,...

◆ isNonZero()

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()

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 }

◆ 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: