API  0.9.10
CPIndexSet.j File Reference
#include "Foundation.h"
+ Include dependency graph for CPIndexSet.j:

Go to the source code of this file.

Variables

var assumedPositionOfIndex
 
var CPIndexSetCountKey = @"@"CPIndexSetCountKey"
 
var CPIndexSetRangeStringsKey = @"@"CPIndexSetRangeStringsKey"
 
var positionOfIndex
 

Variable Documentation

◆ assumedPositionOfIndex

var assumedPositionOfIndex

Definition at line 1113 of file CPIndexSet.j.

◆ CPIndexSetCountKey

var CPIndexSetCountKey = @"@"CPIndexSetCountKey"

Definition at line 999 of file CPIndexSet.j.

◆ CPIndexSetRangeStringsKey

var CPIndexSetRangeStringsKey = @"@"CPIndexSetRangeStringsKey"

Definition at line 1000 of file CPIndexSet.j.

◆ positionOfIndex

var positionOfIndex
Initial value:
= function(ranges, anIndex)
{
var low = 0,
high = ranges.length - 1;
while (low <= high)
{
var middle = FLOOR(low + (high - low) / 2),
range = ranges[middle];
if (anIndex < range.location)
high = middle - 1;
else if (anIndex >= CPMaxRange(range))
low = middle + 1;
else
return middle;
}
return CPNotFound;
}
function CPMaxRange(aRange)
Definition: CPRange.j:70
CPNotFound
Definition: CPObjJRuntime.j:62

Definition at line 1090 of file CPIndexSet.j.