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

Namespaces

namespace  GC_namespace
 

Macros

#define GC_PRINT_VECTOR(VDATA)
 
#define GC_PRINT_MATRIX(MDATA)
 

Macro Definition Documentation

◆ GC_PRINT_MATRIX

#define GC_PRINT_MATRIX ( MDATA)
Value:
unsigned NR{M.num_rows()}; \
unsigned NC{M.num_cols()}; \
stream << "[\n"; \
string pre0 = prefix1+"[ "; \
for ( unsigned j{0}; j < NC; ++j ) { \
string pre{pre0}; \
for ( unsigned i{0}; i < NR; ++i ) \
{ stream << pre << MDATA; pre = ", "; } \
pre0 = " ],\n"+prefix1+"[ "; \
} \
stream << " ]\n" << prefix << "]"

◆ GC_PRINT_VECTOR

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