/** * Creates a new hash set and fills it with the elements of a given array. * * @param a * an array whose elements will be used to fill the set. * @param offset * the first element to use. * @param length * the number of elements to use. * @param f * the load factor. * @param strategy * the strategy. */ public DoubleOpenCustomHashSet(final double[] a, final int offset, final int length, final float f, final it.unimi.dsi.fastutil.doubles.DoubleHash.Strategy strategy) { this(length < 0 ? 0 : length, f, strategy); DoubleArrays.ensureOffsetLength(a, offset, length); for (int i = 0; i < length; i++) add(a[offset + i]); } /**
/** * Creates a new hash set using elements provided by a type-specific iterator. * * @param i * a type-specific iterator whose elements will fill the set. * @param f * the load factor. * @param strategy * the strategy. */ public DoubleOpenCustomHashSet(final DoubleIterator i, final float f, final it.unimi.dsi.fastutil.doubles.DoubleHash.Strategy strategy) { this(DEFAULT_INITIAL_SIZE, f, strategy); while (i.hasNext()) add(i.nextDouble()); } /**