SG++-Doxygen-Documentation
Utils.cpp File Reference
#include <sgpp/combigrid/utils/Utils.hpp>
#include <fstream>
#include <sstream>
#include <stdexcept>
#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...
 
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...