void dbm_print(FILE* out, const raw_t *dbm, cindex_t dim) { if (dbm) { OUT2OS(); dbm_cppPrint(os, dbm, dim); } }
std::ostream& dbm_cppPrintFederation(std::ostream& out, const DBMList_t *dbmList, cindex_t dim) { out << "{\n"; while(dbmList) { dbm_cppPrint(out, dbmList->dbm, dim); dbmList = dbmList->next; if (dbmList) out << '\n'; } return out << "}\n"; }
std::ostream& operator << (std::ostream& os, const dbm::fed_t& fed) { size_t size = fed.size(); cindex_t dim = fed.getDimension(); if (size == 0) { return _ruby_format ? os << "Fed(" << dim << ") {}" : os << size << " DBM " << dim << 'x' << dim << "{}"; } if (_ruby_format) { os << "Fed(" << dim << ") {"; if (size > 1) { os << "[\n" << _print_prefix; } os << " matrix\\\n"; } else { os << size << (size > 1 ? " DBMs " : " DBM ") << dim << 'x' << dim << " {\n"; } if (dim == 1) { assert(!fed.isEmpty()); dbm_cppPrintRaw(os, dbm_LE_ZERO); if (_ruby_format) { return os << " }"; } os << '\n'; } else { for(dbm::fed_t::const_iterator iter(fed); !iter.null(); ) { dbm_cppPrint(os, iter(), dim); ++iter; if (!iter.null()) { os << _print_prefix << (_ruby_format ? ",matrix\\\n" : ",\n"); } } } return os << _print_prefix << (_ruby_format && size > 1 ? "]}" : "}"); }
void pdbm_print(std::ostream &o, const PDBM pdbm, cindex_t dim) { int32_t infimum = pdbm_getInfimum(pdbm, dim); dbm_cppPrint(o, pdbm_matrix(pdbm), dim); o << "Rates:"; for (cindex_t i = 1; i < dim; i++) { o << ' ' << pdbm_getRate(pdbm, dim, i); } o << '\n' << "Offset: " << pdbm_cost(pdbm) << " Infimum: " << infimum << '\n'; }
std::ostream& operator << (std::ostream& os, const dbm::dbm_t& dbm) { return dbm_cppPrint(os, dbm(), dbm.getDimension()); }
void Clocks::print_m( std::ostream& o ) const { dbm_cppPrint( o, data, dim ); }