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
26#ifdef DBG
27 #define DEBUG(msg) std::cout << __FILE__ << " " << __LINE__ << ": " \
28 << msg << std::endl
29#else
30 #define DEBUG(msg)
31#endif
32
46std::string scientific_format(double d, int width=20, int prec=10);
47
56std::string scientific_format(const std::vector<double>& v,
57 int width=20,
58 int prec=10);
59
60#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:4