NMath User's Guide

TOC | Previous | Next | Index

5.4 Logical Operations on Vectors (.NET, C#, CSharp, VB, Visual Basic, F#)

Operator == tests for equality of two vectors, and returns true if both vectors have the same dimensions and all values are equal; otherwise, false. Following the convention of the .NET Framework, if both objects are null, they test equal. The comparison of the values for DoubleVector and DoubleComplexVector is done using operator == for doubles; comparison of the values for FloatVectorand FloatComplexVector is done using operator == for floats. Therefore, the values of the vectors must be exactly equal for this method to return true. Operator != returns the logical negation of ==.

The Equals() member function also tests for equality. NaNEquals() ignores values that are Not-a-Number (NaN).


Top

Top