GenericContainer
GenericContaine a tool for C++ programming
Loading...
Searching...
No Matches
GenericContainerToYAML.cc File Reference
#include "GenericContainer/GenericContainer.hh"
#include <iomanip>
#include <cmath>
#include <ctgmath>
#include <fstream>

Namespaces

namespace  GC_namespace
 

Macros

#define GC_PRINT_VECTOR
 
#define GC_PRINT_MATRIX
 
#define GC_PRINT_MATRIXT
 

Macro Definition Documentation

◆ GC_PRINT_MATRIX

#define GC_PRINT_MATRIX
Value:
unsigned NR{M.num_rows()}; \
unsigned NC{M.num_cols()}; \
stream << '\n'; \
for ( unsigned j{0}; j < NC; ++j ) { \
stream << prefix; \
char const * pre = "- [ "; \
for ( unsigned i{0}; i < NR; ++i ) \
{ stream << pre << M(i,j); pre = ", "; } \
stream << " ]\n"; \
}

◆ GC_PRINT_MATRIXT

#define GC_PRINT_MATRIXT
Value:
unsigned NR{M.num_rows()}; \
unsigned NC{M.num_cols()}; \
stream << '\n'; \
for ( unsigned i{0}; i < NR; ++i ) \
stream << prefix; \
char const * pre = "- [ "; \
for ( unsigned j{0}; j < NC; ++j ) { \
{ stream << pre << M(i,j); pre = ", "; } \
stream << " ]\n"; \
}

◆ GC_PRINT_VECTOR

#define GC_PRINT_VECTOR
Value:
char const * pre = "[ "; \
for ( auto const & vi : v ) \
{ stream << pre << vi; pre = ", "; } \
stream << " ]\n"