You are here: Symbol Reference > MtxExpr Namespace > Classes > Matrix Record > public > BinarySearch Method > Matrix.BinarySearch Method (double)
MtxVec VCL
ContentsIndex
PreviousUpNext
Matrix.BinarySearch Method (double)

Finds a match for X in sorted object values using binary search.

Pascal
function BinarySearch(const X: double): Integer; overload;

the Index of last matched element. If no matching elements are found, the result is -1.

The data in the vector must be sorted in ascending order for this function to work correctly.

Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!