20 #ifndef ESSENTIA_STREAMUTIL_H
21 #define ESSENTIA_STREAMUTIL_H
35 #define PR(x) std::cout << #x << ": " << x << std::endl
52 template <
typename T,
typename U>
53 std::ostream&
operator<<(std::ostream& out,
const std::pair<T, U>& p) {
54 return out <<
'<' << p.first <<
',' << p.second <<
'>';
61 std::ostream&
operator<<(std::ostream& out,
const std::vector<T>& v) {
62 out <<
'[';
if (!v.empty()) {
63 out << *v.begin();
typename std::vector<T>::const_iterator it = v.begin();
64 for (++it; it != v.end(); ++it) out <<
", " << *it;
73 std::ostream&
operator<<(std::ostream& out,
const std::set<T>& v) {
74 out <<
'{';
if (!v.empty()) {
75 out << *v.begin();
typename std::set<T>::const_iterator it = v.begin();
76 for (++it; it != v.end(); ++it) out <<
", " << *it;
Definition: algorithm.h:28
std::ostream & operator<<(std::ostream &out, const Parameter &p)