STK++ 0.9.13
STK_Char.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------*/
2/* Copyright (C) 2004-2016 Serge Iovleff, Université Lille 1, Inria
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this program; if not, write to the
16 Free Software Foundation, Inc.,
17 59 Temple Place,
18 Suite 330,
19 Boston, MA 02111-1307
20 USA
21
22 Contact : S..._Dot_I..._At_stkpp_Dot_org (see copyright for ...)
23*/
24
25/*
26 * Project: STKernel::Base
27 * Purpose: Define the fundamental type Char.
28 * Author: Serge Iovleff, S..._Dot_I..._At_stkpp_Dot_org (see copyright for ...)
29 *
30 **/
31
36#ifndef STK_CHAR_H
37#define STK_CHAR_H
38
39namespace STK
40{
41
48template<>
49struct Arithmetic<Char> : public std::numeric_limits<Char>
50{
54 static Char NA() throw() { return static_cast<Char>(0); }
55
58 static const bool hasNA = false;
59
64 static bool isNA(const Char& x) throw() { return false; }
65
70 static bool isInfinite(const Char& x) throw() { return false; }
71
76 static bool isFinite(const Char& x) throw() { return true; }
77};
78
83template<>
85{
90};
91
92
93} // namespace STK
94
95#endif /*STK_CHAR_H*/
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
IdType
Id for the Type of a variable.
@ character_
character_ type
char Char
STK fundamental type of a Char.
The namespace STK is the main domain space of the Statistical ToolKit project.
static bool isInfinite(const Char &x)
Test if x is infinite.
Definition STK_Char.h:70
static bool isNA(const Char &x)
Test if x is a Non Available (NA) Char.
Definition STK_Char.h:64
static Char NA()
Adding a Non Available (NA) special number.
Definition STK_Char.h:54
static bool isFinite(const Char &x)
Test if x is finite.
Definition STK_Char.h:76
Arithmetic properties of STK fundamental types.
static const bool hasNA
True if the type has a representation for a "Not Available."
static Base::IdType returnType()
Give the IdType of the variable.
Definition STK_Char.h:89
Implementation of the return type.