double getDouble(long index) { return dumpBuffer.getDouble((int) index); }
@Override public double readDouble() { assert buffer != null; double d = buffer.getDouble((int) position); position += 8; return d; }
@Override public double readDouble(int offset) { assert buffer != null; return buffer.getDouble((int) (start + offset)); }
double getDouble(long index) { return dumpBuffer[getBufferIndex(index)].getDouble(getBufferOffset(index)); }
@Override public double readDouble() { assert buffer != null; double d = buffer.getDouble((int) position); position += 8; return d; }
@Override public double readDouble(int offset) { assert buffer != null; return buffer.getDouble((int) (start + offset)); }
@Override public Double deserialize() { return fileBuffer.getDouble(); } }
double getDouble(long index) { return dumpBuffer.getDouble((int) index); }
double readDouble() throws IOException { return mappedByteBuffer.getDouble(); }
double getDouble(long index) { return dumpBuffer.getDouble((int) index); }
public double get(int x) { long p = x * 8; int mapN = (int) (p / MAPPING_SIZE); int offN = (int) (p % MAPPING_SIZE); return mappings.get(mapN).getDouble(offN); }
double getDouble(long index) { return dumpBuffer[getBufferIndex(index)].getDouble(getBufferOffset(index)); }
double getDouble(long index) { return dumpBuffer[getBufferIndex(index)].getDouble(getBufferOffset(index)); }
/** * Create a shapefile descriptor. * @param byteBuffer Source Bytebuffer. */ public ShapefileDescriptor(MappedByteBuffer byteBuffer) { this.fileCode = byteBuffer.getInt(); byteBuffer.getInt(); byteBuffer.getInt(); byteBuffer.getInt(); byteBuffer.getInt(); byteBuffer.getInt(); this.fileLength = byteBuffer.getInt() * 2; byteBuffer.order(ByteOrder.LITTLE_ENDIAN); this.version = byteBuffer.getInt(); this.shapeType = ShapeTypeEnum.get(byteBuffer.getInt()); this.xmin = byteBuffer.getDouble(); this.ymin = byteBuffer.getDouble(); this.xmax = byteBuffer.getDouble(); this.ymax = byteBuffer.getDouble(); this.zmin = byteBuffer.getDouble(); this.zmax = byteBuffer.getDouble(); this.mmin = byteBuffer.getDouble(); this.mmax = byteBuffer.getDouble(); byteBuffer.order(ByteOrder.BIG_ENDIAN); //dbf.byteBuffer.get(); // should be 0d for field terminator }
/** * Read a polygon that has a unique part. * @param numPoints Number of the points of the polygon. * @return Polygon. */ @Deprecated // As soon as the readMultiplePolygonParts method proofs working well, this readUniquePolygonPart method can be removed and all calls be deferred to readMultiplePolygonParts. private Polygon readUniquePolygonPart(int numPoints) { /*int part = */ getByteBuffer().getInt(); Polygon poly = new Polygon(); // create a line from the points double xpnt = getByteBuffer().getDouble(); double ypnt = getByteBuffer().getDouble(); poly.startPath(xpnt, ypnt); for (int j = 0; j < numPoints - 1; j++) { xpnt = getByteBuffer().getDouble(); ypnt = getByteBuffer().getDouble(); poly.lineTo(xpnt, ypnt); } return poly; }
for (int i = 0; i < countOfDataSets; i++) { long timestamp = bb.getLong(); double d = bb.getDouble(); Quality s = Quality.getQuality(bb.get());
for (int i = 0; i < countOfDataSets; i++) { long timestamp2 = bb.getLong(); double d = bb.getDouble(); Quality s = Quality.getQuality(bb.get()); if (!Double.isNaN(d) && timestamp >= timestamp2) {
public StarBean readStarBean(MappedByteBuffer mem) { double data[] = new double[StarBean.SIZE]; // Double for (int i = 0; i < StarBean.I_APPMAG; i++) { data[i] = mem.getDouble(); } // Float for (int i = StarBean.I_APPMAG; i < StarBean.I_HIP; i++) { data[i] = mem.getFloat(); } // Int for (int i = StarBean.I_HIP; i < StarBean.SIZE; i++) { data[i] = mem.getInt(); } Long id = mem.getLong(); int nameLength = mem.getInt(); StringBuilder name = new StringBuilder(); for (int i = 0; i < nameLength; i++) name.append(mem.getChar()); return new StarBean(data, id, name.toString()); }
for(int i = 0; i < nnsize; i++) { int nid = ByteArrayUtil.readUnsignedVarint(buffer); double dist = buffer.getDouble(); knn.insert(dist, DBIDUtil.importInteger(nid));