DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Static Public Member Functions
DGtal::ArithmeticalDSS< TIterator, TInteger, connectivity >::Tools< TInt, c > Struct Template Reference

Static Public Member Functions

static TInt norm (const TInt &a, const TInt &b)
static TInt dualNorm (const TInt &a, const TInt &b)

Detailed Description

template<typename TIterator, typename TInteger = typename IteratorCirculatorTraits<TIterator>::Value::Coordinate, int connectivity = 8>
template<typename TInt, int c>
struct DGtal::ArithmeticalDSS< TIterator, TInteger, connectivity >::Tools< TInt, c >

Definition at line 128 of file ArithmeticalDSS.h.


Member Function Documentation

template<typename TIterator, typename TInteger = typename IteratorCirculatorTraits<TIterator>::Value::Coordinate, int connectivity = 8>
template<typename TInt , int c>
static TInt DGtal::ArithmeticalDSS< TIterator, TInteger, connectivity >::Tools< TInt, c >::dualNorm ( const TInt &  a,
const TInt &  b 
)
inlinestatic

Definition at line 140 of file ArithmeticalDSS.h.

{
if (a > 0) {
if (b > 0) {
return (a+b);
} else {
return (a-b);
}
} else {
if (b > 0) {
return (-a+b);
} else {
return (-a-b);
}
}
}
template<typename TIterator, typename TInteger = typename IteratorCirculatorTraits<TIterator>::Value::Coordinate, int connectivity = 8>
template<typename TInt , int c>
static TInt DGtal::ArithmeticalDSS< TIterator, TInteger, connectivity >::Tools< TInt, c >::norm ( const TInt &  a,
const TInt &  b 
)
inlinestatic

Definition at line 130 of file ArithmeticalDSS.h.

{
TInt x;
if (a>=0) x = a;
else x = -a;
TInt y;
if (b>=0) y = b;
else y = -b;
return (x>=y)?x:y;
}

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