@Deprecated
private IntOpenHashSet getNonProjectiveMapAux(IntObjectOpenHashMap<IntOpenHashSet> map)
{
IntIntPair max = new IntIntPair(-1, -1);
IntOpenHashSet set, remove;
boolean removed;
int[] keys;
do
{
max.set(-1, -1);
keys = map.keys().toArray();
Arrays.sort(keys);
for (int key : keys)
{
set = map.get(key);
if (set.size() > max.i2)
max.set(key, set.size());
}
removed = false;
if (max.i2 > 0)
{
remove = new IntOpenHashSet();
for (IntCursor cur : map.get(max.i1))
{
if (map.containsKey(cur.value))
{
set = map.get(cur.value);
if (set.contains(max.i1))
{
removed = true;
set.remove(max.i1);
if (set.isEmpty()) remove.add(cur.value);
}
}
}
for (IntCursor cur : remove)
map.remove(cur.value);
}
}
while (removed);
return new IntOpenHashSet(map.keys());
}