private _withPositionsOfInInterval ( IList aCollection, int start, int end ) : |
||
aCollection | IList | |
start | int | |
end | int | |
return |
private Hashtable _withPositionsOfInInterval(IList aCollection, int start, int end)
{
Hashtable d = new Hashtable(comparer);
for (int index = start; index <= end; index++)
{
object element = aCollection[index];
if (d.ContainsKey(element))
{
IntList list = (IntList) d[element];
list.Add(index);
}
else
{
IntList list = new IntList {index};
d[element] = list;
}
}
foreach (IntList list in d.Values)
{
list.Reverse();
}
return d;
}