MCPcopy Create free account
hub / github.com/Simple-Robotics/aligator / vectorMultiplyAdd

Function vectorMultiplyAdd

include/aligator/math.hpp:226–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224template <typename TA, typename AA, typename TB, typename BA, typename OutType,
225 typename AOut, typename Scalar>
226void vectorMultiplyAdd(const std::vector<TA, AA> &a,
227 const std::vector<TB, BA> &b,
228 std::vector<OutType, AOut> &c, const Scalar alpha) {
229 assert(a.size() == b.size());
230 assert(a.size() == c.size());
231 const std::size_t N = a.size();
232 for (std::size_t i = 0; i < N; i++) {
233 c[i] = a[i] + alpha * b[i];
234 }
235}
236
237} // namespace math
238} // namespace aligator

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected