The Open Master Hearing Aid (openMHA)
openMHA
Open community platform for hearing aid algorithm research
|
Namespaces | |
MHAParser | |
Name space for the openMHA-Parser configuration language. | |
MHAParser::StrCnv | |
String converter namespace. | |
Macros | |
#define | MHAPLATFORM "undefined-linux" |
Functions | |
int | MHAParser::get_precision () |
int | MHAParser::StrCnv::num_brackets (const std::string &s) |
count number of brackets More... | |
int | MHAParser::StrCnv::bracket_balance (const std::string &s) |
static std::ostream & | write_float (std::ostream &o, const float &f) |
static std::string | parse_1_float (const std::string &s, mha_real_t &v) |
This internal function parses a floating point number from the beginning of a string. More... | |
static void | check_parenthesis_complex (const std::string &str) |
This function checks for unbalanced parenthesis in the string containing complex number. More... | |
static int | check_sign_complex (const std::string &str) |
This function checks for valid sign (b/w real & img. More... | |
static std::string | parse_1_complex (const std::string &s, mha_complex_t &v) |
This internal function parses a complex number from the beginning of a string. More... | |
#define MHAPLATFORM "undefined-linux" |
|
inlinestatic |
|
static |
This internal function parses a floating point number from the beginning of a string.
s | The string to parse |
v | The float variable to fill with a value |
|
static |
This function checks for unbalanced parenthesis in the string containing complex number.
str | The string to check. This function returns normally only when the string starts with an opening bracket and ends with a closing bracket. |
MHA_ErrorMsg | This function raises an error with an appropriate error message if the string does not start with an opening bracket '(' or if it does not end with a closing bracket ')'. |
|
static |
This function checks for valid sign (b/w real & img.
parts of complex number). It also checks if real part is missing in complex number.
str | String containing sign and onward imaginary part. |
This | function raises an error if wrong sign (other than '+' or '-') is found. It also raises error, if it finds 'i' instead of sign. This can happen when real part is missing in complex number and 'i' (of imaginary part) is found where sign was expected. |
|
static |
This internal function parses a complex number from the beginning of a string.
s | The string to parse |
v | The complex variable to fill with a value |
MHA_ErrorMsg | This function raises an error if s does not have characters except spaces, tabs etc |