Class CooRingNorms
java.lang.Object
org.flag4j.linalg.ops.sparse.coo.ring_ops.CooRingNorms
This utility class contains low level implementations of norms for sparse COO ring tensors, matrices and vectors.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Ring<T>>
doublematrixNormL22
(AbstractCooRingMatrix<?, ?, ?, T> src) Computes the L2, 2 norm of a matrix.static <T extends Ring<T>>
doublematrixNormLpq
(AbstractCooRingMatrix<?, ?, ?, T> src, double p, double q) Computes the Lp, q norm of a matrix.
-
Method Details
-
matrixNormL22
Computes the L2, 2 norm of a matrix. Also called the Frobenius norm.- Parameters:
src
- Source matrix to compute norm of.- Returns:
- The L2, 2 of the
src
matrix.
-
matrixNormLpq
public static <T extends Ring<T>> double matrixNormLpq(AbstractCooRingMatrix<?, ?, ?, T> src, double p, double q) Computes the Lp, q norm of a matrix.- Parameters:
src
- Source matrix to compute norm of.p
- First parameter for Lp, q norm- Returns:
- The Lp, q of the
src
matrix.
-