Matrix.NormC Method

Overload List

#SignatureDescription
1function NormC: Double;The C-norm of calling Matrix.
└ indexed: function NormC(Index: Integer; Len: Integer): Double;
2function NormC(const Vec: TDenseMtxVec; RelativeError: Boolean): Double;The C-norm.
└ indexed: function NormC(const Vec: TDenseMtxVec; VecIndex: Integer; Index: Integer; Len: Integer; RelativeError: Boolean): Double;

Overload 1: function NormC: Double;

The C-norm of calling Matrix.

Returns: Double

Remarks:

Computes:

NormC = max|a[i]|, 0 < i < Length-1

Indexed: function NormC(Index: Integer; Len: Integer): Double;

Calculates the C norm from calling Matrix elements [Index]..[Index+Len-1].

#NameTypeDescription
1IndexIntegerstart index
2LenIntegerelement count

Returns: Double

Overload 2: function NormC(const Vec: TDenseMtxVec; RelativeError: Boolean): Double;

The C-norm.

#NameTypeDescription
1VecTDenseMtxVec
2RelativeErrorBoolean

Returns: Double

Remarks:

Calculates the C norm: ||V-Vec||, where V is the calling Matrix. If the NormC is called without any parameters, the NormC calculates the norm of the calling Matrix. The C norm of ||V-Vec|| is defined by the formula:

VVecC=maxkV[k]Vec[k]\|\text{V} - \text{Vec}\| _C = \max _k |\text{V}[k]-\text{Vec}[k]|

If RelativeError is true then the computed norm is divided by the norm of V, and the function returns the "relative error":

VVecV\frac{\| \text{V} - \text{Vec}\|}{\|\text{V}\|}
Examples
var a,b: Matrix;
    c: double;
begin
    a.SetIt(1,4,False,[1,2,3,4]);
    b.SetIt(1,4,False,[4,3,2,1]);
    c := a.NormC(b,False);
end;
See Also: Matrix.NormL1, Matrix.NormL2

Indexed: function NormC(const Vec: TDenseMtxVec; VecIndex: Integer; Index: Integer; Len: Integer; RelativeError: Boolean): Double;

Calculates the C norm ||V-Vec|| between Vec elements [VecIndex]..[VecIndex+Len-1] and calling Matrix elements [Index]..[Index+Len-1].

#NameTypeDescription
1VecTDenseMtxVec
2VecIndexInteger
3IndexIntegerstart index
4LenIntegerelement count
5RelativeErrorBoolean

Returns: Double