Perform an absolute comparison of two matrices by unfolding successive rows into one-dimensional vectors.
int vector::Compare(
|
Parameters
vec
[in] Vector to compare.
mat
[in] Matrix to compare.
Method description
Let us have two matrices: matrix A the method is called for and matrix B, which is passed as a method parameter. The comparison is performed as follows:
Return Value
-1 — if the matrix A element is less than the corresponding matrix B element.
0 — if all elements of A and B matrices are identical.
1 — if the matrix A element exceeds the corresponding matrix B element.
Note
NaN value elements are taken into account when comparing.
NaN value elements are considered equal if they are present in both matrices at corresponding positions.
The NaN sign is not taken into account in the comparison.
An element with a NaN value is considered to be less than any other numeric value.
Example
//+------------------------------------------------------------------+
|