addVV method
Returns pointwise sum of vec1
and vec2
in a new vector.
Implementation
List<double> addVV(List<double> vec1, List<double> vec2) {
List<double> result = List(vec1.length);
for (int i = 0; i < vec1.length; i++) {
result[i] = vec1[i] + vec2[i];
}
return result;
}