Template Function librapid::pow(const GenericVector<Scalar, Dims>&, T)#

Function Documentation#

template<typename Scalar, int64_t Dims, typename T>
GenericVector<Scalar, Dims> librapid::pow(const GenericVector<Scalar, Dims> &vec, T exp)#

Raise each element of a vector to the power of a scalar and return the result

Template Parameters
  • Scalar – The scalar type of the vector

  • Dims – The dimensionality of the vector

  • StorageType – The storage type of the vector

  • T – The scalar type of the exponent

Parameters
  • vec – Base vector

  • exp – Scalar exponent

Returns

The result of raising each element of the vector to the power of the scalar