norms documentation

Add your content using reStructuredText syntax. See the reStructuredText documentation for details.

demo.norms.euclidean(x)

Computes the Euclidean (L2) norm of a vector x.

Args:

x (list of float): Input vector.

Returns:

float: The Euclidean norm of the vector.

demo.norms.infinity(x)

Computes the Infinity (L∞) norm of a vector x.

Args:

x (list of float): Input vector.

Returns:

float: The Infinity norm of the vector.

demo.norms.manhattan(x)

Computes the Manhattan (L1) norm of a vector x.

Args:

x (list of float): Input vector.

Returns:

float: The Manhattan norm of the vector.

demo.norms.sparse(x)

Computes the Sparsity (L0) norm of a vector x.

Args:

x (list of float): Input vector.

Returns:

float: The Sparsity norm of the vector.