| 181 | } |
| 182 | |
| 183 | void euler_step_in_place( |
| 184 | std::vector<float> & x, |
| 185 | const std::vector<float> & velocity, |
| 186 | float dt) { |
| 187 | if (x.size() < velocity.size()) { |
| 188 | throw std::runtime_error("Euler step state/velocity size mismatch"); |
| 189 | } |
| 190 | for (size_t i = 0; i < velocity.size(); ++i) { |
| 191 | x[i] -= velocity[i] * dt; |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | std::vector<float> denoise_from_velocity( |
| 196 | const std::vector<float> & x, |
no test coverage detected