MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / getMaxWidthOfColumns

Function getMaxWidthOfColumns

quest/src/core/printer.cpp:615–629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

613
614
615vector<size_t> getMaxWidthOfColumns(stringmatr upper, stringmatr lower) {
616
617 if (upper.empty())
618 return {};
619
620 size_t numCols = upper[0].size(); // matches lower, unless lower empty
621 vector<size_t> maxWidths(numCols, 0);
622
623 for (size_t c=0; c<numCols; c++)
624 maxWidths[c] = std::max(
625 getMaxWidthOfColumn(upper, c),
626 getMaxWidthOfColumn(lower, c)); // 0 if lower empty
627
628 return maxWidths;
629}
630
631
632void expandMaxWidthsAccordingToLabels(vector<size_t> &widths, vector<string> &labels) {

Callers 1

Calls 1

getMaxWidthOfColumnFunction · 0.85

Tested by

no test coverage detected