#include <complex>
#include <cmath>
Go to the source code of this file.
Namespaces | |
namespace | simth |
Constants for gcc2 compatibility | |
These constants are defined here if they haven't been defined before, which is the case in some gcc2 setups. | |
#define | M_PI 3.14159265358979323846 |
#define | M_SQRT2 1.41421356237309504880 |
#define | M_SQRT1_2 0.70710678118654752440 |
Global functions. | |
This section contains globally defined (template) functions which do not particularly refer to any classes. These functions are defined in misc.h. Global functions by definition should rather be avoided in an object oriented library. Please try to add this functionality inside your objects. If you really really think a global function would make sense, then please add a detailed description about the intended use case and (especially for template functions) potential side-effects.
Globally defined functions which only make sense with respect to certain classes should be especially avoided and rather be defined inside these classes. | |
template<class Type> | |
Type | sqr (Type a) |
Returns the square of a parameter. | |
Global constants for the simulation system | |
const double | PI = M_PI |
const double | PI2 = 2.0 * PI |
const long double | ZERO_THRESHOLD = 1.0E-10 |
const unsigned int | MAX_BITS_PER_SYMBOL = 8 |
const unsigned int | MAX_STATES_PER_SYMBOL = 1<<MAX_BITS_PER_SYMBOL |
const unsigned int | MAX_GENERATOR_POLYNOM = 10000 |
Defines | |
#define | DEBUG 0 |
#define | SECURITY 1 |
Typedefs | |
typedef std::complex< double > | Complex |
Type for complex-valued numbers. |
Note: This header file used to depend on config.h. This was a bad idea, since config.h should be included by the cpp file (of the respective library, i.e. that's a different config.h than the one in simthetic) and not by the header file. This dependency has been removed on 2004-05-03.
|
Switch debugging mode on or off. |
|
This macro is set to "1" by default and enables useful range/security checks. It can be disabled upon extra request, if you think this might increase runtime a little bit. But usually the checks flagged by this macro should be always enabled anyways. If there are runtime checks that make sense to be disabled in some circumstances, you should consider flagging them by the DEBUG macro. |
|
pi. |
|
sqrt(2). |
|
1/sqrt(2). |
|
Type for complex-valued numbers. Throughout all of Simthetic, we use this type for the complex numbers. |
|
Returns the square of a parameter. Template function for the squaring of a parameter if and only if the operator "multiplication" is defined for this type (and is commutative). In other words, this will probably work for int, double, and Complex, but definitely not for vectors and matrices. |
|
Pi |
|
2*Pi |
|
The threshold below which some routines will assume values to be zero. |
|
Upper limit on the complexity of the constellation diagram, by limiting the possible number of bits per constellation symbol. This is used when allocating memory in the viterbi decoding, and therefore it shouldn't be set higher than necessary. (FIXME: is this correct? Also, can't we increase this to, say, 16?) |
|
Upper limit on the complexity of the constellation diagram, by limiting the possible number of constellation symbols -- which is a direct function of MAX_BITS_PER_SYMBOL. This is used when allocating memory in the viterbi decoding, and therefore it shouldn't be set higher than necessary. (FIXME: is this correct? Also, can't we increase this to, say, 16?) |
|
FIXME: what is this? |