SG++-Doxygen-Documentation
Utils.hpp File Reference
#include <sgpp/globaldef.hpp>
#include <cstddef>
#include <string>
#include <vector>

Namespaces

 sgpp
 This header contains some utility functions.
 
 sgpp::combigrid
 

Functions

std::int64_t sgpp::combigrid::binom (std::int64_t n, std::int64_t k)
 Returns the binomial coefficient n over k. More...
 
std::string sgpp::combigrid::escape (std::string str, char escapeCharacter, std::string avoidCharacters, std::string replaceCharacters)
 Escapes in str each occurrence of a character in avoidCharacters with the escape character and the corresponding character in replaceCharacters. More...
 
std::string sgpp::combigrid::join (std::vector< std::string > const &elements, std::string const &separator)
 Concatenates the strings in elements and inserts the separator at the concatenation points. More...
 
template<typename T >
sgpp::combigrid::pow (T base, size_t exponent)
 Exponentiation function for integer types with exact precision. More...
 
std::string sgpp::combigrid::readFromFile (std::string filename)
 Reads a file into a string (without advanced error-handling). More...
 
std::vector< std::string > sgpp::combigrid::split (std::string str, std::string separator)
 Splits the string str at every occurrence of separator and returns the parts (without the separator) in a vector. More...
 
std::string sgpp::combigrid::unescape (std::string str, char escapeCharacter, std::string avoidCharacters, std::string replaceCharacters)
 Reverses the effect of the function escape(). More...
 
void sgpp::combigrid::writeToFile (std::string filename, std::string value)
 Writes a string into a file, overwriting currently saved data if the file already exists (without advanced error-handling). More...