32 template<
class KeyType,
class DataType>
40 template<
class KeyType,
class DataType>
48 template<
class KeyType,
class DataType>
51 const PrintTable<KeyType, DataType>& table
61 template<
class KeyType,
class DataType>
66 const bool printAverage
69 HashTable<Map<DataType>, KeyType> combinedTable;
79 label largestKeyLength = 6;
80 label largestDataLength = 0;
86 const HashTableData& procIData = procData[proci];
90 if (!combinedTable.found(iter.key()))
99 Map<DataType>& key = combinedTable[iter.key()];
101 key.insert(proci, iter.val());
105 std::ostringstream buf;
106 buf << dataIter.val();
108 largestDataLength =
max
111 label(buf.str().length())
115 std::ostringstream buf;
118 largestKeyLength =
max
121 label(buf.str().length())
126 os.width(largestKeyLength);
129 os.
width(largestKeyLength);
135 os.width(largestDataLength);
142 os.width(largestDataLength);
149 os.width(largestDataLength);
155 const List<KeyType>& sortedTable = combinedTable.sortedToc();
159 const Map<DataType>& procDataList
160 = combinedTable[sortedTable[keyI]];
162 os.width(largestKeyLength);
163 os <<
indent << sortedTable[keyI];
165 forAll(procDataList, elemI)
168 os.width(largestDataLength);
169 os << procDataList[elemI];
175 forAll(procDataList, elemI)
177 sum += procDataList[elemI];
181 os.width(largestDataLength);
187 os.width(largestDataLength);