A fuzzy logic C++ library
Namespaces | Functions
helper_functions.hpp File Reference

Holds declarations of some small utility functions. More...

#include "slifis_datatypes.hpp"
+ Include dependency graph for helper_functions.hpp:
+ This graph shows which files directly or indirectly include this file:

Namespaces

namespace  slifis
 

This namespace includes all root classes, functions, and datatypes of the library.


Functions

void slifis::TrimCR (std::string &buf)
 Remove potential CR (0x0d) at end of string. Happens when reading a Windows generated file on a linux machine :-(.
void slifis::TrimString (std::string &t, const std::string &chars)
 Remove from string t all leading characters belonging to chars.
std::vector< std::string > slifis::TokensList (const std::string &input, char delim)
 A function that returns a STL vector of strings, filled with the tokens of input using delim as delimitor (needs BOOST)
bool slifis::LineHasContent (const std::string &buf, const char *comment_chars)
 Returns true if line buf seems to hold something, false if line is empty or if line starts with one of the character in the string comment_chars.
EN_FF_TYPE slifis::GetTypeFromFilename (std::string &filename)
 Determines the format of file I/O from filename extension.
const char * slifis::GetString (EN_RULE_OP optype)
 Returns a string giving in plain text the rule operation type.
const char * slifis::GetString (EN_MERGE_OP optype)
 Returns a string giving in plain text the merging operation type.
const char * slifis::GetString (EN_FIS_TYPE type)
 Returns a string giving in plain text the FIS type.
const char * slifis::GetString (EN_DEFUZZMETHOD m)
 Returns a string giving in plain text the defuzzification method m.
const char * slifis::GetString (EN_REDUCE_METHOD method)
 Returns a string giving the rule base reducing method.
const char * slifis::GetString (EN_TNORM norm)
const char * slifis::GetString (EN_SNORM norm)

Detailed Description

Holds declarations of some small utility functions.