einsums::linear_algebra::vec_norm#

Note

Generated from the C++ headers by apiary --emit-cpp-docs-json.

Defined in header Einsums/LinearAlgebra.hpp.

template<TensorConcept AType>
RemoveComplexT<typename AType::ValueType> vec_norm(const AType &a)#

Compute the Euclidean norm of a vector. For higher-rank tensors, this is the same as taking the square root of the sum of the squares of all of the elements.

Added in version 1.0.0.

Changed in version 2.0.0: Can now handle non-unit strides and both row- and colum-major layouts.

Template Parameters:

AType – The type of the input tensor.

Parameters:

a – The tensor to handle.

Returns:

The vector norm of the tensor.