diff --git a/src/TNL/Containers/Vector.h b/src/TNL/Containers/Vector.h index 9b9d06d8f8f804dfa1c6544e3d40c8df1af8baf5..30e399312afc584d5f053de6d8792e4bd0064d13 100644 --- a/src/TNL/Containers/Vector.h +++ b/src/TNL/Containers/Vector.h @@ -305,156 +305,7 @@ public: void computeExclusivePrefixSum( const IndexType begin, const IndexType end ); }; -/** - * \brief Returns the maximum value out of all vector elements. - * - */ -template< typename Real, - typename Device, - typename Index, - typename ResultType = Real > -ResultType max( const Vector< Real, Device, Index>& v ); - -/** - * \brief Returns the minimum value out of all vector elements. - * - */ -template< typename Real, - typename Device, - typename Index, - typename ResultType = Real > -ResultType min( const Vector< Real, Device, Index>& v ); - -/** - * \brief Returns the maximum absolute value out of all vector elements. - * - */ -template< typename Real, - typename Device, - typename Index, - typename ResultType = Real > -ResultType absMax( const Vector< Real, Device, Index>& v ); - -/** - * \brief Returns the minimum absolute value out of all vector elements. - * - */ -template< typename Real, - typename Device, - typename Index, - typename ResultType = Real > -ResultType absMin( const Vector< Real, Device, Index>& v ); - -/** - * \brief Returns the length of this vector in p-dimensional vector space. - * - * \tparam - * \param p Number specifying the dimension of vector space. - * - */ -template< typename Real, - typename Device, - typename Index, - typename Scalar, - typename ResultType = Real > -ResultType lpNorm( const Vector< Real, Device, Index>& v, const Scalar p ); - -/** - * \brief Returns sum of all vector elements. - * - */ -template< typename Real, - typename Device, - typename Index, -template< typename ResultType = RealType > -ResultType sum( const Vector< Real, Device, Index>& v ); - -/** - * \brief Returns maximal difference between elements of this vector and vector \e v. - * - * \tparam Vector Type of vector. - * \param v Reference to another vector of the same size as this vector. - * - */ -template< typename Real, - typename Device, - typename Index, - typename Vector_, - typename ResultType = Real> -ResultType differenceMax( const Vector< Real, Device, Index>& v, const Vector_& v2 ); - -/** - * \brief Returns minimal difference between elements of this vector and vector \e v. - * - * \tparam Vector Type of vector. - * \param v Reference to another vector of the same size as this vector. - * - */ -template< typename Real, - typename Device, - typename Index, - typename Vector_, - typename ResultType = Real > -ResultType differenceMin( const Vector< Real, Device, Index>& v, const Vector& v2 ); - -/** - * \brief Returns maximal absolute difference between elements of this vector and vector \e v. - * - * \tparam Vector Type of vector. - * \param v Reference to another vector of the same size as this vector. - * - */ -template< typename Real, - typename Device, - typename Index, - typename Vector_, - typename ResultType = Real > -ResultType differenceAbsMax( const Vector< Real, Device, Index>& v, const Vector& v2 ); - -/** - * \brief Returns minimal absolute difference between elements of this vector and vector \e v. - * - * \tparam Vector Type of vector. - * \param v Reference to another vector of the same size as this vector. - * - */ -template< typename Real, - typename Device, - typename Index, - typename Vector_ > -Real differenceAbsMin( const Vector< Real, Device, Index>& v, const Vector& v2 ); - -/** - * \brief Returns difference between L^p norms of this vector and vector \e v. - * - * See also \ref lpNorm. - * - * \param v Reference to another vector. - * \param p Number specifying the dimension of vector space. - * - */ -template< typename Real, - typename Device, - typename Index, - typename Vector_, - typename Scalar, - typename ResultType = RealType > -ResultType differenceLpNorm( const Vector< Real, Device, Index>& v, const Vector& v2, const Scalar p ); - -/** - * \brief Returns difference between sums of elements of this vector and vector \e v. - * - * \param v Reference to another vector. - * - */ -template< typename Real, - typename Device, - typename Index, - typename Vector_, - typename ResultType = RealType > -ResultType differenceSum( const Vector< Real, Device, Index>& v, const Vector& v2 ); - } // namespace Containers } // namespace TNL -#include <TNL/Containers/Vector_impl.h> +#include <TNL/Containers/Vector.hpp> diff --git a/src/TNL/Containers/Vector_impl.h b/src/TNL/Containers/Vector.hpp similarity index 99% rename from src/TNL/Containers/Vector_impl.h rename to src/TNL/Containers/Vector.hpp index 5cd8c8df6e085ab1e734a3bf4cdec47617aa1ab0..5f15d9bae5fc6d0527943f8b4245b6f94379fec3 100644 --- a/src/TNL/Containers/Vector_impl.h +++ b/src/TNL/Containers/Vector.hpp @@ -212,7 +212,6 @@ ResultType Vector< Real, Device, Index >::lpNorm( const Scalar p ) const return Algorithms::VectorOperations< Device >::template getVectorLpNorm< Vector, ResultType >( *this, p ); } - template< typename Real, typename Device, typename Index > @@ -222,7 +221,6 @@ ResultType Vector< Real, Device, Index >::sum() const return Algorithms::VectorOperations< Device >::template getVectorSum< Vector, ResultType >( *this ); } - template< typename Real, typename Device, typename Index > @@ -232,7 +230,6 @@ Real Vector< Real, Device, Index >::differenceMax( const VectorT& v ) const return Algorithms::VectorOperations< Device >::getVectorDifferenceMax( *this, v ); } - template< typename Real, typename Device, typename Index >