|
binaryInsert
|
The binaryInsert Function destructively inserts the specified new value
into the Vector at the proper location to preserve ascending sort order.
The Vector is increased in size to accommodate the new value.
If a matching value is already in the Vector, no insertion is made. Since there is always a matching object, either before or after insertion,
the binaryInsert function always returns the index of the newly inserted
value or the location of the matched object. When to use Normally a vector is not maintained in sort order, but can be sorted by
invoking the sort function. If a vector has been sorted,
the binaryInsert function should be used to add new values to the vector
and preserve the sort order. The binaryInsert function assumes sorted
ascending order only.
(binaryInsert vector newValue) The index where the new key was installed.
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Example_ShortVector_binaryInsert_006
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 BitVector ShortVector newValue The new value to be installed in the Vector. Character String Symbol Vector BitVector Brick ByteVector IntVector
FltVector ObjVector Structure Dictionary Directory
Matrix NumMatrix Integer Float Number Complex Boolean
Returns:
Examples
Argument Types
Character
String
Symbol
Vector
BitVector
Brick
ByteVector
IntVector
ShortVector
FltVector
ObjVector
Structure
Dictionary
Directory
CpxVector
Matrix
NumMatrix
Integer
Float
Number
Complex
Boolean
How do I contact the AIS team?