#include <string>
#include <vector>
#include <iostream>
#include <sstream>
#include <typeinfo>
#include <simthetic/misc.h>
#include <simthetic/exceptions.h>
#include <simthetic/parameterfile.h>
Go to the source code of this file.
Namespaces | |
namespace | simth |
Functions | |
std::string | i2string (int value) |
std::string | oct2string (int value) |
int | oct2int (int oct) |
std::string | demangle (const char *symbol) |
template<typename T> | |
std::string | stringify (const T &x) |
template<typename T> | |
T | convertTo (const std::string &s, bool failIfLeftoverChars=true) |
double | arg (const Complex &comp) |
int | inversePower2 (int x) |
double | db2linearPowerRatio (double snr) |
double | db2reciprocalLinearPowerRatio (double snr) |
void | computeSplittedSizes (size_t inSize, size_t inBits1, size_t inBits2, size_t &outSize1, size_t &outSize2) |
template<class T> | |
void | splitSequence (const T &in, T *out1, T *out2, size_t bits1, size_t bits2) |
template<class T> | |
void | mergeSequences (const T &out1, const T &out2, size_t bits1, size_t bits2, T *outSeq) |
void | computeSplittedSizes (size_t inSize, size_t inBits1, size_t inBits2, size_t *outSize1, size_t *outSize2) |
Especially, one can use the simth::checkedVector classes to implement sequences. These classes act like an std::vector but offer an additional range check depending whether the macro DEBUG is defined or not. In order to enhance the runtime speed this check mechanism can de disabled by setting the macro DEBUG (defined in misc.h) to false.
Note: The file name was given according to Peter Haase's initials since he's the one who collected all these functions.
|
|
|
|
|
|
|
Returns a string describing the (demangled) type of the given mangled type symbol.
Note: To get the demangled type name for some class, you would call |
|
Converts an arbitrary type T to a std::string, provided T supports syntax like std::cout << x. (Copied from Marshall Cline's FAQ list.) |
|
Converts a string to any type that supports iostream input. (Copied from Marshall Cline's FAQ list.) |
|
|
|
Split one sequence into two sequences. The size of the sequence must be a multiple of bits1+bits2. FIXME: This can better be moved to signals.h, doesn't it? Then the bits with index (n (bits1+bits)) to (n (bits1+bits)+bits1) for n=0 are splitted to sequence 1 and the bits with index (n (bits1+bits) + bits1) to (n (bits1+bits)+ bits1+bits2) are splitted to squence 2. |
|
|
|
|