MCPcopy Create free account
hub / github.com/BoevaLab/FREEC / vector_scale

Function vector_scale

src/myFunc.cpp:597–601  ·  view source on GitHub ↗

This function multiplies the elements of vector a by the constant factor x, a0i = xai.

Source from the content-addressed store, hash-verified

595}
596//This function multiplies the elements of vector a by the constant factor x, a0i = xai.
597void 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.
604void vector_add_constant(std::vector<float>& a, float const b) {

Callers 1

findnextbreakpointFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected