Go to the documentation of this file.
20 value << x->childrenSize() <<
" items";
27 value << x->childrenSize() <<
" items";
48 value << x->getValue();
55 value << x->getValue();
62 value << x->getValue();
69 value << x->getValue();
76 value <<
"'" << x->getValue() <<
"'";
84 if (d->getType() ==
"float")
87 processMatrix<float>(*d);
89 else if (d->getType() ==
"double")
92 processMatrix<double>(*d);
107 template <
typename ScalarT>
109 DataDisplayVisitor::processMatrix(
const data::NDArray&
data)
111 const int rows =
data.getShape().at(0);
112 const int cols =
data.getShape().at(1);
114 const Eigen::Map<Eigen::Matrix<ScalarT, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>> m(
115 reinterpret_cast<ScalarT*
>(
data.getData()), rows, cols);
117 const int maxRows = 10;
118 const int maxCols = 10;
124 else if (rows > maxRows)
131 << m.block(0, 0, shownRows, cols) <<
"\n...\n"
132 << m.block(rows - shownRows, 0, shownRows, cols);
void visitBool(const data::VariantPtr &b) override
std::string getType() const
void setStreamPrecision()
std::vector< int > getShape() const
static std::string DimensionsToString(const std::vector< int > &dimensions)
Return dimensions in a readable string such as "(2, 3, 4)".
static PointerType DynamicCastAndCheck(const VariantPtr &n)
void visitList(const data::VariantPtr &n) override
std::shared_ptr< Variant > VariantPtr
void visitFloat(const data::VariantPtr &n) override
void visitDict(const data::VariantPtr &n) override
void visitNDArray(const data::VariantPtr &n) override
void visitLong(const data::VariantPtr &n) override
const Eigen::IOFormat eigenIof
static std::string getValue(const data::VariantPtr &n)
void visitString(const data::VariantPtr &n) override
double v(double t, double v0, double a0, double j)
void visitInt(const data::VariantPtr &n) override
void visitDouble(const data::VariantPtr &n) override
requires isVisitor< VisitorImplementation, typename VisitorImplementation::Input > void visit(VisitorImplementation &v, typename VisitorImplementation::Input &o)