24 #include <tensor/tensor.h>
25 #include <tensor/sparse.h>
30 template<
typename elt_t>
31 std::ostream &operator<<(std::ostream &s, const Vector<elt_t> &t);
34 template<
typename elt_t>
35 std::ostream &operator<<(std::ostream &s, const Tensor<elt_t> &t);
38 template<
typename elt_t>
39 std::ostream &operator<<(std::ostream &s, const Tensor<elt_t> &t);
41 template<
typename t,
size_t n>
42 inline std::ostream &operator<<(std::ostream &s, const StaticVector<t,n> &v)
44 return s << Vector<t>(v);
48 template<
typename elt_t>
49 inline std::ostream &operator<<(std::ostream &s, const Sparse<elt_t> &t)
58 template<
typename elt_t>
60 const Tensor<elt_t> data;
64 MatrixForm(
const Tensor<elt_t> &t) : data(t) {}
65 std::ostream &display(std::ostream &s)
const;
68 template<
typename elt_t>
69 inline std::ostream &operator<<(std::ostream &s, const MatrixForm<elt_t> &m) {
74 const MatrixForm<double> matrix_form(
const Tensor<double> &t);
77 const MatrixForm<cdouble> matrix_form(
const Tensor<cdouble> &t);
80 const MatrixForm<double> matrix_form(
const Sparse<double> &t);
83 const MatrixForm<cdouble> matrix_form(
const Sparse<cdouble> &t);
87 #include <tensor/detail/io.hpp>
89 #endif // !TENSOR_IO_H