yat  0.10.4pre
Classes | Namespaces | Functions
utility.h File Reference

Some useful functions are placed here. More...

#include "deprecate.h"
#include "Exception.h"
#include "yat_assert.h"
#include <gsl/gsl_math.h>
#include <algorithm>
#include <cctype>
#include <cmath>
#include <functional>
#include <limits>
#include <locale>
#include <istream>
#include <string>
#include <stdexcept>
#include <sstream>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

struct  theplu::yat::utility::detail::VectorPusher< T >
struct  theplu::yat::utility::detail::VectorPusher< std::string >

Namespaces

namespace  theplu
 The Department of Theoretical Physics namespace as we define it.
namespace  theplu::yat
 yat project namespace.
namespace  theplu::yat::utility
 Miscellaneous functionality.

Functions

std::string theplu::yat::utility::basename (const std::string &fn)
template<typename InputIterator , typename OutputIterator >
bool theplu::yat::utility::binary_weight (InputIterator first, InputIterator last, OutputIterator result)
void theplu::yat::utility::chdir (const std::string &dir)
void theplu::yat::utility::chmod (const std::string &filename, mode_t mode)
template<typename T >
std::string theplu::yat::utility::convert (T input)
 convert T to a string
template<typename T >
theplu::yat::utility::convert (const std::string &s)
 convert string to (numerical) type
void theplu::yat::utility::copy_file (const std::string &source, const std::string &target)
 Copy file source to target.
std::string theplu::yat::utility::dirname (const std::string &fn)
bool theplu::yat::utility::fnmatch (const std::string &pattern, const std::string &str, int flags=0)
template<typename T >
bool theplu::yat::utility::is (const std::string &s)
 check if string is convertible to (numerical) type T
bool theplu::yat::utility::is_double (const std::string &)
bool theplu::yat::utility::is_equal (std::string s, std::string other)
bool theplu::yat::utility::is_float (const std::string &)
bool theplu::yat::utility::is_int (const std::string &)
bool theplu::yat::utility::is_nan (const std::string &s)
template<typename T >
void theplu::yat::utility::load (std::istream &is, std::vector< std::vector< T > > &vec, char sep='\0', char line_sep='\n', bool ignore_empty=false, bool rectangle=true)
template<typename T >
void theplu::yat::utility::load (std::istream &is, std::vector< T > &vec, char sep='\0')
 Fill a vector<T> with elements from istream.
template<typename T >
theplu::yat::utility::log2 (T x)
template<typename T >
bool theplu::yat::utility::detail::convert (const std::string &s, T &t)
 convert s to t
void theplu::yat::utility::mkdir (const std::string &dir, mode_t mode=0777)
 create a directory dir
void theplu::yat::utility::mkdir_p (const std::string &dir, mode_t mode=0777)
void theplu::yat::utility::remove (const std::string &fn)
void theplu::yat::utility::rename (const std::string &from, const std::string to)
void theplu::yat::utility::replace (std::string &full_str, std::string old_str, std::string new_str)

Detailed Description

Some useful functions are placed here.


Generated on Mon Nov 11 2013 09:41:44 for yat by  doxygen 1.8.1