STK++ 0.9.13
STK::Arithmetic< Integer > Struct Reference

Specialization for Integer (long). More...

#include <STK_Integer.h>

Inheritance diagram for STK::Arithmetic< Integer >:
Inheritance graph

Static Public Member Functions

static Integer NA () throw ()
 Adding a Non Available (NA) special number.
 
static bool isNA (Integer const &x) throw ()
 Test if x is a Non Available (NA) special number.
 
static Integer min () throw ()
 We are using the minimal value of the Integer type for NA values, thus we add one in order to compute the available minimal value.
 
static bool isInfinite (Integer const &x) throw ()
 
static bool isFinite (Integer const &x) throw ()
 

Static Public Attributes

static const bool hasNA = true
 True if the type has a representation for a "Not Available".
 

Detailed Description

Specialization for Integer (long).

We are using the largest element of the underlying Type for representing NA (not available) discrete numbers.

Definition at line 55 of file STK_Integer.h.

Member Function Documentation

◆ isFinite()

static bool STK::Arithmetic< Integer >::isFinite ( Integer const x)
throw (
)
inlinestatic
Returns
@ยข true if x is finite : i.e. if x is not a NA value.
Parameters
xthe value to test.

Definition at line 82 of file STK_Integer.h.

82{ return (!isNA(x));}
static bool isNA(Integer const &x)
Test if x is a Non Available (NA) special number.
Definition STK_Integer.h:70

References STK::Arithmetic< Type >::isNA().

◆ isInfinite()

static bool STK::Arithmetic< Integer >::isInfinite ( Integer const x)
throw (
)
inlinestatic
Returns
true if x is infinite : always false for Integer.
Parameters
xthe Integer number to test.

Definition at line 78 of file STK_Integer.h.

78{ return false; }

◆ isNA()

static bool STK::Arithmetic< Integer >::isNA ( Integer const x)
throw (
)
inlinestatic

Test if x is a Non Available (NA) special number.

Parameters
xthe Integer number to test.

Definition at line 70 of file STK_Integer.h.

71 { return (x==std::numeric_limits<Integer>::min());}

◆ min()

static Integer STK::Arithmetic< Integer >::min ( )
throw (
)
inlinestatic

We are using the minimal value of the Integer type for NA values, thus we add one in order to compute the available minimal value.

Definition at line 74 of file STK_Integer.h.

74{ return std::numeric_limits<Integer>::min() +1; }

◆ NA()

static Integer STK::Arithmetic< Integer >::NA ( )
throw (
)
inlinestatic

Adding a Non Available (NA) special number.

Definition at line 66 of file STK_Integer.h.

66{ return std::numeric_limits<Integer>::min();}

Member Data Documentation

◆ hasNA

const bool STK::Arithmetic< Integer >::hasNA = true
static

True if the type has a representation for a "Not Available".

Definition at line 64 of file STK_Integer.h.


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