36 #ifndef MADNESS_WORLD_PRINT_H__INCLUDED
37 #define MADNESS_WORLD_PRINT_H__INCLUDED
56 #define ENDL std::endl
65 std::ostream& operator<<(std::ostream& s, const std::complex<T>&
c) {
66 s <<
c.real() <<
"+" <<
c.imag() <<
"j";
71 template <
typename T,
typename U>
72 std::ostream& operator<<(std::ostream& s, const std::pair<T,U>& p) {
73 s <<
"(" << p.first <<
"," << p.second <<
")";
79 std::ostream& operator<<(std::ostream& s, const std::list<T>&
c) {
81 typename std::list<T>::const_iterator it =
c.begin();
82 while (it !=
c.end()) {
85 if (it !=
c.end()) s <<
", ";
93 std::ostream& operator<<(std::ostream& s, const std::vector<T>&
c) {
95 typename std::vector<T>::const_iterator it =
c.begin();
96 while (it !=
c.end()) {
99 if (it !=
c.end()) s <<
", ";
108 template <
typename T, std::
size_t N>
109 typename disable_if<std::is_same<T,char>, std::ostream&>::type
112 for (std::size_t i=0; i<
N; ++i) {
114 if (i != (N-1)) s <<
",";
123 std::cout << a <<
ENDL;
127 template <
class A,
class B>
129 std::cout << a <<
" " << b <<
ENDL;
133 template <
class A,
class B,
class C>
135 std::cout << a <<
" " << b <<
" " << c <<
ENDL;
139 template <
class A,
class B,
class C,
class D>
141 std::cout << a <<
" " << b <<
" " << c <<
" " << d <<
ENDL;
145 template <
class A,
class B,
class C,
class D,
class E>
146 void print(
const A&
a,
const B&
b,
const C&
c,
const D& d,
const E& e) {
147 std::cout << a <<
" " << b <<
" " << c <<
" " << d <<
" " << e <<
ENDL;
151 template <
class A,
class B,
class C,
class D,
class E,
class F>
152 void print(
const A&
a,
const B&
b,
const C&
c,
const D& d,
const E& e,
const F&
f) {
153 std::cout << a <<
" " << b <<
" " << c <<
" " << d <<
" " << e <<
" " << f <<
ENDL;
157 template <
class A,
class B,
class C,
class D,
class E,
class F,
class G>
158 void print(
const A&
a,
const B&
b,
const C&
c,
const D& d,
const E& e,
const F&
f,
const G&
g) {
159 std::cout << a <<
" " << b <<
" " << c <<
" " << d <<
" " << e <<
" " << f <<
" " << g <<
ENDL;
163 template <
class A,
class B,
class C,
class D,
class E,
class F,
class G,
class H>
164 void print(
const A&
a,
const B&
b,
const C&
c,
const D& d,
const E& e,
const F&
f,
const G&
g,
const H& h) {
165 std::cout << a <<
" " << b <<
" " << c <<
" " << d <<
" " << e <<
" " << f <<
" " << g <<
" " << h <<
ENDL;
169 template <
class A,
class B,
class C,
class D,
class E,
class F,
class G,
class H,
class I>
170 void print(
const A&
a,
const B&
b,
const C&
c,
const D& d,
const E& e,
const F&
f,
const G&
g,
const H& h,
const I& i) {
171 std::cout << a <<
" " << b <<
" " << c <<
" " << d <<
" " << e <<
" " << f <<
" " << g <<
" " << h <<
" " << i <<
ENDL;
175 template <
class A,
class B,
class C,
class D,
class E,
class F,
class G,
class H,
class I,
class J>
176 void print(
const A&
a,
const B&
b,
const C&
c,
const D& d,
const E& e,
const F&
f,
const G&
g,
const H& h,
const I& i,
const J& j) {
177 std::cout << a <<
" " << b <<
" " << c <<
" " << d <<
" " << e <<
" " << f <<
" " << g <<
" " << h <<
" " << i <<
" " << j <<
ENDL;
181 template <
class A,
class B,
class C,
class D,
class E,
class F,
class G,
class H,
class I,
class J,
class K>
182 void print(
const A&
a,
const B&
b,
const C&
c,
const D& d,
const E& e,
const F&
f,
const G&
g,
const H& h,
const I& i,
const J& j,
const K& k) {
183 std::cout << a <<
" " << b <<
" " << c <<
" " << d <<
" " << e <<
" " << f <<
" " << g <<
" " << h <<
" " << i <<
" " << j <<
" " << k <<
ENDL;
187 template <
class A,
class B,
class C,
class D,
class E,
class F,
class G,
class H,
class I,
class J,
class K,
class L>
188 void print(
const A&
a,
const B&
b,
const C&
c,
const D& d,
const E& e,
const F&
f,
const G&
g,
const H& h,
const I& i,
const J& j,
const K& k,
const L& l) {
189 std::cout << a <<
" " << b <<
" " << c <<
" " << d <<
" " << e <<
" " << f <<
" " << g <<
" " << h <<
" " << i <<
" " << j <<
" " << k <<
" " << l <<
ENDL;
193 template <
class A,
class B,
class C,
class D,
class E,
class F,
class G,
class H,
class I,
class J,
class K,
class L,
class M>
194 void print(
const A&
a,
const B&
b,
const C&
c,
const D& d,
const E& e,
const F&
f,
const G&
g,
const H& h,
const I& i,
const J& j,
const K& k,
const L& l,
const M&
m) {
195 std::cout << a <<
" " << b <<
" " << c <<
" " << d <<
" " << e <<
" " << f <<
" " << g <<
" " << h <<
" " << i <<
" " << j <<
" " << k <<
" " << l <<
" " << m <<
ENDL;
199 template <
class A,
class B,
class C,
class D,
class E,
class F,
class G,
class H,
class I,
class J,
class K,
class L,
class M,
class N>
200 void print(
const A&
a,
const B&
b,
const C&
c,
const D& d,
const E& e,
const F&
f,
const G&
g,
const H& h,
const I& i,
const J& j,
const K& k,
const L& l,
const M&
m,
const N& n) {
201 std::cout << a <<
" " << b <<
" " << c <<
" " << d <<
" " << e <<
" " << f <<
" " << g <<
" " << h <<
" " << i <<
" " << j <<
" " << k <<
" " << l <<
" " << m <<
" " << n <<
ENDL;
205 void print_justified(
const char* s,
int column=0,
bool underline=
true);
208 void print_centered(
const char* s,
int column=40,
bool underline=
true);
211 #endif // MADNESS_WORLD_PRINT_H__INCLUDED
Tensor< double > B
Definition: tdse1d.cc:167
NDIM const Function< R, NDIM > & g
Definition: mra.h:2179
Grossly simplified Boost-like type traits and templates.
NDIM & f
Definition: mra.h:2179
JLOOP2 NK jnz KLOOP2 mov C
Definition: mtxm_gen.h:10
pcomplex_operatorT G
Definition: tdse1d.cc:168
const T1 &f1 return GTEST_2_TUPLE_() T(f0, f1)
const double N
Definition: navstokes_cosines.cc:94
FLOAT a(int j, FLOAT z)
Definition: y1.cc:86
#define ENDL
Definition: print.h:56
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:38
const double m
Definition: gfit.cc:199
void print_centered(const char *s, int column, bool underline)
Print a string centered at the given column with optional underlining.
Definition: print.cc:48
std::ostream & operator<<(std::ostream &s, const ContractedGaussianShell &c)
Definition: chem/molecularbasis.cc:38
void print(const A &a)
Print a single item to std::cout terminating with new line.
Definition: print.h:122
Holds machinery to set up Functions/FuncImpls using various Factories and Interfaces.
Definition: chem/atomutil.cc:45
const double c
Definition: gfit.cc:200
FLOAT b(int j, FLOAT z)
Definition: y1.cc:79