You are here: Symbol Reference > MtxExpr Namespace > Classes > Vector Record > public > Equal Operator > Vector.Equal Method (TMtxVec, double)
MtxVec VCL
ContentsIndex
PreviousUpNext
Vector.Equal Method (TMtxVec, double)

Compares vector elements and returns true if vectors are equal.

Pascal
function Equal(const Vec: TMtxVec; Tolerance: double = 0): boolean; overload;

Compares vector elements and returns true if vectors are equal, that is if all elements match in position and value. The Tolerance parameter defines the comparison tolerance. The maximum difference between elements may not exceed: +/-Tolerance.

var A,B: Matrix; c: boolean; begin A.SetIt(2,2,false,[1,2, 2,4]); // 2x2 real matrix B.SetIt(2,2,false,[1,2, 2,4]); // 2x2 real matrix c := A.Equal(B,1e-8); // Check for differences bigger than 0.00000001 c := A.Equal(B); // Check for exact match end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!