|
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 Dictionary has been previously sorted, the binarySearch function is an
efficient way to determine if a specific key exists in the Dictionary and if exists,
what location in the Dictionary it exists.
(binarySearch dict searchkey) Returns the Boolean value false if not found.
Otherwise returns a integer index of the location in the
dictionary where the key was found.
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Example_Dictionary_binarySearch_002
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 dict A predefined Dictionary variable or constant. Dictionary searchKey A symbolic key which you want to find in the Dictionary. Symbol
Returns:
Examples
Argument Types
Vector
Matrix
String
Text
Symbol
Integer
Boolean
FltVector
IntVector
NumVector
ShortVector
ObjVector
How do I contact the AIS team?