Concept Framework 2.0 documentation Contents | Index

MultiItems.FindSortedPlace

Name Type Access Version Deprecated
FindSortedPlace function static version 1.0 no

Prototype:
static function FindSortedPlace(arr, sort_column, element, direction)

Parameters:
arr      array of MultiItems.
sort_column      the number of the column in the array to use as the sort column
element      an array or an element that need to be added the the array (arr parameter)
direction      1 for ascending, anything else for descending

Description:
This function finds the position to add an element, in order to keep the array sorted. It uses a simple binary search in order to get better timings.

Returns:
Returns the position in which the element can be inserted into the array.

Documented by Eduard Suica, generation time: Fri Jan 21 18:06:11 2011 GMT(c)2011 RadGs Software