| 221 | } |
| 222 | |
| 223 | std::string sample_points_f32(const std::vector<float> & values) { |
| 224 | if (values.empty()) { |
| 225 | return "[]"; |
| 226 | } |
| 227 | const std::vector<size_t> points = sample_point_indices(values.size()); |
| 228 | std::ostringstream oss; |
| 229 | oss << "["; |
| 230 | for (size_t i = 0; i < points.size(); ++i) { |
| 231 | if (i != 0) { |
| 232 | oss << ","; |
| 233 | } |
| 234 | const size_t index = points[i]; |
| 235 | oss << index << ":" << values[index]; |
| 236 | } |
| 237 | oss << "]"; |
| 238 | return oss.str(); |
| 239 | } |
| 240 | |
| 241 | std::string sample_points_i32(const std::vector<int32_t> & values) { |
| 242 | if (values.empty()) { |
no test coverage detected