This function multiplies the elements of vector a by the constant factor x, a0i = xai.
| 595 | } |
| 596 | //This function multiplies the elements of vector a by the constant factor x, a0i = xai. |
| 597 | void vector_scale(std::vector<float>& a, float const b) { |
| 598 | for (int i = 0; i < (int)a.size(); i++) { |
| 599 | a[i] *= b; |
| 600 | } |
| 601 | } |
| 602 | |
| 603 | //This function adds the constant value x to the elements of the vector a, a0i = ai + x. |
| 604 | void vector_add_constant(std::vector<float>& a, float const b) { |
no outgoing calls
no test coverage detected