1
Fork 0
This repository has been archived on 2025-04-09. You can view files and clone it, but cannot push or open issues or pull requests.
awesome-attractor/ostream_helpers.h
Joshua Moerman 5f4032eca0 more styling
2011-04-18 16:02:16 +02:00

24 lines
570 B
C++

#ifndef OSTREAM_HELPERS_HPP
#define OSTREAM_HELPERS_HPP
#include <iterator>
#include <algorithm>
#include "AttractorKernel.hpp"
#include "Attractor.hpp"
std::ostream& operator<<(std::ostream& os, AttractorKernel const& x) {
const unsigned int dimension = x.getDimension();
const double* point = x.vector();
std::copy(point, point+dimension, std::ostream_iterator<double>(os, ", "));
return os;
}
std::ostream& operator<<(std::ostream& os, Attractor const& x) {
os << x.kernel << "\n";
os << x.projector << "\n";
return os;
}
#endif // OSTREAM_HELPERS_HPP