32#ifndef MADNESS_WORLD_PRINT_H__INCLUDED
33#define MADNESS_WORLD_PRINT_H__INCLUDED
74std::ostream &
operator<<(std::ostream &s,
const std::complex<T> &
c) {
75 s <<
c.real() <<
"+" <<
c.imag() <<
"j";
86template <
typename T,
typename U>
87std::ostream &
operator<<(std::ostream &s,
const std::pair<T, U> &
p) {
88 s <<
"(" <<
p.first <<
"," <<
p.second <<
")";
115 typename std::list<T>::const_iterator it =
c.begin();
116 while (it !=
c.end()) {
133std::ostream &
operator<<(std::ostream &s,
const std::vector<T> &
c) {
135 typename std::vector<T>::const_iterator it =
c.begin();
136 while (it !=
c.end()) {
154template <
typename T, std::
size_t N>
155typename std::enable_if<!std::is_same<T, char>::value, std::ostream &>
::type
158 for (std::size_t i = 0; i <
N; ++i) {
179 void print_justified(
const char* s,
int column=0,
bool underline=
true);
182 void print_centered(
const char* s,
int column=40,
bool underline=
true);
208 template <
typename T,
typename... Ts>
210 const T& t,
const Ts&... ts) {
211 using madness::operators::operator<<;
224 template<
typename T,
typename... Ts>
225 void print(
const T& t,
const Ts&... ts) {
226 using madness::operators::operator<<;
240 template<
typename T,
typename... Ts>
242 using madness::operators::operator<<;
Supplements to the std::array class, such as I/O operations, for convenience.
Mutex that is applied/released at start/end of a scope.
Definition worldmutex.h:239
double(* energy)()
Definition derivatives.cc:58
char * p(char *buf, const char *name, int k, int initial_level, double thresh, int order)
Definition derivatives.cc:72
auto T(World &world, response_space &f) -> response_space
Definition global_functions.cc:34
static const double v
Definition hatom_sf_dirac.cc:20
Mutex printmutex
Definition worldmutex.cc:146
std::ostream & operator<<(std::ostream &s, const std::array< T, N > &a)
Output std::array to stream for human consumption.
Definition array_addons.h:59
Namespace for all elements and tools of MADNESS.
Definition DFParameters.h:10
void print_header2(const std::string &s)
medium section heading
Definition print.cc:54
std::ostream & print_helper(std::ostream &out)
Helper function for print. Base case.
Definition print.h:194
void print(const T &t, const Ts &... ts)
Print items to std::cout (items separated by spaces) and terminate with a new line.
Definition print.h:225
void print_justified(const char *s, int column, bool underline)
Print a string justified on the left to start at the given column with optional underlining.
Definition print.cc:75
void printf_msg_energy_time(const std::string msg, const double energy, const double time)
Definition print.cc:70
std::string type(const PairType &n)
Definition PNOParameters.h:18
void print_header1(const std::string &s)
big section heading
Definition print.cc:44
void print_centered(const char *s, int column, bool underline)
Print a string centered at the given column with optional underlining.
Definition print.cc:85
void print_header3(const std::string &s)
small section heading
Definition print.cc:63
void print_error(const T &t, const Ts &... ts)
Print items to std::cerr (items separated by spaces) and terminate with a new line.
Definition print.h:241
#define ENDL
Definition print.h:55
static const double c
Definition relops.cc:10
#define N
Definition testconv.cc:37
Implements Mutex, MutexFair, Spinlock, ConditionVariable.