This function adds the constant value x to the elements of the vector a, a0i = ai + x.
| 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) { |
| 605 | for (int i = 0; i < (int)a.size(); i++) { |
| 606 | a[i] += b; |
| 607 | } |
| 608 | } |
| 609 | //This function evaluate standard diviation supposing that E(a) = b. |
| 610 | float sd(std::vector<float>& a, float const b) { |
| 611 | if (a.size() == 0) |
no outgoing calls
no test coverage detected