20 #ifndef QMCPLUSPLUS_NATIVE_INTITIALIZER_PRINT_HPP 21 #define QMCPLUSPLUS_NATIVE_INTITIALIZER_PRINT_HPP 33 template<
typename OBJECT>
45 template<
class T,
unsigned D>
46 inline std::ostream& operator<<(std::ostream& out, const NativePrint<TinyVector<T, D>>& np_vec)
49 auto vec = np_vec.get_obj();
50 for (
int i = 0; i < D - 1; ++i)
51 out << std::setw(12) << std::setprecision(10) << vec[i] <<
", ";
52 out << std::setw(12) << std::setprecision(10) << vec[D - 1] <<
" }";
57 inline std::ostream& operator<<(std::ostream& out, const NativePrint<std::vector<T>>& np_vec)
60 auto vec = np_vec.get_obj();
62 out << std::setprecision(10) << t <<
", ";
68 inline std::ostream& operator<<(std::ostream& out, const NativePrint<std::vector<bool>>& np_vec)
71 auto vec = np_vec.get_obj();
72 for (
const bool& t : vec)
74 std::string bool_str = t ?
"true" :
"false";
75 out << std::setprecision(10) << bool_str <<
", ";
82 inline std::ostream& operator<<(std::ostream& out, const NativePrint<Vector<T>>& np_vec)
85 auto vec = np_vec.get_obj();
87 out << std::setprecision(10) << t <<
", ";
helper functions for EinsplineSetBuilder
This wrapper is to allow us to leave the user facing operator<< for classes alone.
NativePrint(const OBJECT &obj)
Declaraton of Vector<T,Alloc> Manage memory through Alloc directly and allow referencing an existing ...
const OBJECT & get_obj() const