| 75 | } |
| 76 | |
| 77 | void AppendArrayToString(const int64_t size, |
| 78 | const double* x, |
| 79 | std::string* result) { |
| 80 | for (int64_t i = 0; i < size; ++i) { |
| 81 | if (x == nullptr) { |
| 82 | StringAppendF(result, "Not Computed "); |
| 83 | } else { |
| 84 | if (x[i] == kImpossibleValue) { |
| 85 | StringAppendF(result, "Uninitialized "); |
| 86 | } else { |
| 87 | StringAppendF(result, "%12g ", x[i]); |
| 88 | } |
| 89 | } |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | void MapValuesToContiguousRange(const int64_t size, int* array) { |
| 94 | std::vector<int> unique_values(array, array + size); |
no test coverage detected