12#ifndef __GEDIM_IOStream_H
13#define __GEDIM_IOStream_H
15#include "Gedim_Macro.hpp"
16#include <unordered_set>
29#include <unordered_map>
34template <
typename matrixType>
37 std::ostringstream
str;
40 for (
unsigned int c = 0;
c <
mat.cols();
c++)
43 for (
unsigned int r = 0;
r <
mat.rows();
r++)
44 str << std::scientific << (
r == 0 ?
"" :
",") <<
mat(
r,
c);
45 str <<
";" << std::endl;
51template <
typename matrixType>
56 std::ostringstream
str;
68template <
typename matrixType>
73 std::ostringstream
str;
85template <
typename matrixType>
90 std::ostringstream
str;
104template <
typename T> std::ostream &
operator<<(std::ostream &
out,
const std::vector<T> &
vec)
120template <
typename T> std::ostream &
operator<<(std::ostream &
out,
const std::vector<T *> &
vec)
136template <
typename T,
size_t s> std::ostream &
operator<<(std::ostream &
out,
const std::array<T, s> &
vec)
152template <
typename T,
size_t s> std::ostream &
operator<<(std::ostream &
out,
const std::array<T *, s> &
vec)
338template <
typename map_key,
typename map_val>
346 out << (
counter != 0 ?
"," :
"") <<
"{" <<
it->first <<
", " <<
it->second <<
"}";
354template <
typename map_key,
typename map_val>
362 out << (
counter != 0 ?
"," :
"") <<
"{" <<
it->first <<
", " << (
it->second ==
nullptr ?
"NULL" : (*
it->second)) <<
"}";
370template <
typename map_key,
typename map_val>
378 out << (
counter != 0 ?
"," :
"") <<
"{" <<
it->first <<
", " <<
it->second <<
"}";
Eigen column vector.
Definition Eigen_Array.hpp:23
static int MaxElementToPrint
Max elements to print in vectors.
Definition IOUtilities.hpp:55
static int StartingIndexToPrint
Starting index to print in vectors.
Definition IOUtilities.hpp:56
Definition Eigen_Array.cpp:22
std::ostream & operator<<(std::ostream &out, const Eigen::VectorXd &vec)
Definition Eigen_Utilities.cpp:21
std::string MatrixToString(const matrixType &mat, const std::string &matrixTypeStr, const std::string &matrixName)
Definition IOStream.hpp:35
std::string MatrixCollectionToString(const std::vector< matrixType > &matCollection, const std::string &matrixTypeStr, const std::string &matrixName)
Definition IOStream.hpp:52