use of org.knime.core.data.vector.bitvector.DenseBitVectorCell in project knime-core by knime.
the class BitVectorPerformanceComparisonBug1532 method createNewDenseBitVectorCells.
private DenseBitVectorCell[] createNewDenseBitVectorCells(final int count, final long vectorLength, final long seed) {
Random r = new Random(seed);
DenseBitVectorCell[] result = new DenseBitVectorCell[count];
int hexLength = (int) (vectorLength / 4);
StringBuilder b = new StringBuilder(hexLength);
for (int i = 0; i < count; i++) {
b.setLength(0);
for (int j = 0; j < hexLength; j++) {
b.append(HEX_CHARS[r.nextInt(16)]);
}
result[i] = new DenseBitVectorCellFactory(b.toString()).createDataCell();
}
return result;
}
Aggregations