Skip to content
Snippets Groups Projects
Commit 94cff5f1 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber Committed by Tomáš Oberhuber
Browse files

Renaming Vector_impl.h to Vector.hpp and deleting vector operation functions.

parent 6dbb8715
No related branches found
No related tags found
1 merge request!29Revision
......@@ -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>
......@@ -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 >
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment