Template Function otyca::multiply

Function Documentation

template<typename T>
void otyca::multiply(const std::vector<T> &v, int times)

Multiplies the vector by a specified number of times.

This function resizes the vector and duplicates its elements a given number of times. The vector will be copied multiple times depending on the value of times.

Template Parameters:

T – The type of the elements in the vector (e.g., int, float).

Parameters:
  • v – The input vector to be multiplied.

  • times – The number of times to duplicate the vector.