FYS3150: Project 2
Loading...
Searching...
No Matches
utils.hpp
Go to the documentation of this file.
1
11#ifndef __UTILS__
12#define __UTILS__
13
14#include <string>
15#include <vector>
16#include <iomanip>
17#include <sstream>
18
27#ifdef DBG
28 #define DEBUG(msg) std::cout << __FILE__ << " " << __LINE__ << ": " \
29 << msg << std::endl
30#else
31 #define DEBUG(msg)
32#endif
33
47std::string scientific_format(double d, int width=20, int prec=10);
48
57std::string scientific_format(const std::vector<double>& v,
58 int width=20,
59 int prec=10);
60
61#endif
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