Go to the documentation of this file.
6 #ifndef ToolboxOutputMatlab_h
7 #define ToolboxOutputMatlab_h
15 #define OutputMatlabArray_D 0
16 #define OutputMatlabStiffArray_D 0
17 #define OutputMatlabSequence_D 0
33 :
val_(val), transposed_(transposed) {}
36 virtual std::ostream&
info(std::ostream& os)
const;
47 s.precision(os.precision());
49 const F* d = (
const F*)val_;
51 "transposed = " << std::boolalpha << transposed_);
53 for (uint i = val_.size(); i--;)
54 s << OutputMatlab<F>(*d++)
55 << ((i == 0) ?
"" : (transposed_ ?
" " :
"; "));
70 template<u
int dim,
typename F>
74 :
val_(val), transposed_(transposed) {}
77 virtual std::ostream&
info(std::ostream& os)
const;
84 template<u
int dim,
typename F>
89 s.precision(os.precision());
91 const F* d = (
const F*)val_;
93 "transposed = " << std::boolalpha << transposed_);
95 for (uint i = dim; i--;)
97 << ((i == 0) ?
"" : (transposed_ ?
" " :
"; "));
100 return os << s.str();
115 : seq_(seq), transposed_(transposed) {}
118 virtual std::ostream&
info(std::ostream& os)
const;
129 s.precision(os.precision());
132 "transposed = " << std::boolalpha << transposed_);
134 for (uint i = 0; i < seq_.size(); ++i)
136 << ((i == seq_.size()-1) ?
"" : (transposed_ ?
" " :
"; "));
139 return os << s.str();
144 #endif // ToolboxOutputMatlab_h
OutputMatlab(const Sequence< F > &seq, const bool transposed=false)
const StiffArray< dim, F > & val_
Class for output of objects to matlab.
An array of objects of fix length, defined by template parameter dim.
#define DEBUGL(doit, msg)
std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Sequence with operations, output operator, and method of the particular element types.
OutputMatlab(const Array< F > &val, const bool transposed=false)
OutputMatlab(const StiffArray< dim, F > &val, const bool transposed=false)
const Sequence< F > & seq_
std::string typeOf(const T &t)
Return the typeid name of a class object.
Class providing an output operator.
Basic namespace for Concepts-2.