Appends the spacing between elements for a given dim onto a result string
| 1109 | |
| 1110 | // Appends the spacing between elements for a given dim onto a result string |
| 1111 | void PrintDimSpacing(int dim_index, int num_dims, string* result) { |
| 1112 | if (dim_index == num_dims - 1) { |
| 1113 | strings::StrAppend(result, " "); |
| 1114 | return; |
| 1115 | } |
| 1116 | for (int j = 0; j < num_dims - dim_index - 1; j++) { |
| 1117 | strings::StrAppend(result, "\n"); |
| 1118 | } |
| 1119 | for (int j = 0; j <= dim_index; j++) { |
| 1120 | strings::StrAppend(result, " "); |
| 1121 | } |
| 1122 | } |
| 1123 | |
| 1124 | // Print from left dim to right dim recursively. |
| 1125 | template <typename T> |
no test coverage detected