ipa: libipa: vector: Rename the dot product operator*() to dot()
The Vector class defines a set of arithmetic operators between two vectors or a vector and a scalar. All the operators perform element-wise operations, except for the operator*() that computes the dot product. This is inconsistent and confusing. Replace the operator with a dot() function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
This commit is contained in:
@@ -78,13 +78,6 @@ namespace ipa {
|
||||
* \return The sum of the two vectors
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn Vector::operator*(const Vector<T, Rows> &other) const
|
||||
* \brief Compute the dot product
|
||||
* \param[in] other The other vector
|
||||
* \return The dot product of the two vectors
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn Vector::operator*(T factor) const
|
||||
* \brief Multiply the vector by a scalar
|
||||
@@ -99,6 +92,13 @@ namespace ipa {
|
||||
* \return The vector divided by \a factor
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn Vector::dot(const Vector<T, Rows> &other) const
|
||||
* \brief Compute the dot product
|
||||
* \param[in] other The other vector
|
||||
* \return The dot product of the two vectors
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn constexpr T &Vector::x()
|
||||
* \brief Convenience function to access the first element of the vector
|
||||
|
||||
Reference in New Issue
Block a user