#include "defs.hpp"
#include "engine/item.h"
#include <map>
#include <set>
#include <complex.h>
#include <acml.h>
Go to the source code of this file.
Functions |
void | err (std::string message, std::string function, std::string file, _fatal f) |
void | err (std::string message, std::string function, std::string file, _warning w) |
void | err (std::string message, std::string function, std::string file, const item *p, _fatal f) |
void | err (std::string message, std::string function, std::string file, const item *p, _warning f) |
void | err (std::string message, std::string function, std::string file, std::shared_ptr< item > p, _fatal f) |
void | err (std::string message, std::string function, std::string file, std::shared_ptr< item > p, _warning f) |
void | _fft (comp *_in, comp *_out, const size_t len, int dir, double scale) |
| Actual fft function that fft and ifft wrap.
|
void | fft (comp *in, comp *out, const size_t len) |
| This function performs a fourier transform in the forward direction.
|
void | ifft (comp *in, comp *out, const size_t len) |
| This functions performs a normalized fourier transform in the backwards direction.
|
void | trim (std::string &curline, const std::string &val) |
void | ltoken (std::string &tok, std::string &str, std::string delim) |
std::string | get_unique_name (std::string base) |
Function Documentation
void _fft |
( |
comp * |
_in, |
|
|
comp * |
_out, |
|
|
const size_t |
len, |
|
|
int |
dir, |
|
|
double |
scale |
|
) |
| |
Actual fft function that fft and ifft wrap.
Definition at line 110 of file utils.cpp.
Throws a fatal error, and prints the message, function name, and file name. Afterwards, program exits. err("something failed", "some_func", "folder/some_file.cpp", FATAL_ERROR)–>
A fatal error has occured in functions some_func in file "folder/some_file.cpp" Error message is: Something failed Exiting program
Definition at line 37 of file utils.cpp.
Throws a warning, and prints the message, function name, and file name. Afterwards, program continues. err("something failed", "some_func", "folder/some_file.cpp", WARNING)–>
A non-fatal error has occured in functions some_func in file "folder/some_file.cpp" Error message is: Something failed
Definition at line 54 of file utils.cpp.
void fft |
( |
comp * |
in, |
|
|
comp * |
out, |
|
|
const size_t |
len |
|
) |
| |
This function performs a fourier transform in the forward direction.
Definition at line 134 of file utils.cpp.
Returns a name that has not been created previously be the function, and should not exist in the engine Will almost certainly not be human-readable or printable on a terminal
- Parameters
-
base | The base string with which to generate the new name |
- Returns
- A unique name
Definition at line 227 of file utils.cpp.
void ifft |
( |
comp * |
in, |
|
|
comp * |
out, |
|
|
const size_t |
len |
|
) |
| |
This functions performs a normalized fourier transform in the backwards direction.
Definition at line 148 of file utils.cpp.
Trims specified characters from beginning and end of string " \n \r stuff-we want \t " –> "stuff we want"
- Parameters
-
curline | The string to be trimmed. Is modified by the function. |
val | The characters to be trimmed, are whitespace by default |
Definition at line 164 of file utils.cpp.