|
binaryInsert
|
The binaryInsert Function destructively inserts the specified new value
into the NumMatrix at the proper location to preserve ascending sort order.
The NumMatrix is increased in size to accommodate the new value.
If a matching value is already in the NumMatrix , 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.
Note: Returns an error message if the NumMatrix is not of rank one.
Normally a NumMatrix is not maintained in sort order, but can be sorted by invoking the sort function. If a NumMatrix has been sorted in ascending order, the binaryInsert function should be used to add new values to the Matrix and preserve the sort order. The binaryInsert function assumes sorted ascending order only.
(binaryInsert nummatrix 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_NumMatrix_binaryInsert_007
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 nummatrix a previously sorted Matrix NumMatrix newValue The new value to be installed in the NumMatrix. 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?