slow.it.unimi.dsi.sux4j.mph.LcpMonotoneMinimalPerfectHashFunctionSlowTest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sux4j Show documentation
Show all versions of sux4j Show documentation
Sux4j is an implementation of succinct data structure in Java. It provides a number of related implementations covering ranking/selection over bit arrays, compressed lists and minimal perfect hashing.
package it.unimi.dsi.sux4j.mph;
import static org.junit.Assert.assertEquals;
import it.unimi.dsi.bits.TransformationStrategies;
import java.io.IOException;
import java.util.Iterator;
import org.junit.Test;
public class LcpMonotoneMinimalPerfectHashFunctionSlowTest {
@Test
public void testBig() throws IOException {
Iterable p = LargeLongCollection.getInstance();
final LcpMonotoneMinimalPerfectHashFunction f = new LcpMonotoneMinimalPerfectHashFunction.Builder().keys(p).transform(TransformationStrategies.fixedLong()).build();
long j = 0;
for(Iterator i = p.iterator(); i.hasNext();) {
Long s = i.next();
assertEquals(j++, f.getLong(s));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy