When using LongSet.of() with an array size > 4, an exception is thrown:
java.lang.IllegalArgumentException: Load factor must be greater than 0 and smaller than 1
at it.unimi.dsi.fastutil.longs.LongOpenHashSet.<init>(LongOpenHashSet.java:73)
at it.unimi.dsi.fastutil.longs.LongSet.of(LongSet.java:195)
This is due to a load factor of 1 being used and the constructor of LongOpenHashSet throwing an exception for that:
if (f <= 0 || f >= 1) throw new IllegalArgumentException("Load factor must be greater than 0 and smaller than 1");
The latter is probably the actual bug and should be "f > 1" instead.
No, actually the 1.0f is a bit crazy. Such sets could be horribly slow. git blame claims I did this but I have no memory. Commit 40ddda60d69c75cf6aa105028ab94672b7a9a454 should fix the problem.
When using LongSet.of() with an array size > 4, an exception is thrown:
This is due to a load factor of 1 being used and the constructor of LongOpenHashSet throwing an exception for that:
if (f <= 0 || f >= 1) throw new IllegalArgumentException("Load factor must be greater than 0 and smaller than 1");
The latter is probably the actual bug and should be "f > 1" instead.