|
binarySearch
|
The binarySearch function performs a binary search for the key
value in the specified Object. If a matching value is found, the index
of the matching value is returned; otherwise false is returned. When to use When a Vector has been previously sorted in ascending order, the binarySearch function is an
efficient way to determine if a specific value exists in the Vector and if exists,
what location in the Vector it exists.
(binarySearch vector searchValue) Returns a Boolean value false if not found. Otherwise returns a integer index
of the location in the Vector where the value was found.
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Example_FltVector_binarySearch_005
Here are the links to the data types of the function arguments. Here are also a number of links to functions having arguments with any of these data types.
You can always talk with the AIS at aiserver.sourceforge.net.
Name
Description
AIS Types vector A predefined Vector variable or constant. Vector FltVector IntVector NumVector ObjVector ShortVector searchValue value to be searched String Text Integer
Returns:
Examples
Argument Types
Vector
Matrix
String
Text
Symbol
Integer
Boolean
FltVector
IntVector
NumVector
ShortVector
ObjVector
How do I contact the AIS team?