Loading...
Searching...
No Matches
utils.hpp
Go to the documentation of this file.
#ifndef __UTILS__
#define __UTILS__
#include <string>
#include <vector>
#include <iomanip>
#include <sstream>
#ifdef DBG
#define DEBUG(msg) std::cout << __FILE__ << " " << __LINE__ << ": " \
<< msg << std::endl
#else
#define DEBUG(msg)
#endif
std::string scientific_format(double d, int width=20, int prec=10);
std::string scientific_format(const std::vector<double>& v,
int width=20,
int prec=10);
#endif
scientific_format
std::string scientific_format(double d, int width=20, int prec=10)
Turns a double into a string written in scientific format.
Definition: utils.cpp:10