library of assembled shared sources |
http://lass.cocamware.com |
#include "num_common.h"
#include "basic_ops.h"
Go to the source code of this file.
Data Structures | |
struct | lass::num::NumTraits< C > |
struct | lass::num::NumTraits< char > |
Namespaces | |
namespace | lass |
Library for Assembled Shared Sources. | |
namespace | lass::num |
numeric types and traits. | |
Defines | |
#define | LASS_NUM_DECLARE_FLOATING_TRAITS(ttype, tname) |
#define | LASS_NUM_DECLARE_COMPLEX_FLOATING_TRAITS(ttype, tname) |
#define | LASS_NUM_DECLARE_INTEGRAL_TRAITS(sign, type, is_signed) |
Functions | |
template<class C > | |
bool | lass::num::isNaN (const C &iV) |
template<class C > | |
bool | lass::num::isInf (const C &iV) |
return true if iV equals minus or plus Infinity |
The contents of this file are subject to the Common Public Attribution License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://lass.sourceforge.net/cpal-license. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
The Original Code is LASS - Library of Assembled Shared Sources.
The Initial Developer of the Original Code is Bram de Greve and Tom De Muer. The Original Developer is the Initial Developer.
All portions of the code written by the Initial Developer are: Copyright (C) 2004-2007 the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of the GNU General Public License Version 2 or later (the GPL), in which case the provisions of GPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the GPL and not to allow others to use your version of this file under the CPAL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL License. If you do not delete the provisions above, a recipient may use your version of this file under either the CPAL or the GPL.
*** END LICENSE INFORMATION ***
Definition in file num_traits.h.
#define LASS_NUM_DECLARE_FLOATING_TRAITS | ( | ttype, | |||
tname | ) |
Definition at line 116 of file num_traits.h.
#define LASS_NUM_DECLARE_COMPLEX_FLOATING_TRAITS | ( | ttype, | |||
tname | ) |
Value:
template<> \ struct LASS_DLL NumTraits< ttype >\ {\ typedef ttype selfType;\ typedef ttype::value_type baseType;\ typedef ttype intervalType;\ enum\ {\ isDistribution = false,\ isIntegral = false,\ isNative = false,\ isSigned = true,\ hasInfinity = false,\ hasNaN = false,\ isFloatingPoint = NumTraits< baseType >::isFloatingPoint\ };\ static const size_t memorySize;\ static const size_t mantisseSize;\ static const std::string name() { return tname ; }\ static const ttype one;\ static const ttype zero;\ static const ttype pi;\ static const ttype e;\ static const ttype sqrt2;\ static const ttype sqrtPi;\ };
Definition at line 151 of file num_traits.h.
#define LASS_NUM_DECLARE_INTEGRAL_TRAITS | ( | sign, | |||
type, | |||||
is_signed | ) |
Value:
template<> \ struct LASS_DLL NumTraits<sign type> \ {\ typedef sign type selfType;\ typedef sign type baseType;\ typedef float intervalType;\ typedef signed type signedType;\ typedef unsigned type unsignedType;\ enum\ {\ isDistribution = 0,\ isIntegral = 1,\ isNative = 1,\ isSigned = is_signed,\ hasInfinity = 0,\ hasNaN = 0,\ isFloatingPoint = 0\ };\ static const size_t memorySize;\ static const size_t mantisseSize;\ static const std::string name() { return LASS_STRINGIFY(sign type); }\ static const selfType one;\ static const selfType zero;\ static const selfType epsilon;\ static const selfType min;\ static const selfType max;\ static const selfType minStrictPositive;\ };
Definition at line 221 of file num_traits.h.
Generated on Mon Nov 10 14:22:05 2008 for Library of Assembled Shared Sources by 1.5.7.1 |