Class DenseRingVectorNorms
java.lang.Object
org.flag4j.linalg.ops.dense.ring_ops.DenseRingVectorNorms
-
Method Summary
-
Method Details
-
norm
Computes the 2-norm of a vector.- Parameters:
src
- Entries of the vector (or non-zero data if vector is sparse).- Returns:
- The 2-norm of the vector.
-
norm
Computes thep
-norm of a vector.- Parameters:
src
- Entries of the vector (or non-zero data if vector is sparse).p
- Thep
value in thep
-norm.
- Ifp
isDouble.POSITIVE_INFINITY
, then this method computes the maximum/infinite norm.
- Ifp
isDouble.NEGATIVE_INFINITY
, then this method computes the minimum norm.
Warning, ifp
is large in absolute value, overflow errors may occur.- Returns:
- The
p
-norm of the vector.
-