ILNumerics Ultimate VS

ILMathnorm Method (InArraySingle, Single)

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Vector or matrix norm.

[ILNumerics Computing Engine]

Namespace:  ILNumerics
Assembly:  ILNumerics.Computing (in ILNumerics.Computing.dll) Version: (5.5.7503.3146)

public static RetArray<float> norm(
	InArray<float> A,
	float degree = 2f


Type: ILNumericsInArraySingle
Input matrix or vector.
degree (Optional)
Type: SystemSingle
[Optional] Degree of the norm. Default: 2.

Return Value

Type: RetArraySingle
Array of same type as input array A.

For vectors, degree must be one of:
  • 0 : returns sqrt(sum(A * A))
  • System.float.PositiveInfinity: returns max(abs(A))
  • System.float.NegativeInfinity: returns min(abs(A))
  • other float values: returns sum(pow(abs(A),degree))^(1/degree)
For matrices degree must be one of:
  • 0: returns Frobenius norm: sqrt(sum(diag(multiply(A, A.T))))
  • 1: returns 1-norm, max(sum(abs(A)))
  • 2: returns the largest singular value of A, max(svd(A))
  • PositiveInfinity: returns maxall(sum(abs(A), 1)), the largest value of the sums along the rows

norm(A,0) with A being a vector extends naturally to the frobenius norm for matrices.

For empty arrays A, scalar 0 is returned.

[ILNumerics Computing Engine]

See Also