![]() |


Go to the source code of this file.
Classes | |
| class | MemPool |
| class | SizedMemPool |
| class | MemoryManager |
| class | MemoryManagerPart |
| class | GlobalMemoryManager |
Macros | |
| #define | _INCLUDE_CLIZFUNCTIONS |
| #define | CHKHEAP() (check_heap(__FILE__, __LINE__)) |
| #define | FLOATIFPRECISION 0.000001f |
| #define | BIGFLOATVALUE 4294967269.0f |
| #define | BIGINTVALUE 4294967269 |
| #define | ELEM_SWAP(a, b) { register float t=(a);(a)=(b);(b)=t; } |
| #define | ELEM_SWAPUI(a, b) { unsigned int t=(a);(a)=(b);(b)=t; } |
| #define | SWAP(a, b) temp=(a);(a)=(b);(b)=temp; |
| #define | SWAPUI(a, b) temp2=(a);(a)=(b);(b)=temp2; |
| #define | SWAPFFT(a, b) tempr = (a); (a) = (b); (b) = tempr |
| #define | M 7 |
| #define | SQR(x) ((x)*(x)) |
Typedefs | |
| typedef boost::thread | Thread |
| typedef boost::mutex | Mutex |
| typedef boost::condition_variable | ConVar |
| typedef boost::mutex::scoped_lock | Lock |
| typedef boost::unique_lock < boost::shared_mutex > | Writelock |
| typedef boost::shared_lock < boost::shared_mutex > | Readlock |
| typedef boost::mutex::scoped_lock | locktype |
| typedef boost::unique_lock < boost::shared_mutex > | writelocktype |
| typedef boost::shared_lock < boost::shared_mutex > | readlocktype |
| typedef int | memInt |
| typedef unsigned int | memUInt |
| typedef float | memFloat |
| typedef double | memDouble |
| typedef void | memPtr |
| typedef bool | memBool |
| typedef unsigned short | memShort |
| typedef unsigned char | memByte |
| typedef unsigned short | memAdrType |
Functions | |
| void | check_heap (char *file, int line) |
| int | clBinomial (int n, int k) |
| float | clSign (float x) |
| int | clMax (int a, int b) |
| void | clSort (float vec[], int n) |
| void | clSort (unsigned int vec[], int n) |
| void | clSortTwo (unsigned int vec[], unsigned int vec2[], int n) |
| void | clSortTwo (float vec[], float vec2[], int n) |
| void | clSortTwo (float vec[], unsigned int vec2[], int n) |
| float | clMedian (float vec[], int n) |
| float | clMedian (unsigned int vec[], int n) |
| float | clMean (float arr[], uint32_t n) |
| double | clMean (double arr[], uint32_t n) |
| float | clStd (float arr[], uint32_t n) |
| float | clStdWithMean (float arr[], uint32_t n, float mean) |
| float * | clAbs (float arr[], uint32_t n) |
| uint32_t | clMaxIndex (float arr[], uint32_t begin, uint32_t end) |
| uint32_t | clMaxAbsIndex (float arr[], uint32_t begin, uint32_t end) |
| uint32_t | clMinIndex (float arr[], uint32_t begin, uint32_t end) |
| float | clErfc (float x) |
| float | clKSTest (float arr[], uint32_t n, MemoryManager &memMan) |
| void | clFindHighestIndices (float arr[], uint32_t n, uint32_t output[], uint32_t numindices, MemoryManager &memMan) |
| void | clFindLowestIndices (float arr[], uint32_t n, uint32_t output[], uint32_t numindices, MemoryManager &memMan) |
| void | clSplineGetY2 (float y[], int n, float y2[], MemoryManager &memMan) |
| float | clSplineInterp (float y[], float y2[], float x) |
| void | clHaarWaveDecWithOffset (float spikes[], unsigned int size, uint8_t scales, float output[], uint32_t offset, MemoryManager &memMan) |
| void | clXCorr (float *X, float *Y, unsigned int n, int maxshift, float *&output, MemoryManager &memMan) |
| void | clXCorr (double *X, double *Y, unsigned int n, int maxshift, double *&output, MemoryManager &memMan) |
Variables | |
| const memShort | MAXPOOLS = 2048 |
| const memShort | NUMMEMMAN = 4 |
| const memShort | MEMSIZECOUNT = 19 |
| const memUInt | MEMSIZE [22] = { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152 } |
| const memUInt | POOLCAPACITY [22] = { 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 128, 128, 64, 64, 32, 16, 8, 4, 2 } |
| const memShort | METASIZE = sizeof(memAdrType) |
| GlobalMemoryManager | gMemMan |
| #define _INCLUDE_CLIZFUNCTIONS |
| #define BIGFLOATVALUE 4294967269.0f |
| #define BIGINTVALUE 4294967269 |
| #define CHKHEAP | ( | ) | (check_heap(__FILE__, __LINE__)) |
| #define ELEM_SWAP | ( | a, | |
| b | |||
| ) | { register float t=(a);(a)=(b);(b)=t; } |
| #define ELEM_SWAPUI | ( | a, | |
| b | |||
| ) | { unsigned int t=(a);(a)=(b);(b)=t; } |
| #define FLOATIFPRECISION 0.000001f |
| #define M 7 |
| #define SQR | ( | x | ) | ((x)*(x)) |
| #define SWAP | ( | a, | |
| b | |||
| ) | temp=(a);(a)=(b);(b)=temp; |
| #define SWAPFFT | ( | a, | |
| b | |||
| ) | tempr = (a); (a) = (b); (b) = tempr |
| #define SWAPUI | ( | a, | |
| b | |||
| ) | temp2=(a);(a)=(b);(b)=temp2; |
| typedef boost::condition_variable ConVar |
| typedef boost::mutex::scoped_lock Lock |
| typedef boost::mutex::scoped_lock locktype |
| typedef unsigned short memAdrType |
| typedef bool memBool |
| typedef unsigned char memByte |
| typedef double memDouble |
| typedef float memFloat |
| typedef int memInt |
| typedef void memPtr |
| typedef unsigned short memShort |
| typedef unsigned int memUInt |
| typedef boost::mutex Mutex |
| typedef boost::shared_lock< boost::shared_mutex > Readlock |
| typedef boost::shared_lock< boost::shared_mutex > readlocktype |
| typedef boost::thread Thread |
| typedef boost::unique_lock< boost::shared_mutex > Writelock |
| typedef boost::unique_lock< boost::shared_mutex > writelocktype |
| void check_heap | ( | char * | file, |
| int | line | ||
| ) |
| float* clAbs | ( | float | arr[], |
| uint32_t | n | ||
| ) |
Changes all values of an array to their absolute values
| [in,out] | arr | Array to be converted to abs(arr) |
| [in] | n | Number of values to be converted |

| int clBinomial | ( | int | n, |
| int | k | ||
| ) |
Binomial coefficient Number of combinations when choosing k elements from an n elements pool
| [in] | n | Number of elements in pool |
| [in] | k | number of chosen elements |
|
inline |
Approximation of error function by Abramowitz and Stegun
| [in] | x | Input |
| void clFindHighestIndices | ( | float | arr[], |
| uint32_t | n, | ||
| uint32_t | output[], | ||
| uint32_t | numindices, | ||
| MemoryManager & | memMan | ||
| ) |
Writes the indices of the highest values in output (descending)
| [in] | arr | Array to be searched |
| [in] | n | Up to which index the array should be searched |
| [out] | output | Array to hold the indices of the highest values |
| [in] | numindices | How many indices should be written to output |


| void clFindLowestIndices | ( | float | arr[], |
| uint32_t | n, | ||
| uint32_t | output[], | ||
| uint32_t | numindices, | ||
| MemoryManager & | memMan | ||
| ) |
Writes the indices of the lowest values in output
| [in] | arr | Array to be searched |
| [in] | n | Up to which index the array should be searched |
| [out] | output | Array to hold the indices of the lowest values |
| [in] | numindices | How many indices should be written to output |

| void clHaarWaveDecWithOffset | ( | float | spikes[], |
| unsigned int | size, | ||
| uint8_t | scales, | ||
| float | output[], | ||
| uint32_t | offset, | ||
| MemoryManager & | memMan | ||
| ) |
Haar wavelet decomposition
| [in] | spikes | Array of data points to be decomposed |
| [in] | size | Number of data points |
| [in] | scales | How deep the decomposition goes before plugging |
| [out] | output | Store for the wavelet coefficients |
| [in] | offset | Where in the output array to start storing the wavelet coefficients |


| float clKSTest | ( | float | arr[], |
| uint32_t | n, | ||
| MemoryManager & | memMan | ||
| ) |
Lilliefors modification of the Kolmogorov-Smirnov (KS) test for normality
| [in] | arr | Input array |
| [in] | n | Up to which index deviation from normality should be calculated. |


| int clMax | ( | int | a, |
| int | b | ||
| ) |
Max Returns the bigger value
| [in] | a | value |
| [in] | b | value |

| uint32_t clMaxAbsIndex | ( | float | arr[], |
| uint32_t | begin, | ||
| uint32_t | end | ||
| ) |
Returns the index of the absolute maximum value
| [in] | arr | Array to be searched |
| [in] | begin | Where the search starts |
| [in] | end | Where the search ends |

| uint32_t clMaxIndex | ( | float | arr[], |
| uint32_t | begin, | ||
| uint32_t | end | ||
| ) |
Returns the index of the maximum value
| [in] | arr | Array to be searched |
| [in] | begin | Where the search starts |
| [in] | end | Where the search ends |

| float clMean | ( | float | arr[], |
| uint32_t | n | ||
| ) |
Mean
| [in] | arr | Array from which the mean is calculated |
| [in] | n | Number of values from which the mean is calculated |

| double clMean | ( | double | arr[], |
| uint32_t | n | ||
| ) |
Mean
| [in] | arr | Array from which the mean is calculated |
| [in] | n | Number of values from which the mean is calculated |
| float clMedian | ( | float | vec[], |
| int | n | ||
| ) |
Median based on Quicksort Only correct for odd numbers of n
| [in,out] | vec | Array to be sorted |
| [in] | n | Number of values to be sorted |

| float clMedian | ( | unsigned int | vec[], |
| int | n | ||
| ) |
Median based on Quicksort Only correct for odd numbers of n
| [in,out] | vec | Array to be sorted |
| [in] | n | Number of values to be sorted |
| uint32_t clMinIndex | ( | float | arr[], |
| uint32_t | begin, | ||
| uint32_t | end | ||
| ) |
Returns the index of the minimum value
| [in] | arr | Array to be searched |
| [in] | begin | Where the search starts |
| [in] | end | Where the search ends |

| float clSign | ( | float | x | ) |
Signum Returns 1 if x >= 0 and -1 otherwise
| [in] | x | value |
|
inline |
Quicksort based on Sedgewick, R. (1978) "Implementing Quicksort Programs"
| [in,out] | vec | Array to be sorted |
| [in] | n | Number of values to be sorted |

| void clSort | ( | unsigned int | vec[], |
| int | n | ||
| ) |
Quicksort based on Sedgewick, R. (1978) "Implementing Quicksort Programs"
| [in,out] | vec | Array to be sorted |
| [in] | n | Number of values to be sorted |
| void clSortTwo | ( | unsigned int | vec[], |
| unsigned int | vec2[], | ||
| int | n | ||
| ) |
Quicksort based on Sedgewick, R. (1978) "Implementing Quicksort Programs" To sort a second array the same way, the first is sorted.
| [in,out] | vec | Array to be sorted |
| [in,out] | vec2 | Array to be sorted in the same was as vec |
| [in] | n | Number of values to be sorted |

| void clSortTwo | ( | float | vec[], |
| float | vec2[], | ||
| int | n | ||
| ) |
Quicksort based on Sedgewick, R. (1978) "Implementing Quicksort Programs" To sort a second array the same way, the first is sorted.
| [in,out] | vec | Array to be sorted |
| [in,out] | vec2 | Array to be sorted in the same was as vec |
| [in] | n | Number of values to be sorted |
| void clSortTwo | ( | float | vec[], |
| unsigned int | vec2[], | ||
| int | n | ||
| ) |
Quicksort based on Sedgewick, R. (1978) "Implementing Quicksort Programs" To sort a second array the same way, the first is sorted.
| [in,out] | vec | Array to be sorted |
| [in,out] | vec2 | Array to be sorted in the same was as vec |
| [in] | n | Number of values to be sorted |
| void clSplineGetY2 | ( | float | y[], |
| int | n, | ||
| float | y2[], | ||
| MemoryManager & | memMan | ||
| ) |
Cubic spline interpolation. Calculates second derivatives for cubic spline interpolation Works under the following assumptions: length(y)=length(x)=n x[i]=x(i) for i=0:1:n-1 Therefore, no x vector is needed as input.
| [in] | y | y values of the data points |
| [in] | n | Up to which index y2 should be calculated |
| [out] | y2 | Second derivatives of the interpolating function |


| float clSplineInterp | ( | float | y[], |
| float | y2[], | ||
| float | x | ||
| ) |
Cubic spline interpolation. Interpolates y value for x based on second derivatives. Works under the following assumptions: length(y)=length(x)=n x[i]=x(i) for i=0:1:n-1 Therefore, no x vector is needed as input.
| [in] | y | y values of the data points |
| [in] | y2 | Second derivatives of the interpolating function |
| [in] | x | x value of the point to be interpolated |

| float clStd | ( | float | arr[], |
| uint32_t | n | ||
| ) |
Standard deviation
| [in] | arr | Array from which the std is calculated |
| [in] | n | Number of values from which the std is calculated |

|
inline |
Standard deviation with mean as argument (reduced computation compared to clStd if the mean was already calculated)
| [in] | arr | Array from which the std is calculated |
| [in] | n | Number of values from which the std is calculated |
| [in] | mean | Mean to use to calculate the std |

| void clXCorr | ( | float * | X, |
| float * | Y, | ||
| unsigned int | n, | ||
| int | maxshift, | ||
| float *& | output, | ||
| MemoryManager & | memMan | ||
| ) |
Cross-correlation
| [in] | X | Input vector |
| [in] | Y | Input vector |
| [in] | n | Number of elements in input vectors |
| [out] | maxshift | Maximum number of shifts |
| [in] | output | cross-correlation of X and Y |


| void clXCorr | ( | double * | X, |
| double * | Y, | ||
| unsigned int | n, | ||
| int | maxshift, | ||
| double *& | output, | ||
| MemoryManager & | memMan | ||
| ) |
Cross-correlation
| [in] | X | Input vector |
| [in] | Y | Input vector |
| [in] | n | Number of elements in input vectors |
| [out] | maxshift | Maximum number of shifts |
| [in] | output | cross-correlation of X and Y |

| GlobalMemoryManager gMemMan |
| const memShort MAXPOOLS = 2048 |
| const memUInt MEMSIZE[22] = { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152 } |
| const memShort MEMSIZECOUNT = 19 |
| const memShort METASIZE = sizeof(memAdrType) |
| const memShort NUMMEMMAN = 4 |
| const memUInt POOLCAPACITY[22] = { 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 128, 128, 64, 64, 32, 16, 8, 4, 2 } |