You are here: Symbol Reference > clMtxExpr Namespace > Classes > clVector Record > public > NormC Method > clVector.NormC Method (TOpenCLMtxVec, boolean)
MtxVec VCL
ContentsIndex
PreviousUpNext
clVector.NormC Method (TOpenCLMtxVec, boolean)

The C-norm.

Pascal
function NormC(const Vec: TOpenCLMtxVec; RelativeError: boolean = false): double; overload;

C norm: ||V-Vec||, where V is the calling vector.

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

 

 

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

 

 

 

var a,b: clVector; c: double; begin a.CopyFromArray(TDoubleArray.Create(1,2,3,4)); b.CopyFromArray(TDoubleArray.Create(4,3,2,1)); c := a.NormC(b); end;
Examples on GitHub
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!